chvlan - It adds or removes nodes for the vlan.
chvlan vlanid -n|--nodes noderange [-d|--delete]
chvlan [-h|--help]
chvlan [-v|--version]
The chvlan command adds nodes to the given vlan. If -d is specified, the nodes will be removed from the vlan.
vlanid is a unique vlan number.
0 The command completed successfully.
1 An error has occurred.
To add node1, node2 and node3 to vlan 3.
chvlan 3 -n node1,node2,node3
TO remove node1, node2 and node3 from vlan 3.
chvlan -n node1,node2,node3 -d
To add KVM guests node1 and node2 to vlan 3
mkdef node1 arch=x86_64 groups=kvm,all installnic=mac primarynic=mac mgt=kvm netboot=pxe nfsserver=10.1.0.204 os=rhels6 profile=compute provmethod=install serialport=0 serialspeed=115200 vmcpus=1 vmhost=x3650n01 vmmemory=512 vmnics=br0 vmstorage=nfs://10.1.0.203/vms
mkdef node2 arch=x86_64 groups=kvm,all installnic=mac primarynic=mac mgt=kvm netboot=pxe nfsserver=10.1.0.204 os=rhels6 profile=compute provmethod=install serialport=0 serialspeed=115200 vmcpus=1 vmhost=x3650n01 vmmemory=512 vmnics=br0 vmstorage=nfs://10.1.0.203/vms
chvlan 3 -n node1,node2
mkvm node1,node2 -s 20G
rpower node1,node2 on
rinstall node1,node2
To remove KVM guests node1 and node2 from vlan 3
chvlan 3 -n node1,node2 -d
rpower node1,node2 off
rmvm node1,node2
/opt/xcat/bin/chvlan