United States-English |
|
|
HP Integrity Virtual Machines Version 4.0 Installation, Configuration, and Administration > Chapter 3 Creating Virtual MachinesSpecifying Virtual Machine Characteristics |
|
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:
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
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:
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. 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: 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:
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. 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:
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. 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:
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. 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:
The amount of memory to allocate is the total of the following:
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 . 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:
The general trend is for CLM if any cell has at least as much free space as the available ILM. 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. The guest virtual network consists of:
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:
To start the vswitch, enter the hpvmnet -b command. For example:
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:
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:
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. For more information about creating and managing VLANs on virtual switches, see Section . 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:
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.
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. 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 (""). The -B option specifies the startup behavior of the virtual machine. The start_attr attribute can have the following (case-insensitive) values:
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:
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:
Specifies whether the new virtual machine will use dynamic memory and the values associated with it by including the following keywords:
For more information about using dynamic memory for guests, see Section . Table 3-3 lists the configuration limits for Integrity VM Version 4.0 (and Version 3.5). Table 3-3 Configuration Limits
|
Printable version | ||
|