Professional Documents
Culture Documents
Introduction
HP Integrity Virtual Machines (Integrity VM) allows you to create multiple guests, or virtual machines, on a single HP Integrity server or Integrity VM host system. An Integrity VM guest consists of a guest operating system, CPU resources, memory, disk, network, and a console. The Integrity VM host is a platform manager that manages all the hardware used by Integrity VMs. The Integrity VM host is an unmodified instance of HP-UX. There is a virtual console for each Integrity VM guest through which guest operators connect. The guest operating system is fully devoted to the Integrity VM and cant distinguish between virtual and physical hardware. The memory of each guest is fully isolated from other guests, and applications running on one guest are fully isolated from other guests. This results in full software isolation between Integrity VMs. There are a suite of Integrity VM commands to create, modify, and manage guests. These commands are run on the host operating system and not the guests. In this chapter I cover all aspects of beginning your work with Integrity VMs including steps to create, modify, manage, and monitor Integrity VMs as well as a command summary.
85
86
Integrity VM Commands
The suite of Integrity VM commands covered in the following table are used to configure, control, and monitor Integrity VMs. I include the Command and a description of each, and, in some cases, an example of using the command: Table 3-1
Command hpvmcreate Creates a guest configuration.
Integrity VM Commands
Description To create hpvm1 with one CPU, 500 MB of memory, 15% CPU allocation, virtual switch clan0, disk rhpvm1, and a DVD:
hpvmcreate -Phpvm1 -c1 -r500M -e15 -a network:lan::vswitch:clan0 -a disk:scsi::lv:/dev/vg01/rhpvm1 -a dvd:scsi::null:/dev
-P name -a resdef -e alloc -E alloc -r bytes hpvmmodify Rename or modify the attributes of a virtual machine. hpvmnet Configure virtual network devices. (Configure netconf on guests to setup virtual network addresses.) hpvmconsole Provides access to an Integrity VM console.
Name of Integrity VM Define resource or device CPU entitlement in percentage of physical CPUs CPU entitlement in clock cycles Memory allocation for Integrity VM
To create clan0 as a virtual switch on the host use -c: hpvmnet -c -S clan0 To start the virtual switch clan0 on the use -b: hpvmnet -b -S clan0
To start the console for hpvm1 and bypass vMP and interactive mode:
hpvmconsole -P hpvm1 -fi
-P name -f -i ^x
Name of Integrity VM to start Bypass vMP Main Menu and go directly to the console Interactive mode with -c or -f option Use control X to move between Integrity VM consoles
87
Command hpvmstart Starts an Integrity VM. hpvmstop Stops an Integrity VM. hpvmremove Permanently removes an Integrity VM configuration. hpvmstatus Provides information for one or more Integrity VMs. hpvm hpvminfo hpvmdevmgmt hpvmcollect hpvmclone Duplicates a guest configuration. hpvmmigrate Migrates a guest from one Integrity VM host to another. This command is used in conjunction with hpvmdevmgmt to manage storage
To stop hpvm2:
hpvmstop -P hpvm2
To remove hpvm2:
hpvmremove -P hpvm2
Provides an overview of the Integrity VM environment. Displays information about the Integrity VM host. Manage Integrity VM host and client devices. Describes how to collect information about Integrity VM statistics. This command copies one Integrity VM to another but does not copy some information such as the MAC address and UUID. After the cloning takes place the operating system instance can be loaded for the cloned guest. To migrate hpvm1 to host2:
hpvmmigrate -P hpvm1 -h host2
Prerequisites to using hpvmmigrate are a common LAN, identical network interfaces configurations, SAN-based boot disks, and identical fibre channel port configurations.
I will use many of these commands in the upcoming sections when creating, modifying, and performing other Integrity VM work.
88
89
14. Run hpvmmodify to add the DVD to load the guest operating system on the second Integrity VM guest and insert the HP-UX installation DVD for the Integrity VM client. 15. Run hpvmstart to start the second Integrity VM. 16. Run hpvmconsole -P hpvm2 -fi, from the host, to connect to the console for the second Integrity VM. The following steps are performed on the second Integrity VM: 17. Install Integrity VM client onto specified logical volume from DVD. 18. Start second Integrity VM to load the OS on it with the new memory assignment using hpvmstart -P hpvm2.
90
Figure 3-1
After installing the Integrity VM application on the host I view it with swlist as shown in the following listing:
[rx2600M] /roothome # swlist | grep -i integ T2767AC A.01.00 Integrity VM VMGuestLib A.01.10 Integrity VM Guest Support Libraries VMKernelSW A.01.00 Integrity VM Kernel Software VMProvider A.01.10 WBEM Provider for Integrity VM [rx2600M] /roothome #
The host rx2600M has the Integrity VM application and other components installed on it. In the following example I run hpvminfo to get information and view the Integrity VM configuration file to view the default information:
[rx2600M] /roothome # hpvminfo hpvminfo: Running on an HPVM host. [rx2600M] /roothome # cat /etc/rc.config.d/hpvmconf # ***************************************************************************** # (C) Copyright 2000-2005 Hewlett-Packard Development Company, L.P. # HPVM: $RCSfile: hpvmconf,v $ $Revision: 1.12 $ - HP CONFIDENTIAL # ***************************************************************************** # # File Description: # # Configuration values for HP Virtual Machine # # ***************************************************************************** # Name of HPVM DLKM driver (for use with kmadmin) VMMDRIVER=hpvmdvr
91
# Name of HPVM DLKM device file VMMDEV=/dev/hpvmdvr # Minor number for HPVM DLKM device file VMMMINOR=0 # Name of HPVM DLKM monitor installation device file VMMINSTALLDEV=/dev/hpvmdvri # Minor number for HPVM DLKM installation device file VMMINSTALLMINOR=0xfffff # Path to monitor image VMM_PATH=/opt/hpvm/lbin/vmm # Arguments to pass to monitor VMM_ARGS="" # Monitor emergency pool size (40 == default) VMM_MEMORY=40 # Name of vswitch driver (for use with kmadmin) VMNETDRIVER=hpvmntdvr # Name of vswitch device file VMNETDEV=/dev/hpvmntdvr # Set to 1 (0) to enable (disable) Integrity VM at boot time. HPVM_ENABLE=1 # Percentage of CPU reserved for server SVRCPURESPCT=20 # Percentage of CPU allowed for server SVRCPUALLOWPCT=20 # Set the maximum VMM driver log size (/dev/hpvmdvr), 1024kb default size VMMLOGSIZE=1024 [rx2600M] /roothome #
With Integrity VM installed and the default configuration file in place I can proceed to configure the virtual machines.
Mode PPA MAC Address ========= ====== ============== Shared N/A Shared lan0
92
# hpvmnet -b -S clan0 # hpvmnet -v Version 1.0.0 Name Number ======== ====== localnet 1 clan0 3 #
State ======= Up Up
The iocan output shows two lan interfaces. lan0 was selected as the device for which the virtual network would be created. The hpvmnet command was run with the -c option to create a new virtual network switch, -S to specify the switch name of clan0, and -n to specify lan0 or PPA 0 as the physical device to use. The hpvmnet -v command shows in the verbose output that clan0 is down so hpvmnet -b -S clan0 to start the switch with -b. The virtual switch has now been created and started, as verified by the hpvmnet -v command, and can be used by the virtual machines that Ill create in upcoming steps.