updateVMPortgroup.pl

Version 2

    Sample execution:

     

    Update Network Adapter 1 to portgroup "production_network"

    [vi-admin@tancredi ~][http://everest.primp-industries.com|http://everest.primp-industries.com]$ ./updateVMPortgroup.pl --server everest.primp-industries.com --vmname "thegeneral" --vnic 1 --portgroup "production_network"
    Reconfiguration of portgroup "production_network" successful for "thegeneral".
    

     

     

    Update Network Adapter 2 to portgroup "test_network"

     

     

    [vi-admin@tancredi ~][http://everest.primp-industries.com|http://everest.primp-industries.com]$ ./updateVMPortgroup.pl --server everest.primp-industries.com --vmname "thegeneral" --vnic 2 --portgroup "test_network"
    Reconfiguration of portgroup "test_network" successful for "thegeneral".
    
    

     

     

    Make sure you spell the VM portgroup correctly as it is case sensitive to your vSwitch configurations. To check, you can always run esxcfg-vswitch -l on the Service Console or using the vCLI.