Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Integrity Virtual Machines Version 4.0 Installation, Configuration, and Administration > Chapter 3 Creating Virtual Machines

Specifying Virtual Machine Characteristics

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

When you create a new virtual machine, you specify its characteristics. Later, you can change the virtual machine characteristics.

You can set the characteristics of a virtual machine using the following commands:

  • hpvmcreate, which creates new virtual machines.

  • hpvmclone, which creates new virtual machines based on existing virtual machines.

  • hpvmmodify, which modifies existing virtual machines.

  • hpvmmigrate, which moves virtual machines from one system to another.

All of these commands accept the same options for specifying virtual machine characteristics. Table 3-2 describes each characteristic and command option.

Table 3-2 Characteristics of an Integrity Virtual Machine

Virtual Machine CharacteristicDefault SettingCommand OptionWhere Described
Virtual machine nameYou must specify a name when you create or modify the virtual machine. You cannot modify this characteristic.-P vm-nameSection 
Operating system typeIf you do not specify the operating system type, it is set to UNKNOWN.-O os_typeSection 
Virtual CPUs (vCPUs)If you omit this option when you create the virtual machine, the default is one vCPU.-c number_vcpusSection 
CPU entitlementIf you omit this option when you create the virtual machine, the default is 10%.-epercent[:max_percent]

-E cycles[:max_cycles]
Section 
MemoryIf you omit this option when you create the virtual machine, the default is 2 GB.-r amountSection 
Virtual devicesIf you omit this option when you create the virtual machine, it has access to no network and storage devices.-a rsrcSection 
Virtual machine labelIf you omit this option, the virtual machine has no label.-lvm_labelSection 
Startup behaviorIf you omit the option, it is set to auto, and the virtual machine starts when Integrity VM is started.-B start_attributeSection 
Dynamic memoryIf you omit the option, dynamic memory is not enabled for the guest.-x keyword=parameterSection 
Group with administrator or operator privilegesIf you omit this option, no group accounts have admin or oper privileges.-g [+]group[:kind]Section 
User with administrator or operator privilegesIf you omit this option, no user accounts have admin or oper privileges.-u [+]user[:kind]Section 

 

Virtual Machine Name

Use the -P vm-name option to specify the name of the new virtual machine. This option is required for the hpvmcreate command. In the following example, the new virtual machine is named compass1. On the VM Host, enter the following command:

# hpvmcreate -P compass1

The virtual machine name can be up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and period (.). The virtual machine name must not start with a dash.

Guest Operating System Type

Use the -O os_type option to specify the type of operating system that will run on the virtual machine. This option is not required.

For os_type, specify one of the following case-insensitive values:

  • hpux

    For specific information about installing HP-UX guests, see Chapter 4.

  • windows

    For specific information about installing Windows guests, see Chapter 5.

  • linux

    For specific information about installing Linux guests, see Chapter 6.

If you do not supply the operating system type, it defaults to UNKNOWN. When you install the operating system and boot the guest, this guest configuration parameter is automatically set to the appropriate operating system type.

In the following example, the virtual machine compass1 is specified as a Linux guest:

# hpvmcreate -P compass1 -O linux

When a running guest transitions from running in the machine console to running in the operating system, the operating system type is detected. If the operating system type is different from the information in the guest's configuration file, it is automatically updated to reflect the current operating system.

Virtual CPUs

Use the -c number_vcpus option to the command to specify the number of virtual CPUs (vCPUs) that the virtual machine can use. If you do not specify the number of vCPUs, the default is 1. For example, to set the new virtual machine compass1 to have two vCPUs, enter the following command:

# hpvmcreate -P compass1 -c 2

Every virtual machine has at least one vCPU. A running virtual machine cannot use more vCPUs than the number of physical CPUs on the VM Host system. (For the purpose of this discussion, the term “physical CPU” refers to a processing entity on which a software thread can be scheduled.)

However, Integrity VM allows you to create a virtual machine with more vCPUs than the number of physical CPUs on the VM Host system. Warning messages are displayed if there are not enough physical CPUs to run the virtual machine. This feature allows you to create virtual machines for future configurations. However, the virtual machine is not allowed to start on a VM Host system that does not have enough physical CPUs.

Entitlement

Use the -e or -E option to specify the virtual machine's entitlement.

Virtual machine entitlement is the minimum amount of processing power guaranteed to the virtual machine from each virtual CPU. When you create a virtual machine, you can use the -e option to specify the entitlement as a percentage, from 5% to 100%. If you do not specify the entitlement, the virtual machine receives 10% entitlement by default.

Alternatively, you can use the -E option to specify the entitlement as the number of CPU clock cycles per second to be guaranteed to each vCPU on the virtual machine.

For example, to specify an entitlement of 20% for the new virtual machine compass1, enter the following command:

# hpvmcreate -P compass1 -e 20

When the virtual machine starts, the VM Host ensures that sufficient processing power is available for every running virtual machine to receive its entitlement. For virtual machines with multiple virtual CPUs, the entitlement is guaranteed on each vCPU in the virtual machine's configuration. For example, if a virtual machine has four vCPUs, and the entitlement is set at 12%, the VM Host ensures that the equivalent of at least 48% of one physical CPU is available to that virtual machine.

To allow multiple virtual machines to run at the same time, make sure that the entitlement of each virtual machine does not prevent the others from obtaining sufficient processor resources. The sum of all entitlements across all active virtual machines cannot total more than 100% for any physical processor. If available processor resources are insufficient, the virtual machine is not allowed to boot; error messages are displayed to indicate the specific problem.

If a virtual machine is busy and sufficient processing resources are available on the VM Host system, the virtual machine can receive more than its entitlement. When there is contention for processing resources (on a VM Host system with busy virtual machines), each virtual machine is limited to its entitlement.

For help managing CPU power across multiple virtual machines, install the HP Global Workload Manager (gWLM) on the VM Host system. For more information, see HP Integrity Essentials Global Workload Manager Administrator's Guide.

Guest Memory Allocation

Use the -r amount option to specify the amount of virtual memory to be allocated to the guest. If you do not specify the memory allocation, the default is 2 GB. For example, to allocate three gigabytes to the virtual machine compass1, enter the following command:

# hpvmcreate -P compass1 -r 3G

The amount of memory to allocate is the total of the following:

  • The amount of memory required by the guest operating system.

  • The amount of memory required by the applications running on the guest.

The amount of memory should be at least the total of these two amounts. If there is not enough memory in the current configuration, Integrity VM issues a warning but allows you to create the virtual machine. This allows you to create virtual machines for future configurations. When the virtual machine is started, the VM Host checks memory resources, including those allocated to running guests, and makes sure that there is sufficient memory to run the virtual machine. In addition to the amount of memory you specify for the virtual machine, the VM Host requires a certain amount of overhead for booting the guest operating system. The amount of memory allocated to all the running guests cannot exceed the amount of physical memory minus the amount used by the VM Host for its operating system and its administrative functions. For more information about the memory requirements of the VM Host, see Section .

Guest memory allocation can be viewed and allocated dynamically (that is, without stopping the guest) by using dynamic memory parameters, as described in Section .

Automatic Cell Balancing

When creating a guest, Integrity VM determines the best fitting locality domain for the new guest when the VM Host is predominantly Cell Local Memory(CLM) or the guest has the sched_preference flag set to cell with the hpvmmodify, hpvmcreate or hpvmclone command. Integrity VM uses this setting as a guide for run-time scheduler planning as well as guest boot time CPU and memory binding. The hpvmstatus -C command provides a list of guests with their memory type.

If you do not use CLM at all, then all the guests use Interleaved Memory (ILM). If however, CLM is set, every hpvmstart command checks whether Integrity VM chooses cell or interleaved for this particular guest, and if cell is chosen, which cell it is. For example, you have an 8 GB VM Host configured with 75 percent CLM and 25 percent ILM. With two cells, each contributes 3 GB to cell local and 1 GB to interleaved. On boot, the operating system takes 1GB of the interleaved memory. If each guest takes 1 GB to start, the breakdown looks like this:

  • guest 1: cell 0 (2 GB CLM left)

  • guest 2: cell 1 (2 GB CLM left)

  • guest 3: cell 0 (1 GB CLM left)

  • guest 4: cell 1 (1 GB CLM left)

  • guest 5: cell 0 (no CLM left)

  • guest 6: cell 1 (no CLM left)

  • guest 7: interleaved (no memory left at all)

The general trend is for CLM if any cell has at least as much free space as the available ILM.

Virtual Devices

Use the -a option to allocate virtual network switches and virtual storage devices to the virtual machine. The VM Host presents devices to the virtual machine as “virtual devices.” Attached I/O devices, such as tape, DVD burner, and autochanger, are not presented as virtual devices; they are presented as direct I/O devices. You specify both the physical device to allocate to the virtual machine and the virtual device name that the virtual machine will use to access the device. The following sections provide brief instructions for creating virtual network devices and virtual storage devices.

Creating Virtual Network Devices

The guest virtual network consists of:

  • Virtual network interface cards (vNICs)

  • Virtual switches (vswitches)

For virtual machines to communicate either with other virtual machines or outside the VM Host system, each virtual machine's virtual network must be associated with a virtual switch (vswitch). If you start a virtual machine without a vswitch, the virtual machine has no network communication channel.

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 .

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. In addition, AVIO does not support localnet type vswitch, because each AVIO guest device must have a backing of the host physical device.

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 .

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.

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.

NOTE: If the guest is configured with a number of VLAN devices, but it does not have sufficient memory, some of the devices might be missing after the guest is booted. To resolve this issue, increase the size of the guest memory with the hpvmmodify -r command.

For more information about creating and managing VLANs on virtual switches, see Section .

Creating Virtual Storage Devices

When you create a virtual machine, you specify the virtual storage devices that the virtual machine uses. Virtual storage devices are backed by physical devices on the VM Host system (backing stores). The VM Host system must have sufficient physical storage for the VM Host and for all of the virtual machines.

Use the -a option to create and allocate the virtual device to the virtual machine. For example:

# hpvmcreate -a VM-guest-storage-specification:VM-Host-storage-specification

where:

  • VM-guest-storage-specification defines where and what storage is seen in the virtual machine. This is formatted as:

    device:adapter-type:hardware-address:

    You can specify one of the following devices:

    • disk

    • dvd

    • tape

    • changer

    • burner

  • adapter-type can be scsi or avio_stor on an HP-UX 11i v2 guest (0505 or later).

  • hardware-address or scsi::pcibus,pcislot:,scsitgt (optional) specifies the virtual device PCI bus number, PCI slot number, and SCSI target number. If you do not specify this information, it is generated automatically. HP recommends that you allow the hardware address to be generated automatically. To omit the hardware address, use the following format (including two colons):

    device::VM-Host-storage-specification
  • VM-Host-storage-specification defines where and how the virtual machine storage is supplied on the VM Host. Specify it using the following format:

    storage:location

    Where storage is one of the following:

    • disk

    • lv

    • file

    • null

    • attach

    And location is a VM Host system file.

NOTE: AVIO adapter type has the following restrictions:
  • Backing store (storage) can be only disk, volume (lv), null, or file.

  • There is no attached device support (burners, tapes, and changers).

  • Guest device type (device) can be only disk or DVD.

For complete information about constructing storage specifications for virtual machines, see Section .

The type of VM Host backing store can affect the performance of the virtual machine. Use the ioscan command to obtain information about the current device configuration on the VM Host system, and try to distribute the workload of the virtual machines across the physical backing stores.

When you share a physical backing storage device among virtual machines. potential conflicts are not always obvious. For example, if you use a file in a file system on /dev/disk/disk1 as a backing store, the raw device (/dev/rdisk/disk1) cannot also be used as a backing store. For more information about specifying virtual devices, see Chapter 7.

Integrity VM checks the current physical configuration when you create a virtual machine using the hpvmcreate command. If the virtual machine uses backing stores that are not available, the virtual machine is created, and warning messages provide details. If you use the hpvmstart command to start a virtual machine that requires physical resources that are not available on the VM Host system, the virtual machine is not allowed to start, and error messages provide detailed information about the problem.

After you create a virtual machine, you can use the hpvmmodify command to add, remove, or modify storage devices for the virtual machine. To add a device to an existing virtual machine, include the -a option, the same way you would on an hpvmcreate command. For example, the following command modifies the virtual machine named compass1, adding a virtual DVD device backed by the physical disk device /c1t1d2. The virtual hardware address is omitted and will be generated automatically.

# hpvmmodify -P compass1 -a dvd:scsi::disk:/dev/rdisk/disk2

You can modify storage devices while the virtual machine is running. It is not necessary to restart the virtual machine; however, it may be necessary to rescan for devices on the virtual machine.

Some devices should be restricted to use by the VM Host and to each guest (for example, boot devices and swap devices). Specify restricted devices using the hpvmdevmgmt command. For more information about sharing and restricting devices, see Section .

Any alternate boot devices should be set with the same care that you would use on a physical system. If the primary boot device fails for any reason, a virtual machine set to autoboot attempts to boot from devices in the specified boot order until either an option succeeds or it reaches the EFI Shell. Make sure that any specified boot options, and the boot order, are appropriate for the guest. For more information about the autoboot setting, see Table 3-4.

Creating Virtual Machine Labels

The -l option specifies the label of the virtual machine. The virtual machine label is a descriptive label unique to this virtual machine. The label can be useful in identifying a specific virtual machine in the hpvmstatus -V display. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). If white space is desired, the label must be quoted ("").

Specifying the Virtual Machine Boot Attribute

The -B option specifies the startup behavior of the virtual machine. The start_attr attribute can have the following (case-insensitive) values:

  • auto: Automatically start the virtual machine when Integrity VM is initialized on the host.

  • manual: Manually start the virtual machine.

If the start_attr attribute is set to auto, the virtual machine is started when Integrity VM is initialized. This is the default. This occurs when the VM Host system is booted, and when the Integrity VM software is stopped and restarted on a running VM Host. For example, when you upgrade Integrity VM to a new version on a running system, the software is started automatically. The VM Host attempts to start all virtual machines for which the attribute is set to auto. If insufficient resources exist, some virtual machines may fail to start.

If the attribute is set to manual, the virtual machine will not be started automatically when Integrity VM is initialized on the VM Host. The virtual machine can then be started manually with the hpvmstart command or through its virtual console.

This option does not set the virtual machine's console to enable booting when the virtual machine is started. This function must be set with the virtual machine's console.

The following command clones the VM oldvm, creating a new VM named newvm:

# hpvmclone -P oldvm -N newvm -b disk:scsi::0,1,2:file:/hpvm/newvm/diskA

The -b option copies the contents of oldvm virtual disk with bus, device, target triple of 0,1,2 to the file /hpvm/newvm/diskA. The boot options for the new virtual machine are automatically modified to use the specified disk as its boot disk.

The following command displays the devices on the specified virtual machine in the same format used on the command line:

# hpvmstatus -P oldvm -d [Virtual Machine Devices] [Storage Interface Details] disk:scsi::0,1,2:file:/hpvm/oldvm/disk0 disk:scsi::0,0,1:file:/hpvm/oldvm/disk1 [Network Interface Details] network:lan:0,1,0xDAA9A3B92227:vswitch:vswB [Misc Interface Details] serial:com1::tty:console

Specifying Dynamic Memory Parameters

Specifies whether the new virtual machine will use dynamic memory and the values associated with it by including the following keywords:

  • dynamic_memory_control={0|1}

  • ram_dyn_type={none|any|driver}

  • ram_dyn_min=amount

  • ram_dyn_max=amount

  • ram_dyn_target_start=amount

For more information about using dynamic memory for guests, see Section .

Configuration Limits

Table 3-3 lists the configuration limits for Integrity VM Version 4.0 (and Version 3.5).

Table 3-3 Configuration Limits

DescriptionSupport
# vCPUs/VM — Maximum (Integrity VM V3.5 Max vCPU = 4, Integrity VM V4.0 Max vCPU = 8)min (#pCPUs, Max vCPU)
# vCPUs/pCPU — Maximum20
# VMs per VM Host — Maximummin (20 * pCPUs, 254)
# pCPUs in VM HostHP-UX limit
Memory per VM — Minimum (11i v2 HP-UX)1 GB
Memory per VM — Minimum (11i v3 HP-UX)1.5 GB
Memory per VM — Maximum (HP-UX)64 GB
Memory per VM — Minimum (Windows)1 GB
Memory per VM — Maximum (Windows)64 GB
Memory per VM — Minimum (Linux (RH))512 MB
Memory per VM — Maximum (Linux (RH))64 GB
Memory per VM — Minimum (Linux (SLES))512 MB
Memory per VM — Maximum (Linux (SLES))64 GB
# virtual SCSI devices / VM — Maximum128 AVIO + 30 VIO
# virtual NICs / VM — Maximum10
# virtual switches — Maximum50
# virtual NICs / vswitch64
# virtual AVIO storage devices / VM — Maximum128
# file backing store devices / VM — Maximum30
# virtual AVIO storage devicesVM Maximum 128
# file backing store devices VM Maximum 30
Maximum size of backing store (disk, lvol, file)> 2 TB

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.