For data centers with considerable virtual machines, changing the configuration for all/most VM's is a tedious task. For which VMware vCenter provides PowerCLI commands which can get be used to automate this flow.
Changing or Switching the VLAN of Virtual Machines.
Example:1 To change the VLAN for VMs starting with Centos-nginx- prefix
for (($i = 1500); $i -lt 2000; $i++) { Get-VM "Centos-nginx-$i" | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName "vxw-dvs-100-virtualwire-8-sid-5005-arc-vm05" -Confirm:$false }
No comments:
Post a Comment