VMware Cloud Community
meokey
Contributor
Contributor

NIC disconnected when VM start up

I'm running ESXi 4.0 build 208167 on a IBM BladeCenter S. Recently I found that almost every time I start up a VM, it's not connected, no matter if I set it using DHCP or static IP address, no matter what the guest OS (XP, 7, 2003 or Ubuntu) is, and no matter what vNIC type I'm using (flexible, E1000, or VMXNET 3). Meanwhile, physical PCs using DHCPor static IP addresses have no problem at all connecting to the network.

It issue happens on recently created VMs but doesn't impact the others.

And I found a solution to it, weired enough though:

First disable NIC on the guest OS, remove the NIC from VM. Wait for a while, and add the same NIC into the VM, 1 minute after, enable the NIC on guest OS. In70% cases, the trick works well.

Once the NIC gets back to work, it connects stably until next reboot.

Any idea is appreciated?

0 Kudos
6 Replies
Los
Contributor
Contributor

I've had a similar issue before. Every time for me just removing the nic from the vm via vCenter and then readding it fixed it. Even after a reboot it remained functional and connected.

0 Kudos
stevenbright1
Enthusiast
Enthusiast

Have you selected the "Connect at power on" option for the virtual machine's NIC in the Edit Settings, Hardware tab?

0 Kudos
meokey
Contributor
Contributor

Yes I have selected the "Connect at power on" option for all my VMs, and in the Vms, guest OS can "see" the NICs and it's "physically" connected but just can't get IP from DHCP, or if using static IP, can't ping any machine on the subnet.

0 Kudos
stevenbright1
Enthusiast
Enthusiast

Does the vSwitch which the VMs are connected to use multiple physical uplinks?

If so, go into your vSwitch and one at a time, try removing one of the physical NICs from the vSwitch to see if the VMs keep their connectivity, if they do, add that physical NIC back and remove the next. If the VMs lose their connectivity after removing one of the NICs but not the other, then most likely you have a configuration issue on the physical switch port that the vSwitch is connected to (i.e. missing VLAN, etc.).

meokey
Contributor
Contributor

You are right. Acutally one of the physical swith port was disabled incorrectly so 2 vmnics are not connected. And the network failover detection mode of the vSwitch was Link Status Only that didn't detected the disconnection successfully for some reason.

Now I enabled the switch port, change the detection mode to Beacon Probing. It works fine now.

Thanks a lot for your great help.

0 Kudos
stevenbright1
Enthusiast
Enthusiast

Glad you have it all working now. I know how frustrating troubleshooting LAN connectivity can be. Ran into a similar situation with our LAN team's configuration...they missed adding a couple VLANs to the second switch and thus, we would randomly lose connectivity on some of our VMs.

0 Kudos