To follow up with a post I made yesterday about reconfiguring an ESX 4.x server’s service console to different vmnics:
Quick note about reconfiguring an ESX 4.x server’s service console to different vmnics
http://terenceluk.blogspot.com/2011/01/quick-note-about-reconfiguring-esx-4x.html
… I realized later that night that I haven’t moved the vmkernel ports over from the Nexus 1000v which meant all the virtual machines that required access to the iSCSI store was offline. I also noticed that the document I had provided with all the commands I used only did not have the esxcfg commands to show how to remove a vmk (vmkernel) port from a Nexus 1000v or distributed switch. With a bit more time and a clearer head, I managed to take some screenshots during the process so the following serves to show how it’s done in a step-by-step manner:
To identify which port the vmk (vmkernel) is configured on the Nexus 1000v, we should execute the command:
esxcfg-vswitch -l | more
Note: The “| more” should be used because whenever you have a distributed switch or Nexus 1000v, you’re bound to have so many ports printed that a single screen won’t be able to display.
Once you execute the command above, you will see the following output:
The port we would like to remove is the one shown above with the:
DVS Name: N1KV
DVPort ID: 164
Client: vmk0
In addition to use the esxcfg-vswitch command, we should also execute the esxcfg-vmknic command to review the properties of the vmkernel port. This is important because we will need the IP when we reconfigure the vmkernel port on a regular vSwitch:
esxcfg-vmknic -l
Write down the IP listed above (172.20.5.187) and issue the following command to remove the vmkernel port from the Nexus 1000v:
esxcfg-vmknic -d -s N1KV -v 164
The format of this command is actually:
esxcfg-vmknic -d -s <DVS Name> -v <DVPort ID>
As shown in the screenshot above, executing the command to remove the port doesn’t actually output anything so to check and see if the port’s removed from the Nexus 1000v, simply execute:
esxcfg-vmknic -l
or
esxcfg-vswitch -l | more
… and you will find that the port is no longer be there. From here on, I chose to use the GUI to recreate the VMkernel port but it is possible to use the esxcfg-vmknic command for this as well. Once you’ve recreated the vmkernel port on your regular vSwitch, simply do a rescan of your storage and you should now see the iSCSI datastores again.
Hope this helps anyone out there scrambling to find the commands to remove a vmkernel port from a distributed or Nexus 1000v switch.
1 comment:
You're a genius. That was perfect!
Post a Comment