mkvlan - It takes a list of nodes and move them to a private vlan.
mkvlan [vlanid] -n|--nodes noderange [-t|--net subnet] [-m|--mask netmask] [-p|--prefix hostname_prefix]
mkvlan [-h|--help]
mkvlan [-v|--version]
The mkvlan command takes a list of nodes and move them to a private vlan. It will configure the switch to create a new vlan. The new vlan ID is given by the command. However, if it is omitted, xCAT will automatically generate the new vlan ID by querying all the switches involved and finding out the smallest common number that is not used by any existing vlans. The subnet and the netmask for the vlan will be derived from the value of ``vlannets'' and ``vlanmasks'' from the site table if -t and -m are not specified. The following are the default site table entires:
vlannets="|(\d+)|10.($1+0).0.0|"; vlanmask="255.255.0.0";
The vlan network will be entered in the networks table. The nodes will be added to the vlan using the vlan tagging technique. And the new IP addresses and new hostnames will be assigned to the nodes. The -p flag specifies the node hostname prefix for the nodes. If it is not specified, by default, the hostnames for the nodes are having the following format:
v<vlanid>nY where Y is the node number. For example, the hostname for node 5 on vlan 10 is v10n5.
The switch.vlan will be updated with the new vlan id for the node for standaline nodes. For KVM guests, the vm.nics identifies which vlan this node belongs to. For example: vl3 means this node is in vlan 3.
If there are more than one switches involved in the vlan, the ports that connect to the switches need to entered in switches.linkports with the following format:
<port numner>:switch,<port number>:switch....
For example:
"42:switch1,43:switch2"
This command will automatically configure the cross-over ports if the given nodes are on different switches.
vlanid is a unique vlan number. If it is omitted, xCAT will automatically generate the new vlan ID by querying all the switches involved and finding out the smallest common number that is not used by any existing vlans. Use lavlan to find out the existing vlan ids used by xCAT.
0 The command completed successfully.
1 An error has occurred.
To make a private vlan for node1, node2 and node3
mkvlan -n node1,node2,node3
TO make a private vlan for node1, node2 with given subnet and netmask.
mkvlan -n node1,node2,node3 -t 10.3.2.0 -m 255.255.255.0
To make a private vlan for KVM guests node1 and node2
chtab key=usexhrm site.vlaue=1
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
mkvlan -n node1,node2
mkvm node1,node2 -s 20G
rpower node1,node2 on
rinstall node1,node2
/opt/xcat/bin/mkvlan