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: 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. The characteristics of a virtual machine are listed in Table 3–1.

You can create a virtual machine using the following commands:

  • hpvmcreate

  • hpvmclone

After you create a virtual machine, you can modify it using the the hpvmmodify command. All of these commands accept the same options for specifying virtual machine characteristics. Each option and characteristic is described in more detail later in this chapter.

Table 3-1 Characteristics of an Integrity Virtual Machine

Command OptionVirtual Machine CharacteristicWhere Described
-P vm-nameVirtual machine name. You must specify a name when you create or modify the virtual machine. You cannot modify this characteristic.“Virtual Machine Name”
-O os_typeOperating system. If you do not specify the operating system type, it is set to UNKNOWN. “Guest Operating System”
-c number_vcpusVirtual CPUs (vCPUs). If you omit this option when you create the virtual machine, the default is one vCPU.“Virtual CPUs”
-e percent

-E cycles
CPU entitlement. If you omit this option when you create the virtual machine, the default is 10%.“Entitlement”
-r amountMemory. If you omit this option when you create the virtual machine, the default is 2 GB.“Guest Memory Allocation”
-a rsrcVirtual devices. If you omit this option when you create the virtual machine, it has access to no network and storage devices.“Virtual Devices”

 

Virtual Machine Name

Use the -p vm-name option to the hpvmcreate command to specify the name of the new virtual machine. This option is required. In the following example, the new virtual machine is named compass1:

# hpvmcreate -P compass1

The virtual machine name can be up to 256 alphanumeric characters. To provide remote console access to the guest, its name must be a legal UNIX account name (no more than eight characters, where the colon (:) and newline (\) characters are not valid). See password(1M) for more information about HP-UX account names. For more information about setting up remote console access to the guest, see “Using the Virtual Console”.

Guest Operating System

Use the -o os_type option to the hpvmcreate command 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:

  • hpux

  • windows

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

In the following example, the virtual machine compass1 is specified as an HP-UX guest:

# hpvmcreate -P compass1 -o hpux

For more information about creating HP-UX guests, refer to Chapter 4.

For more information about creating Windows guests, refer to Chapter 5.

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 hpvmcreate 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 virtual machine cannot use more than 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.)

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 dislayed 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 is booted, the VM Host ensures that sufficient processing power is available for each running virtual machine to receive its entitlement. For virtual machines with multiple virtual CPUs, the entitlement is guaranteed on all the vCPUs 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 a physical CPU's processing power is available to that virtual machine. As many physical processors as the virtual machine has vCPUs can contribute to the total processing power of the 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 power is available on thehost system, the virtual machine can receive more than its entitlement. When there is contention for processing power (on a VM Host system with busy virtual machines), each virtual machine is limited to its entitlement.

Guest Memory Allocation

Use the -r amount option to the hpvmcreate command to specify the amount of virtual memory (in either gigabytes or megabytes) 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. For example, the HP-UX 11i v2 operating system requires 1 GB of memory.

  • 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 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 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 “Installation Requirements”.

Virtual Devices

Use the -a option to the hpvmcreate command to allocate network and storage devices to the virtual machine. The VM Host presents the devices to the virtual machine as “virtual 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. A vswitch functions like a physical network interface card (pNIC), accepting network traffic from one or more virtual machines and directing network traffic to an associated port. A vswitch can be associated with a VM Host pNIC, or it can be local to the virtual machines on the VM Host and provide a dedicated network among guests.

Integrity VM always creates a vswitch named localnet. This network is not associated with a pNIC. It is used only for communication between the guests running on the same VM Host. The localnet vswitch does not use a name server or router, and the VM host does not access the localnet vswitch. For more information, see “Local Networks”.

You can create vswitches any time, 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. For example:

# hpvmnet -c -S vswitch-name -n nic-id

where:

  • vswitch-name is the name you assign to 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

To allocate the vswitch to the virtual machine named compass2, use the —a option to the hpvmcreate command. For example:

# hpvmcreate -P vm-name -a network:lan:[hardware-address]:vswitch:vswitch-name

where hardware-address (optional) the vNIC PCI bus number, device, and MAC address. This portion of the command is optional. If you omit the specific bus, device, and MAC address information, it is generated for you. HP recommends that you allow this information to be automatically generated. In this case, simply omit the hardware-address value from the command line. For example:

# hpvmcreate -P  -a network:lan::vswitch:vswitch-name

For more information about using the hpvmnet command, see “Creating Vswitches”.

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.

With Integrity VM A.02.00 and later, you can create virtual LANs (VLANs), which 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 VLANs, see the manual Using HP-UX VLANs.

For more information about creating and managing vswitches, see Chapter 7.

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. The VM Host system must have sufficient physical storage for the VM Host and for all of the virtual machines.

When you create a virtual machine with the hpvmcreate command, you can specify both the virtual devices that the virtual machine recognizes and the physical backing stores on the VM Host system. Use the -a option to create and allocate the virtual device to the virtual machine. For example:

# hpvmcreate -a device-type:adapter-type:[hardware-address]:storage-type:device

where:

  • device-type is the type of virtual device that the virtual machine will use. This can be one of the following:

    • disk

    • dvd

    • tape

    • changer

    • burner

  • adapter-type is always scsi.

  • hardware-address (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:

    # hpvmcreate -a device-type:adapter-type::storage-type:device
  • storage-type indicates the type of physical backing store:

    • disk

    • lv

    • file

    • null

    • attach

  • device is the specific physical device ID (for example, /dev/rdsk/c4t3d2). To display the device IDs on your VM Host system, enter the ioscan command.

The physical backing store that you associate with a virtual device 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/dsk/c8t2d0 as a backing store, the raw device (/dev/rdsk/c8t2d0) cannot also be used as a backing store. For more information about specifying virtual devices, see “Creating Virtual Storage Devices”.

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 exising 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::/c1t1d2

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 “Restricting VM Host Devices”.

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-2.

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