Anlegen von VLANs / Portgroups

Anlegen von VLANs via Shell. Hat den Vorteil das sie auf allen ESX Server mit Standard Switch gleich “falsch” oder richtig angelegt sind.

esxcli network vswitch standard portgroup add --portgroup-name=<name> --vswitch-name=<vSwitch>
esxcli network vswitch standard portgroup set -p <name> --vlan-id <ID>

Beispiel:
esxcli network vswitch standard portgroup add --portgroup-name=vlan_10_mgmt --vswitch-name=vSwitch0
esxcli network vswitch standard portgroup set -p vlan_10_mgmt --vlan-id 1


Check ob alle VLANs richtig angelegt worden sind.
Hier ist es wichtig gut drüber zu sehen da der ESX immer wieder ein Kommando “verschluckt”

esxcli network vswitch standard portgroup list