Change VMware vSphere Network Label via CLI

command-line-interfacevmware-vsphere

Does anyone have an example of how to change a Vmware vSphere VM's network label (i.e. vlan) from a CLI in Linux?

I've come across VMware's perl SDK, but rather than learn it from scratch and trawl through the dense documentation I was hoping someone may have an example which does the job. Perl wouldn't be my first choice (which also slows me down).

Any help appreciated.

Update: I've come across vmreconfig.pl, which looks like it should do the job, but I haven't seen any example of how it can manage network ports.

Best Answer

After some serious googling, perl bashing and a little despair I hit on this forum post, and in particular of interest, this script.

Usage:

./updateVMDVPortgroup.pl --server 10.10.15.15 --vmname development-3 \
   --vnic 1 --portgroup dvPortGroup-Inside --dvs dc1-cluster-e01-dvSwitch2

Just the job!

Related Topic