United States-English |
|
|
HP Integrity Virtual Machines Version 4.0 Installation, Configuration, and Administration > Chapter 8 Creating Virtual NetworksCreating and Managing vswitches |
|
The following sections describe how to create, modify, delete, and manage vswitches. To allow guests to access network devices, you must create vswitches on the VM Host. This section describes how to create a vswitch and verify that it has started. To create vswitches, use the hpvmnet command. The following is the basic format of the hpvmnet command to create a vswitch:
This command format includes the following options:
The hpvmnet command also allows you to display and manage the vswitches on the VM Host. Table 8-1 describes the options to the hpvmnet command. Table 8-1 Options to the hpvmnet Command
The following command creates a virtual switch called clan1 that is associated with lan1. The second hpvmnet command displays information about the clan1 vswitch.
The physical point of attachment (PPA) for clan1 is 1. Two vswitches (localnet and lan0) communicate over the localnet. To boot a vswitch, enter the hpvmnet command with the -b option. For example, to boot the vswitch named clan1, enter the following command:
Note that clan1 is associated with the network interface on the VM Host that has MAC address 0x00306e3977ab (this is not the MAC address of any virtual machine connected to this vswitch). For information about connecting vswitches to guests, see Chapter 3. For information about modifying virtual networks, see Section : “Configuring Guest Virtual Networks”. You can create multiple vswitches associated with the same host physical NIC. However, you cannot boot (hpvmnet —b) more than one of them at the same time. Virtual network communication may be limited to virtual machines on the VM Host system through the use of vswitches that are not connected to a physical NIC. A virtual network such as this is called a local virtual network or simply a local network (localnet). To create a local network, a vswitch must first be created using hpvmnet without the -n option so that it is not connected to the physical network. For example, to create a local network vswitch named clan0, enter the following commands:
All vNICs connected to that vswitch will then be on the same local network. The VM Host does not communicate on local networks. If you omit the -n option when you create a vswitch, the default is to use localnet. The localnet vswitch can be used as a local network and vNICs can be specified for a guest. For example:
This command adds a vNIC to the guest compass, which can be used to communicate with any virtual machine connected to the localnet vswitch. You can define a vNIC for a guest using the hpvmmodify command. For example, the following command adds a vNIC to the guest named compass1.
The guest configuration file /var/opt/hpvm/guests/guestname/vmm_config.current contains an entry for each guest virtual network device. When the guest is booted (through the hpvmstart or hpvmconsole command), the guest LAN is configured as specified in the LAN entry in the guest configuration file. For example:
The virtual network entry in the guest configuration file includes the guest information on the left side of the equal sign (=), and VM Host information on the right. The data about the guest LAN example includes the following information:
Entering the lanscan command on the guest compass1 results in the following:
The hardware path from the output of lanscan on the guest matches the path in the guest configuration file. The Station Address in the lanscan output also matches the guest virtual MAC address in the guest configuration file. You can use the -C option to change the physical network interface card (pNIC) the guest has in use. For example, enter the lanscan command, as follows:
If lan0 goes down, enter the following command to swap to use lan1:
Using the -N option with the -C option creates a new vswitch based on the changed vswitch information. For example, the following command sequence displays the current vswitch (vmvlan), modifies the vswitch to specify connection to lan1, and creates a new vswitch named clnvlan. The final command displays information about the new vswitch.
Note that only the configured VLAN port identification data is copied to the new vswitch. Use this hpvmnet command option when you have a vswitch with numerous VLAN ports. This process makes it unnecessary to reenter all the port data for each new vswitch. To delete a vswitch, first stop the vswitch using the —h option to the hpvmnet command. Then delete the vswitch using the -d option to the hpvmnet command. For example, the following command shows the error that prevents you from deleting an active vswitch (clan1):
The following example uses the hpvmnet command to halt the vswitch and then to delete it. Both commands require you to confirm the action. The third command displays the current vswitches (without clan1).
The default command function (if you press Enter) is to not perform the function of the command. To perform the command function, enter y. In the case of commands where a confirmation is required, such as the hpvmnet -h command, you can include the —Q option to override the confirmation process. This is useful in scripts and processes that are not interactive. For example, to stop a vswitch (clan1) without requiring confirmation from the user, enter the following commands:
When an active vswitch is deleted, the VM Host automatically determines that the vswitch is gone. When the vswitch is recreated, the guest network automatically becomes functional again. To change the vswitch to use another pNIC on the VM Host (for example, to change from lan0 to lan1), follow this procedure:
Virtual switches (vswitches) start automatically when the VM Host system is started. You can start the vswitch manually using the —b option to the hpvmnet command. For example, the following command boots the vswitch named clan1:
You must restart a vswitch after the following events:
Use the hpvmnet -h command to halt a vswitch. For example:
Auto Port Aggregation (APA) can be configured on the VM Host to provide a highly available LAN for the vswitch (APA in active/passive mode) or to increase the bandwidth of the vswitch LAN (APA active/active mode). Before you stop APA, halt the vswitches associated with it. If you do not bring down the vswitch first, the hpvmnet command reports an incorrect MAC address for the vswitch. |
Printable version | ||
|