You are on page 1of 8

Chapter 3

HP Integrity Virtual Machines

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

Chapter 3 HP Integrity Virtual Machines

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 modify hpvm1 to add a specific DVD:


hpvmmodify -P hpvm1 -a dvd:scsi::disk:/dev/rdsk/c0t0d0

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

Integrity VM Commands Description To start hpvm1:


hpvmstart -P hpvm1

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

To view the version number of Integrity VM and a summary output:


hpvmstatus -v

To view the verbose status of guests:


hpvmstatus -V

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

Chapter 3 HP Integrity Virtual Machines

Creating a Host and Integrity VM Clients: Steps


The best way to understand Integrity VM is through example. The following are the steps Ive performed to create two Integrity VMs: 1. Install the host HP-UX 11i Operating Environment. Only the HPUX foundation operating environment is required but I have Mission Critical on my host in the example. 2. Install the Integrity VM software on the host and verify its installation. 3. View /etc/rc.config.d/hpvmconf to see the default configuration file. 4. Run ioscan and hpvmnet -c (to create virtual network,) hpvmnet -b (to turn on virtual network,) and hpvmnet -v (to view virtual network to confirm its on.) 5. Create logical volumes for the Integrity VM clients. You can also create flat files for the Integrity VM clients. Be sure not to leave the logical volumes used to boot the clients in /etc/fstab. 6. Run hpvmcreate to create the first Integrity VM. All hpvm commands are run on the host, not on the Integrity VM clients. 7. Run hpvmmodify to add the DVD to load the guest operating system on the first Integrity VM guest and insert the HP-UX installation DVD for the Integrity VM client. 8. Run hpvmstart -P hpvm1 to start the first Integrity VM. 9. Run hpvmconsole -P hpvm1 -fi, from the host, to initiate Integrity VM console to the first Integrity VM. The following steps are performed on the first Integrity VM: 10. Install Integrity VM client onto specified logical volume from DVD. 11. Run hpvmstatus -v from the host to see the first client running. 12. Run hpvmmodify to remove the DVD and null from the first Integrity VM client. The following steps are performed on the host: 13. Create the second Integrity VM client with hpvmcreate.

Creating a Host and Integrity VM Clients: Steps

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.

Install Integrity VM Software on Host


The host HP-UX operating system is first installed on the server. Chapter 3 covers the details of installing HP-UX. The host is set up in the same manner as any server; however, its purpose is to act as the host for Integrity VM clients only and should not be used for other applications. Once HP-UX is installed on the host the Integrity VM application is then installed as shown in the following screen shot:

90

Chapter 3 HP Integrity Virtual Machines

Figure 3-1

Installing Integrity VM Software

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

Configure and Start a Virtual Network

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.

Configure and Start a Virtual Network


The first step is to run ioscan and the hpvmnet command to gather information about network interfaces, configure a virtual network, and enable the virtual network as shown in the following commands all run on the host:
# ioscan -f | grep lan lan 0 0/0/3/0 Server Adapter lan 1 0/1/2/0 # hpvmnet -c -S clan0 -n0 # hpvmnet -v Version 1.0.0 Name Number ======== ====== localnet 1 clan0 3 intl100 igelan CLAIMED CLAIMED INTERFACE INTERFACE Intel PCI Pro 10/100Tx HP PCI 1000Base-T Core

State ======= Up Down

Mode PPA MAC Address ========= ====== ============== Shared N/A Shared lan0

IP Address =============== N/A 192.6.175.13

92

Chapter 3 HP Integrity Virtual Machines

# hpvmnet -b -S clan0 # hpvmnet -v Version 1.0.0 Name Number ======== ====== localnet 1 clan0 3 #

State ======= Up Up

Mode PPA ========= ====== Shared Shared lan0

MAC Address ============== N/A 0x00306ef3ab5c

IP Address =============== N/A 192.6.175.13

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.

Create Logical Volumes For Guests


The volumes used for the guest operating systems can be logical volumes or flat files. I used SAM to create a new physical volume and two logical volumes of 16 GB (although if youre loading MC OE you may want to have more than 16 GB) as shown in the following figure:

You might also like