Pcornel
Automation · VMware Automation

Networking

Cheat sheet · https://pcornel.dk/topic.php?topic=5737

Back to the Topic

Answer

VMware networking automation creates standard and distributed switches, port groups and VLANs with PowerCLI (New-VDPortgroup) or Ansible, keeping host networking identical.

Remember

  • Standard and distributed switches.
  • Port groups and VLANs.
  • Consistency across hosts.

First checks

  • Get-VDPortgroup | ft Name,VlanConfiguration — port groups
  • New-VDPortgroup -VDSwitch <vds> -Name <n> -VlanId <id> — create
  • Get-VM <vm> | Get-NetworkAdapter | Set-NetworkAdapter -Portgroup <pg> -Confirm:$false — reconnect VM

Verify in this order

SoT → port groups → VM adapters

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5737

Confirmation

Confirm action

Continue?