VMware Cloud Community
thomps01
Enthusiast
Enthusiast

How to connect an existing vmk interface to a DVS switch from the command line

Hi,

I needed to change the IP address and VLAN of my ESXi host so I've used the DCUI to restore a standard switch.

Once back in vCenter I quickly migrated the vmk0 interface back onto my vDS but vmk1 (vMotion) isn't so simple.


Although the vmk1 interface still exists with the configuration (I can see this from the command line) I don't know if there's a command to add an existing vmk interface back onto a distributed switch.

It takes me 30 seconds to remove and re-create this from scratch but it's nicer and less error prone if someone could share the correct command to add this back.


Thanks

0 Kudos
2 Replies
Sreejesh_D
Virtuoso
Virtuoso

Once back in vCenter I quickly migrated the vmk0 interface back onto my vDS but vmk1 (vMotion) isn't so simple.

whats the error you are hitting while migrating vmk1 through vSphere client?

0 Kudos
thomps01
Enthusiast
Enthusiast

It basically says the interface already exists.

I ended up going to a console and running the following command to remove the vmk1 interface before adding a new one through the GUI in vCenter.

esxcli network ip interface remove --interface-name=vmk1


0 Kudos