Index: /trunk/src/VBox/Devices/Network/DevE1000.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevE1000.cpp	(revision 41406)
+++ /trunk/src/VBox/Devices/Network/DevE1000.cpp	(revision 41407)
@@ -1046,5 +1046,6 @@
 
     bool        Alignment2[3];
-    uint32_t    Alignment3;
+    /** Link up delay (in milliseconds). */
+    uint32_t    uLinkUpDelay;
 
     /** All: Device register storage. */
@@ -2164,4 +2165,17 @@
 
 
+/**
+ * Bring the link up after the configured delay, 5 seconds by default.
+ *
+ * @param   pState      The device state structure.
+ * @thread  any
+ */
+DECLINLINE(void) e1kBringLinkUpDelayed(E1KSTATE* pState)
+{
+    E1kLog(("%s Will bring up the link in %d seconds...\n",
+            INSTANCE(pState), pState->uLinkUpDelay / 1000));
+    e1kArmTimer(pState, pState->CTX_SUFF(pLUTimer), pState->uLinkUpDelay * 1000);
+}
+
 #if 0 /* unused */
 /**
@@ -2232,6 +2246,6 @@
         {
             /* The driver indicates that we should bring up the link */
-            /* Do so in 5 seconds. */
-            e1kArmTimer(pState, pState->CTX_SUFF(pLUTimer), 5000000);
+            /* Do so in 5 seconds (by default). */
+            e1kBringLinkUpDelayed(pState);
             /*
              * Change the status (but not PHY status) anyway as Windows expects
@@ -2873,4 +2887,5 @@
         return;
 
+    E1kLog(("%s e1kLinkUpTimer: Link is up\n", INSTANCE(pState)));
     STATUS |= STATUS_LU;
     Phy::setLinkStatus(&pState->phy, true);
@@ -5897,11 +5912,12 @@
         if (fNewUp)
         {
-            E1kLog(("%s Link will be up in approximately 5 secs\n", INSTANCE(pState)));
+            E1kLog(("%s Link will be up in approximately %d secs\n",
+                    INSTANCE(pState), pState->uLinkUpDelay / 1000));
             pState->fCableConnected = true;
             STATUS &= ~STATUS_LU;
             Phy::setLinkStatus(&pState->phy, false);
             e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC);
-            /* Restore the link back in 5 second. */
-            e1kArmTimer(pState, pState->pLUTimerR3, 5000000);
+            /* Restore the link back in 5 seconds (by default). */
+            e1kBringLinkUpDelayed(pState);
         }
         else
@@ -6204,5 +6220,6 @@
     */
     if (    (STATUS & STATUS_LU)
-        && !PDMDevHlpVMTeleportedAndNotFullyResumedYet(pDevIns))
+        && !PDMDevHlpVMTeleportedAndNotFullyResumedYet(pDevIns)
+        && pState->uLinkUpDelay)
     {
         E1kLog(("%s Link is down temporarily\n", INSTANCE(pState)));
@@ -6210,6 +6227,6 @@
         Phy::setLinkStatus(&pState->phy, false);
         e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC);
-        /* Restore the link back in five seconds. */
-        e1kArmTimer(pState, pState->pLUTimerR3, 5000000);
+        /* Restore the link back in five seconds (default). */
+        e1kBringLinkUpDelayed(pState);
     }
     return VINF_SUCCESS;
@@ -6319,6 +6336,6 @@
         Phy::setLinkStatus(&pState->phy, false);
         e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC);
-        /* Restore the link back in 5 second. */
-        e1kArmTimer(pState, pState->pLUTimerR3, 5000000);
+        /* Restore the link back in 5 seconds (default). */
+        e1kBringLinkUpDelayed(pState);
     }
 
@@ -6662,5 +6679,5 @@
     if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "AdapterType\0"
                                     "LineSpeed\0" "GCEnabled\0" "R0Enabled\0"
-                                    "EthernetCRC\0"))
+                                    "EthernetCRC\0" "LinkUpDelay\0"))
         return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
                                 N_("Invalid configuration for E1000 device"));
@@ -6701,6 +6718,21 @@
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("Configuration error: Failed to get the value of 'EthernetCRC'"));
-
-    E1kLog(("%s Chip=%s\n", INSTANCE(pState), g_Chips[pState->eChip].pcszName));
+    rc = CFGMR3QueryU32Def(pCfg, "LinkUpDelay", (uint32_t*)&pState->uLinkUpDelay, 5000); /* ms */
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to get the value of 'LinkUpDelay'"));
+    Assert(pState->uLinkUpDelay <= 300000); /* less than 5 minutes */
+    if (pState->uLinkUpDelay > 5000)
+    {
+        LogRel(("%s WARNING! Link up delay is set to %u seconds!\n",
+                INSTANCE(pState), pState->uLinkUpDelay / 1000));
+    }
+    else if (pState->uLinkUpDelay == 0)
+    {
+        LogRel(("%s WARNING! Link up delay is disabled!\n", INSTANCE(pState)));
+    }
+
+    E1kLog(("%s Chip=%s LinkUpDelay=%ums\n", INSTANCE(pState),
+            g_Chips[pState->eChip].pcszName, pState->uLinkUpDelay));
 
     /* Initialize state structure */
Index: /trunk/src/VBox/Devices/Network/DevPCNet.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevPCNet.cpp	(revision 41406)
+++ /trunk/src/VBox/Devices/Network/DevPCNet.cpp	(revision 41407)
@@ -272,4 +272,6 @@
     bool                                fAm79C973;
     uint32_t                            u32LinkSpeed;
+    uint32_t                            uLinkUpDelay;
+    uint32_t                            Alignment6;
 
     STAMCOUNTER                         StatReceiveBytes;
@@ -4333,5 +4335,5 @@
         pThis->aCSR[0] |= RT_BIT(15) | RT_BIT(13); /* ERR | CERR (this is probably wrong) */
         pThis->Led.Asserted.s.fError = pThis->Led.Actual.s.fError = 1;
-        int rc = TMTimerSetMillies(pThis->pTimerRestore, 5000);
+        int rc = TMTimerSetMillies(pThis->pTimerRestore, pThis->uLinkUpDelay);
         AssertRC(rc);
     }
@@ -4776,5 +4778,5 @@
             pThis->aCSR[0] |= RT_BIT(15) | RT_BIT(13); /* ERR | CERR (this is probably wrong) */
             pThis->Led.Asserted.s.fError = pThis->Led.Actual.s.fError = 1;
-            int rc = TMTimerSetMillies(pThis->pTimerRestore, 5000);
+            int rc = TMTimerSetMillies(pThis->pTimerRestore, pThis->uLinkUpDelay);
             AssertRC(rc);
         }
@@ -5022,5 +5024,5 @@
      * Validate configuration.
      */
-    if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "Am79C973\0" "LineSpeed\0" "GCEnabled\0" "R0Enabled\0" "PrivIfEnabled\0"))
+    if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "Am79C973\0" "LineSpeed\0" "GCEnabled\0" "R0Enabled\0" "PrivIfEnabled\0" "LinkUpDelay\0"))
         return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
                                 N_("Invalid configuration for pcnet device"));
@@ -5063,4 +5065,17 @@
     pThis->fR0Enabled = false;
 #endif /* !PCNET_GC_ENABLED */
+
+    rc = CFGMR3QueryU32Def(pCfg, "LinkUpDelay", (uint32_t*)&pThis->uLinkUpDelay, 5000); /* ms */
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to get the value of 'LinkUpDelay'"));
+    Assert(pThis->uLinkUpDelay <= 300000); /* less than 5 minutes */
+    if (pThis->uLinkUpDelay > 5000 || pThis->uLinkUpDelay < 100)
+    {
+        LogRel(("PCNet#%d WARNING! Link up delay is set to %u seconds!\n",
+                iInstance, pThis->uLinkUpDelay / 1000));
+    }
+    Log(("#%d Link up delay is set to %u seconds\n",
+         iInstance, pThis->uLinkUpDelay / 1000));
 
 
Index: /trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevVirtioNet.cpp	(revision 41406)
+++ /trunk/src/VBox/Devices/Network/DevVirtioNet.cpp	(revision 41407)
@@ -161,4 +161,8 @@
     /** True if physical cable is attached in configuration. */
     bool                    fCableConnected;
+    /** Link up delay (in milliseconds). */
+    uint32_t                uLinkUpDelay;
+
+    uint32_t                alignment;
 
     /** Number of packet being sent/received to show in debug log. */
@@ -1592,5 +1596,5 @@
         vpciRaiseInterrupt(&pState->VPCI, VERR_SEM_BUSY, VPCI_ISR_CONFIG);
         /* Restore the link back in 5 seconds. */
-        int rc = TMTimerSetMillies(pState->pLinkUpTimer, 5000);
+        int rc = TMTimerSetMillies(pState->pLinkUpTimer, pState->uLinkUpDelay);
         AssertRC(rc);
     }
@@ -1935,5 +1939,5 @@
      * Validate configuration.
      */
-    if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "LineSpeed\0"))
+    if (!CFGMR3AreValuesValid(pCfg, "MAC\0" "CableConnected\0" "LineSpeed\0" "LinkUpDelay\0"))
                     return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
                                             N_("Invalid configuration for VirtioNet device"));
@@ -1949,4 +1953,16 @@
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("Configuration error: Failed to get the value of 'CableConnected'"));
+    rc = CFGMR3QueryU32Def(pCfg, "LinkUpDelay", (uint32_t*)&pState->uLinkUpDelay, 5000); /* ms */
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to get the value of 'LinkUpDelay'"));
+    Assert(pState->uLinkUpDelay <= 300000); /* less than 5 minutes */
+    if (pState->uLinkUpDelay > 5000 || pState->uLinkUpDelay < 100)
+    {
+        LogRel(("%s WARNING! Link up delay is set to %u seconds!\n",
+                INSTANCE(pState), pState->uLinkUpDelay / 1000));
+    }
+    Log(("%s Link up delay is set to %u seconds\n",
+         INSTANCE(pState), pState->uLinkUpDelay / 1000));
 
     /* Initialize PCI config space */
