VMware Cloud Community
tdubb123
Expert
Expert

Failed to connect virtual device ethernet0.

I cannot connect my VM to the network/ When I select device status : Connected.

It fails and gives an error

Failed to connect virtual device ethernet0

The nic is e1000

17 Replies
rcporto
Leadership
Leadership

What is the version of your ESXi ? Check if this KB helps: http://kb.vmware.com/kb/2072694

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
Reply
0 Kudos
tdubb123
Expert
Expert

this host is running 5.5 build 1623387.

On Sat, Jun 21, 2014 at 5:29 PM, Richardson Porto <

Reply
0 Kudos
rcporto
Leadership
Leadership

There are any free port on vSwitch ? Are you using vShield ?

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
Reply
0 Kudos
tdubb123
Expert
Expert

im using a nexus 1000 dvswitch. but the vm is down and this is the vm I am

trying to power up. Keeps getting disconnected

On Sat, Jun 21, 2014 at 5:44 PM, Richardson Porto <

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso

Hi tdubb123,

Here are a couple things you can try.  Iterate through the list until successful.

1.  Perform a vMotion of the VM to another host and see if the problem persists.
2.  From Edit Settings on the VM, make note of the port group it's on, then set it to "Unused or Quarantined", click ok,  Then set it back to the original port group again

3.  From Home > Inventory > Networking, Select your 1000v vDS in the left pane, and in the right pane select the Ports tab and review the State Column.  Scroll through and see if the VM in question is "blocked".  If so, click "Start Monitoring Port State" at the top right.  Often this will clear the issue.  If not proceed to step 4.

     Home.Inventory.Network.Ports.Blocked.png

4.  Identify which host the VM is on, and open an ssh session to the host.  Then perform the following command to see if the VM's port is blocked:

     vemcmd show port | grep -i <vmname>

     example-vm-blockedport-via-vemcmd.png

5.  If you are seeing a port blocked in either step 3 or 4 above, then perform the following to confirm the health of the VEM to VSM communication:

    vemcmd show card | grep 'Primary VSM MAC'


     Using the MAC address returned from the above, run the following command to perform the health check:

    vem-health check <mac from above>


    Example:

     vem-health check example.png
6.  If any errors are reported on the health check above, review as appropriate.  If the problem persists, perform a 'tail -fv /var/log/vmkernel.log' while attempting to connect the NIC or power the VM on.  Also consider tailing the vmware.log in the VM's directory.


7.  If the problem persists, determine if the issue affects only this VM by powering on another VM that uses the same port group, even if you have to deploy one from template if needed.  You may also consider powering off a less important VM on that same port group and see if you can then get network connectivity when powering on the 'bad' VM.


8.  Ok, if you got this far with no success then here's where things get technical.  Check out this technote from Cisco:

     Nexus 1000V VM Registration Troubleshoot - Cisco


If after all that the issue still persists, consider opening a VMware case.  Let us know how things are going either way.



Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso

Has your issue been resolved?  If not, have you tried un-registering / re-registering the VM (or at least hot reload of the vmx)?  How's the health of the vCenter / VCDB?

Reply
0 Kudos
tdubb123
Expert
Expert

hi

port is not blocked. it just says link down because the vm deivce status is not connected.

when i try to connect it it gives me that same error

Failed to connect to virtual device ethernet0

at this point, both my vsms are down, secondary and primary.

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso

Ok, VSM down is very serious.  Especially if both are down.  You used the wording "VM" before, not VSM.  Absolutely do not power off any VMs as they will not get a dvPort while the VEM modules on the ESXi hosts are running headless.

If you haven't already you need to open a support case with VMware immediately so they can escalate to Cisco TAC.  Again do not power cycle any VMs.  You may also consider turning off the HA setting "Enable Host Monitoring" (uncheck the box) to prevent any VMs from failing over due to host isolation events (i.e. if HA kicks in right now and all VMs on a host reboot, they will all fall off the network).  That's located at Edit Settings on the cluster under vSphere HA.

All VMs that are currently online should remain pingable while running in headless mode (i.e. no VEM to VSM communication).

Generate a vm-support bundle and also a 'vem-support all' which will gather the Cisco VEM related logs from your host.  You need to engage your network admins as well since they will need to get onto the VSM.

In the meantime, identify which hosts the VSMs are on.  You may need to revert one interface to vStandard Switch and/or rebuild a fresh VSM and reload the config from backup.  Don't do anything until you have support.

Keep us posted.

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso

How's it going?

Reply
0 Kudos
tdubb123
Expert
Expert

Hi

Thanks for checking back. I think I need to uninstall the 1000v from this

vcenter and start a new install. The VSM restore I believe was for vcenter

5.1. Since then I upgraded to 5.5 and might be causing an issue? I dont

have a backup of the VSM compatible with vsphere 5.5.

On Mon, Jun 23, 2014 at 4:35 AM, grasshopper <communities-emailer@vmware.com

Reply
0 Kudos
tdubb123
Expert
Expert

how do I manually remove the 1000v from vcenter after the vsm have been

deleted already?

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso

Assuming a healthy connection between vCenter and the 1000v (not the case here) you would normally run 'no vmware dvs' from the VDS (a.k.a. VSM) and that would remove the 1000v config from vCenter.  In your case, since there is no network connectivity you can try the procedure below.

Cisco TAC Document ID 115759 discusses the topic of removing orphaned 1000v from vCenter.

VMware KB1020542 also discusses the removal of orhpaned vDS.

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso

On a side note, just wanted to discuss the lack of backups...

Always have your network admin take a backup of the config after every successful change / upgrade.  The 1000v work just like a physical switch in the methodology.  Always save the running config to startup config; and always save the config off remotely to ftp for example.

Tip:  It's also a best practice to power off one VSM at a time and take an offline clone to leave powered off.  Although restoring just the text config would suffice, also having an offline clone to power up and apply that config to makes things a bit smoother.

Reply
0 Kudos
jCoke66
Contributor
Contributor

Very nice guide. I just can add two things. If its an ethernet (physical) go to Networking - "your N1K" - ports. Find the port and see if its grey, right click  the RJ45 symbol and press refresh. If its and vethernet check that the vlan exist in N1K that you added in the port-profile (like switch port access vlan 808). You can see that in the port list if it has been assigned to VLAN 1.

ThornburyWN
Contributor
Contributor

I had this same exact issue as well. Changing to "Port ID" to one that was unused and applying that setting fixed the issue. Then go back to the VMs HW config and check connected and you should be good.

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso

Excellent!

Reply
0 Kudos
sambasunitha111
Contributor
Contributor

I Have tried some work around and succeeded. Please try below process may help you.

1.     Go to " Edit settings " of the VM.

2.     Connect the NIC to some other portgroup in the same DV swtich, and check the box " Connected " and Say OK.

3.      Again go to Edit settings and make sure that now NIC status should be in connected state.

4.     Now change the port group which you are facing issue with then click on OK.

5.     Check it now whether it worked

Thank you,

Reply
0 Kudos