HP Integrity Virtual Machines 4.2: Installation, Configuration, and Administration

# hpvmnet -c -S vmlan4 -n 1
# hpvmnet -b -S vmlan4
2. Use the hpvmnet command with the u option to create the port and assign it a VLAN ID.
For example, to create ports 1 and 2 for VLAN 100, enter the following command:
# hpvmnet -S vmlan4 -u portid:1:vlanid:100
# hpvmnet -S vmlan4 -u portid:2:vlanid:100
3. Add the vswitch ports to the guest configuration using the hpvmmodify command. For
example, to add the new VLAN ports to guests vm1 and vm2, enter the following command:
# hpvmmodify -P vm1 -a network:lan::vswitch:vmlan4:portid:1
# hpvmmodify -P vm2 -a network:lan::vswitch:vmlan4:portid:2
The following command shows the resulting configuration:
# hpvmnet -S vmlan4
Name Number State Mode PPA MAC Address IP Address
======== ====== ======= ========= ====== ============== ===============
vmlan4 2 Up Shared lan4 0x00127942fce3 192.1.2.205
[Port Configuration Details]
Port Port Untagged Number of Active VM
Number state VLANID Reserved VMs
======= ============ ======== ============ ============
1 Active 100 2 vm1
2 Active 100 1 vm2
3 Active none 2 vm1
4 Active none 1 vm2
The two virtual machines, vm1 and vm2, have access to the virtual switch vmlan4 and are active
on VLAN 100. Specifically, port 1 (guest vm1) and port 2 (guest vm2) can communicate with each
other. Port 1 (guest vm1) and port 4 (guest vm2) cannot communicate with each other.
The hpvmnet command displays the following information about the VLAN ports:
Port number.
State of the port. Table 8-2 describes the possible VLAN port states:
Table 8-2 VLAN Port States
DescriptionState
The port is active and is allocated to a running guest. No other guests with the same vNIC
with the same vswitch and port can start
Active
The port is inactive and is allocated to a running guest. No other guests with the same vNIC
with the same vswitch and port can start.
Down
At least one guest reserved the port for its vNIC, but no guest that uses the port is running.
Reserved
No guest reserved the port for its vNIC. When a VLAN is configured on the port, that port
is displayed as Available. If no VLAN is configured, the port is not displayed at all.
Available
The untagged VLAN ID number (if any)
The number of virtual machines that have access to the VLAN
The names of virtual machines that are up and that have access to the VLAN
8.4.1 Cloning Guests with VLAN Information
If you use the hpvmclone command to clone guests, the operation automatically assigns new
port numbers for new guests. To assign the same port number to the new guest, use the S
option, as follows:
# hpvmclone -P vm1 -N vmclone1 -S
This command creates a new guest (vmclone1) based on the existing guest vm1, and preserves
the vswitch port number so that the new guest will have access to the same VLANs as the existing
guest.
136 Creating Virtual Networks