How to Re-Enable Network After Loss of Connection to a vDS

I wouldn’t suggest copying a Host Profile template from a Nexus vDS host. Well, unless you know what you are doing anyways, or enjoy searching with help from google. Personally, I wanted to see how host profiles would break the server. I had read that it is not best practice to use host profiles with Nexus. Things not covered by Host Profiles are:
– Licensing
– vDS policy configuration
– Multipathing
So far, I was amazed on how vSphere was so streamlined for network. So, I was a little disappointed that I couldn’t get it to work on the first try. Below is the end result of what happens if you do this incorrectly.
esxcfg-vswitch -l (use ctrl c to stop it before it scrolls off the page)

So now both of my uplinks are set to the distributed switch and I have lost total communication with the server. After consoling directly to the server, my goal is to get one NIC back to the vSwitch from the dvSwitch.
Find out dvSwitch name, PortID and Uplink I need. Replace this command below with the information above: In my case I want the uplink = vmnic0; dvportID = 2945; dvswitchName = N1kv
esxcfg-vswitch -Q $uplink -V $dvportId $dvswitchName

So in my case I want to use this command in order to remove the NIC.
esxcfg-vswitch -Q vmnic0 vmnic0 -V 2945 N1kv

Now I can look back at my dvSwitch to make sure that “vmnic0” has been removed, I can proceed to add it to vSwitch.

Looking at my information I can see that I will have to add a vSwitch. Then I will need to link “vmnic0” to the Service Console. I usually use my standby Planetvm article. However, I have taken you this far.

First issue the following command to create the vswitches
esxcfg-vswitch -a vSwitch0

Next create your port groups
esxcfg-vswitch -A “Service Console” vSwitch0

Thent recreate the vswif interface
esxcfg-vswif -a vswif0 -p “Service Console” -i {your IP Address here} -n {Your Subnet Mask here}

And finally link your uplink to the vswitch
esxcfg-vswitch -L vmnic0 vSwitch0

This should get your network connectivity back up to reconnect it however you would like.


Add a Comment

Your email address will not be published. Required fields are marked *