HP Integrity Virtual Machines 4.3: Installation, Configuration, Administration
Each guest can have two different types of LAN network devices, VIO and AVIO. For VIO guest
networks, a vswitch functions just like a physical network interface card (pNIC), accepting
network traffic from one or more virtual machines and directing network traffic to all of its ports.
A vswitch without the backing of a host physical network card can be used by VIO guest devices
for communication among VIO guest devices registered with the same vswitch. This type of
vswitch is typically referred to as localnet. For more information, see Section 7.2.1.1 (page 127).
Unlike VIO guest networks, traffic from an AVIO guest LAN network device is directed to the
pNIC directly by a separate host module rather than by the vswitch. You can create vswitches
before or after creating guests that access the vswitches. If you create the virtual machine before
creating the vswitch, the virtual machine is created and warning messages display the specific
problem. This allows you to create virtual machines for future configurations.
To create a vswitch, enter the hpvmnet -c command. Include the -S option to specify the name
of the virtual switch. For example:
# hpvmnet -c -S vswitch-name -n nic-id
where:
• vswitch-name is the name you assign to the vswitch. You must specify the name of the
vswitch.
• nic-id is the pNIC ID on the VM Host. If you omit the nic-id, the vswitch is created for
the localnet.
To start the vswitch, enter the hpvmnet -b command. For example:
# hpvmnet -b -S vswitch-name
For more information about using the hpvmnet command, see Section 7.2.1 (page 124).
To create the virtual machine and allocate the vswitch to it, use the -a option to the hpvmcreate
command. For example:
# hpvmcreate -P vm-name -a network:adapter-type:[hardware-address]:vswitch:vswitch-name
where hardware-address (optional) is the vNIC PCI bus number, device, and MAC address.
If you omit the hardware address, it is generated for you. HP recommends that you allow this
information to be automatically generated. In this case, omit the hardware-address value
from the command line, but retain the colon character separator. For example:
# hpvmcreate -P vm-name -a network:adapter-type:vswitch:vswitch-name
The adapter-type can be either lan or avio_lan.
On the guest, use standard operating commands and utilities to associate the vNIC with an IP
address, or use DHCP just as you would for a physically independent machine.
By default, vswitches are sharable; you can allocate the same vswitch to multiple virtual machines.
The hpvmnet command displays the status of the vswitches, including the mode. The vswitches
are always in SHARED mode.
Virtual LANs allow virtual machines to communicate with other virtual machines using the
same VLAN, either on the same VM Host or on different VM Host systems. You associate the
VLAN port number with a vswitch, then allocate that vswitch to virtual machines that
communicate on that VLAN. For more information about HP-UX VLANs, see the manual Using
HP-UX VLANs.
52 Creating Virtual Machines