root@Cisco-HX-Installer-Appliance:~# post_install --cluster-ip 10.xx.xx.xx --vlan --ucsm-ip 10.xx.xx.xx --vc-url 10.xx.xx.xx --org HX-Cluster-DCN Logging in to controller 10.xx.xx.xx HX CVM root password: Getting ESX hosts from HX cluster... vCenter URL: 10.xx.xx.xx Enter vCenter username (user@domain): firstname.lastname@example.org vCenter Password: Found datacenter HX DC-Cluster Found cluster HX-Cluster-DCN UCSM Username: admin UCSM Password: Port Group Name to add (VLAN ID will be appended to the name): test VLAN ID: (0-4096) 999 Adding VLAN 999 to FI Adding VLAN 999 to vm-network-a VNIC template Adding test-999 to 10.xx.xx.xx ---> We have a 4 node cluster in this example, so the vlan is being added to each server. Adding test-999 to 10.xx.xx.xx Adding test-999 to 10.xx.xx.xx Adding test-999 to 10.xx.xx.xx Add additional VM network VLANs? (y/n)
After VLAN Addition
1. We can see that VLAN 999 is added under VLANs in UCSM:
2. It is also added in the vm-network template:
3. We can also see the VLAN in the vm-network vSwitch:
Manually adding VLAN without using script
UCSM Add VLAN Globallly
UCSM / LAN / LAN Cloud / VLANs
Either right-click the word VLANs on the left panel and select [Create VLANs].
Or click the [Add] option on the right side panel.
On HyperFlex versions 4.0(1a) and 4.0(1b) there is a known issue when running the post_install script with the "--vlan" flag to only add a VLAN it has an error " Could not connect to UCSM. Please create VLAN manually." when attempting to add the VLAN to the "vm-network-a" vNIC Template. When checking UCSM it is added successfully to the LAN Cloud. It is also successfully added to each ESXi host.
The workaround is to add the VLAN manually to the "vm-network-a" vNIC Template.