United States-English |
|
|
HP Integrity Virtual Machines Version 4.0 Installation, Configuration, and Administration > Chapter 7 Creating Virtual Storage DevicesConfiguring Integrity VM Storage |
|
This section describes how to plan and set up Integrity VM storage, including the following topics: When you configure storage for a virtual machine, consider the following:
The following sections explain each of these considerations. Before you configure virtual machine storage, make sure the VM Host storage can be supported by the virtual machine.
To meet the performance requirements of applications running in guests, consider the potential performance of each type of Integrity VM storage device. Different types of virtual media have different effects on the performance of the virtual device because they communicate differently with the VM Host to complete virtual machine I/O operations. To understand the effect of the virtual device type on potential performance, consider the Integrity VM storage I/O stack illustrated in Figure 7-1. For a virtual I/O operation to be completed, it has to travel round trip between the virtual storage adapter and the VM Host physical storage device. The longer the path is, the longer it takes for virtual I/O to be completed. As shown in Figure 7-1, a virtual I/O operation must traverse each software layer in order, from where it originates to the physical media. For example, a virtual I/O operation for a Virtual FileDisk must traverse any logical volume managers the file system is on and the disk drivers that control the whole disk. Therefore, in general, the higher the virtual media is in the VM Host I/O stack, the slower it operates. The simplified I/O stack in Figure 7-1 does not completely illustrate all the choices that can affect the performance:
For further information on tuning performance at each software layer on the VM Host, see the Integrity VM white papers on the HP Documentation website at http://docs.hp.com. When you configure virtual devices, consider how the virtual media maps to the physical storage. All virtual media connects to a piece of physical media somewhere in the data center. You can help ensure the best performance by understanding the impact of the physical storage and the way I/O accesses it. It is important to know exactly where the virtual media is located on physical storage devices. With Integrity VM, a single physical disk might be sliced into logical volumes or files. Slicing up physical disks increases utilization, but it can affect the performance of the physical device. The guest OS treats the virtual disk as a whole disk, not as a part of a physical one. Over-slicing physical storage can overload a physical device's ability to handle virtual I/O that is meant for whole disks. Figure 7-2 shows a common mistake of overdriving physical storage with multiple guest OS boot disks, which are often I/O intensive. Provide workloads that the physical devices can handle for all the virtual devices layered on top of them. Use performance tools on the VM Host, like sar(1M), to see how the physical storage is keeping up with the virtual device demands. The way the virtual media I/O gets to the physical storage backing it is also an important consideration. As shown in Figure 7-1, all virtual I/O goes through a general VM Host I/O services layer that routes the virtual I/O to the correct VM Host interface driver. The interface driver then controls the physical I/O adapter to issue virtual I/O to the physical storage device. By load balancing across these physical adapters, virtual I/O bottlenecks can be eliminated at the physical hardware layers, thereby increasing performance. Load balancing can be done by using a multipathing solution on the VM Host. For help with selecting a multipath solution for a virtual media type, see Section . The performance of attached devices is largely determined by the type of physical device attached to the virtual machine. Tapes, media changers, and CD/DVD burners are inherently slow devices, not significantly impacted by the software overhead of Integrity VM. Integrity VM virtual devices support only the built-in multipathing of the HP-UX 11i v3 VM Host, which is enabled by default to provide improved performance, load-balancing, and higher availability for VMs. Currently, there are no multipath solutions supported for the attachable device types of tapes, media changers, and CD/DVD burners. There are no multiple paths inside a virtual machine to virtual devices. Multipathing is supported only on the VM Host for the following reasons:
Before you decide how to divide VM Host storage, consider the impact on the management of the storage subsystem. A VM Host administrator manages VM storage to make sure virtual media is allocated safely. This begins with understanding the VM Host I/O stack and knowing from where the virtual media is being allocated. Figure 7-3 shows an example of a VM Host I/O stack as it applies to a single LUN. The virtual machine is allocated a logical volume from the LUN for a Virtual LvDisk.
Those parts that are no longer available include the files that were on the logical volume and the whole disk that makes up part of the volume group. If any of these parts are allocated for other virtual devices, data corruption can occur on the Virtual LvDisk. Those parts that are still available for reallocation include other logical volumes that are on the disk,and files that are on those other logical volumes on the disk. These pieces can be allocated without data corruption problems because they do not overlap with the Virtual LvDisk. Beyond avoiding sub-LUN collisions, whole LUN collisions also need to be avoided. The same storage resource, virtual or attached, cannot be specified more than once to the same virtual machine. HP-UX 11i v3 supports both legacy per-path device files (for example, /dev/rdsk/c6t2d0) and agile non-path specific device files (for example, /dev/rdisk/disk16). As shown in Figure 7-4, there may be more than one legacy device file that points to the same physical storage device, while there is only one agile device file per a given physical storage device. Use of agile device files is recommended to avoid whole LUN collisions. Also, the same storage resource, virtual or attached, cannot be simultaneously shared between virtual machines, unless otherwise specifically exempted. Figure 7-5 shows a Virtual LvDisk being shared across virtual machines, which is not supported. As these examples illustrate, it is important to know where storage is allocated from to avoid data corruption with virtual machines or even the VM Host. Management utilities such as the HP System Management Homepage (HP SMH) utility allow you to track disk devices, volume groups, logical volumes, and file systems. You can use these utilities to annotate devices so that VM Host administrators can see exactly which virtual machines are using each VM Host storage device. To show each disk only once, management utilities consolidate multipath devices into one disk. When you are dividing up the disk, you should use all the parts of a single disk on a single virtual machine. Allocating different parts of the same disk to different virtual machines makes it difficult to manage and to isolate problems. Depending on how you set up storage for a virtual machine, the resulting configuration can be more or less difficult to change. The ability to change virtual media depends on the type of virtual media used. Whole disks are not normally adjustable in terms of size, but some high-end storage enclosures might permit the adjustment of a LUN without losing that LUN's data. Logical volumes are adjustable without losing any data. Finally, files can be changed easily with VM Host file system commands. No changes to any virtual media can take place on the VM Host until the virtual device that uses the media is removed from the active VM. Attempts to change virtual devices that have I/O active on them is denied by the hpvmmodify command. Once an active virtual machine is allocated virtual media for a virtual device, that virtual machine owns that media and can access it any time. VM Host administrators need to coordinate with VM guest administrators about active virtual machine changes, if the two roles are served by different individuals. This coordination might also be necessary for attached I/O devices. Once a VM Host device is attached to the virtual machine, it is controlled and owned by that virtual machine. Modifications to the attached device, like changing a tape, can be done physically without detaching the device from the guest. However, such changes might need to be coordinated with the VM Host administrator, especially if the guest administrator has no physical access to the device attached to the virtual machine. All types of virtual storage devices can be added and removed dynamically from virtual machines. That is, virtual disks, virtual DVDs, tapes, media changers, and CD/DVD burners are all hot-swappable. However, the virtual storage adapters are currently not hot-swappable. Therefore, if all the virtual storage adapters are full, you must reboot the virtual machine when you add additional devices. Some virtual devices take longer to set up than others. Whole disks are very easy to set up because they require nothing more than a character device file. This is usually created automatically when the VM Host system is booted. Logical volume creation is relatively simple. Logical volumes are used widely on HP-UX systems. The Veritas Enterprise Administrator can be used to create logical volumes. With experience, you can use logical volume commands more quickly. Creating files for virtual devices is not hard, but takes time. Files are usually placed on top of logical volumes, so you might have to create a logical volume first. To create empty files for virtual disks, use the hpvmdevmgmt command (see Section ). To create ISO files from physical CD/DVD media for use in virtual DVDs, use the mkisofs or the dd utility. For attached devices, the effort and time to set them up is spent in the creation of the HP-UX pass-through device files that point to the devices being attached. Once understood, making HP-UX pass-through device files is a fast, simple process. If device drivers for the devices are installed on the VM Host, use the hpvmdevmgmt command to quickly create the device files. Otherwise, see scsi_ctl for information about creating passthrough device files using mknod. When you add or modify a virtual device, you must enter a resource statement (rsrc). The resource statement can specify either virtual network devices (as described in Chapter 8), or virtual storage devices. This section describes how to enter resource statements for use with the hpvmcreate command (described in Chapter 3) and the hpvmmodify command (described in Chapter 9). The resource statement specifies the virtual storage device that will be seen by the virtual machine and how it maps to the physical storage device on the VM Host. The following is an outline of a complete resource statement for specifying a virtual storage device:
For examples of how to construct resource statements, see Section . All virtual storage is addressed from virtual PCI buses. The Integrity VM virtual platform contains 8 PCI buses. Each PCI bus has 8 slots into which virtual PCI adapters can be placed. One such adapter, simply called scsi, is an emulated single-ported parallel SCSI MPT storage adapter that can be used to connect 15 SCSI target devices to a guest. An AVIO storage adapter is also supported. The AVIO storage adapter supports up to 128 devices per adapter (and host) and provides higher performance and guest storage manageability. A VM Host administrator specifies this SCSI MPT adapter using the following:
A virtual SCSI MPT adapter can be added only to a virtual machine if it has a device connected to it. Not all device types are virtualized. Disk and DVD devices are virtual device types, whose virtual media comes from the VM Host. Tapes, changers, and burners are physical VM Host devices. For these attached devices, the physical SCSI IDs do not determine their place on the virtual bus. Each VM storage device is backed by some VM Host storage entity. A VM Host entity is defined on the VM Host with a system file, which is used by Integrity VM and the VM Host operating system in processing I/O to and from that storage entity. A VM Host administrator specifies these storage entities using the following specification:
Not all virtual device types support all VM Host storage types (see Section ). Complete VM storage resource statements are discussed in the next section. This section provides information about formulating complete valid resource statements for Integrity VM storage devices. To specify an Integrity VM storage device for a virtual machine, use a complete valid resource statement with the hpvmcreate or hpvmmodify command. The resource statement is a combination of the VM guest resource specification (described inSection ) and the VM Host Storage Specification (described in Section ). This section provides examples of complete resource statements for each of the following types of virtual storage devices:
A virtual machine can have up to 30 VIO devices or up to 128 AVIO devices total (number of virtual and attached devices). The maximum size of a virtual storage resource is 2 TB. The minimum size of a virtual storage resource is 512 bytes for virtual disk and 2048 bytes for a virtual DVD. Do not specify the same storage resource, virtual or attached, for the same virtual machine more than once (see Section ). Unless otherwise noted, storage resources, virtual or attached, cannot be simultaneously shared by virtual machines. All multipath products for storage resources must run on the VM Host; multipath solutions are not supported in a virtual machine. All multipath solutions used on the VM Host must be in valid supported configurations before being used for Integrity VM storage resources (see Section ). The resource statements in the following subsections do not contain VM hardware addressing. The PCI bus, PCI slot, and SCSI target numbers are optional. A Virtual Disk is an emulated SCSI disk whose virtual media comes from a VM Host disk LUN. The VM Host disk LUN is specified using a character device file. The character device file is owned by the HP-UX esdisk or sdisk driver. Virtual Disk resources cannot be shared simultaneously across active virtual machines (except in certain cluster configurations, as indicated in this manual). Only one active virtual machine at time can be given a particular Virtual Disk resource. Virtual Disk resources can be changed dynamically among active virtual machines. To prevent virtual media conflicts that can result in data corruption, a proper accounting of how the VM Host whole disks are allocated for use by Virtual Disks needs to be done, as described in Section . The agile Virtual Disk resource statement takes the form:
where /dev/rdsk/diskX is an HP-UX esdisk character device file. The legacy Virtual Disk resource statement takes the form:
where /dev/rdsk/cXtYdZ is an HP-UX sdisk character device file. Use of agile device names for configuring storage devices is highly recommended as it provides multipathing benefits. These device files can be located for a VM Host LUN using the ioscan command. These system files are installed and removed using the insf and rmsf commands, respectively. Device files are created automatically by the VM Host for any storage it identifies during boot. New devices connected or created after boot time, require the use of ioscan and insf to create the new sdisk device files. To remove old device files for storage that is no longer present, use the rmsf command. For example:
A Virtual LvDisk is an emulated SCSI disk whose virtual media is provided by a raw VM Host logical volume. To specify a VM Host logical volume, use a character device file. The character device file is owned by either LVM or VxVM. Virtual LvDisks cannot be shared simultaneously across active virtual machines. Only one active virtual machine at time can be given a particular Virtual LvDisk resource. Virtual LvDisk resources can be changed dynamically between active virtual machines (see Section ). Logical volumes can be created using the sam utility or the Veritas Enterprise Administrator. Alternatively, logical volumes can be created using the commands available with the volume manager. All logical volumes are created on whole disks. The sizes of the logical volumes come from the space available from their respective volume group types; that logical volume size can be increased without loss of data in the volume. The character devices for the logical volumes are created by their respective volume managers at the time the logical volume is created. Also to avoid file system corruptions for the VM Host and guest , use only raw logical volumes that contain no VM Host file systems and are not currently mounted on the VM Host. To prevent data corruptions, keep an account of logical volumes for Virtual LvDisks. To help with the accounting, use all logical volumes within a given volume group for a single virtual machine. When logical volumes are configured this way, you only have to keep track of the volume groups to prevent media conflicts. For information about tracking virtual media allocation, see Section . If you are using LVM, the Virtual LvDisk resource statement takes the following form:
Where /dev/vg_name/rlvol_name is an LVM character device file for rlvol_name on vg_name. To display the LVM character device file name, enter the following command:
In this example, the Virtual LvDisk resource statement is disk:scsi::lv:/dev/lvrackA/rdisk2. To use VxVM, the Virtual LvDisk resource statement takes the following form:
where /dev/vx/rdsk/dg_name/v_name is a VxVM character device file for volume v_name on disk group dg_name. To display the VxVM character device file name, enter the following command:
To use VxVM, the Virtual LvDisk resource statement is disk:scsi::lv:/dev/vx/rdsk/VxvmTest1/vxvm_2.
For information about multipath solutions for Virtual LvDisks, see Section . A Virtual FileDisk is an emulated SCSI disk whose virtual media comes from a VM Host file. The VM Host file is specified using the absolute pathname to the file. The file can be on a VxFS file system locally mounted on the VM Host. NFS file systems are not supported for Virtual FileDisks. Virtual FileDisks cannot be shared simultaneously across active virtual machiness. Only one active virtual machine can be given a particular Virtual FileDisk resource at a time. Virtual FileDisk resources can be changed dynamically between active virtual machines (see Section ). The file systems used for Virtual FileDisks need to be managed to prevent data corruptions. To help with accounting, it is recommended that all files under a given directory be used with a single virtual machine. Additionally, it might help to allocate file directories from complete logical volumes or whole disks to make the accounting even easier. For more information, see Section . The Virtual FileDisk resource statement takes the following form:
where the /pathname/file specifies the VM Host file used as virtual media. A VxFS file system can be created on top of a whole disk or logical volume. For files over 2 GB, VxFS requires the file system be marked with a largefiles option. The mkfs command can be used to create the VxFS file systems directly. Once the file systems are created, mount can be used to mount them onto the VM Host file system. Alternatively, if using logical volumes to create the file system on, the volume manager GUIs like sam can be used to create the file systems and their mount points, when the logical volumes are created. In any case, once the file system is mounted, you can create empty files for Virtual FileDisk using the hpvmdevmgmt command.
In this example, the Virtual FileDisk resource statement is disk:scsi::file:/fdev/frackA/disk1. Multipath options for a Virtual FileDisk device are discussed in Section .
A Virtual DVD is an emulated SCSI DVD-ROM with virtual media that comes from a disc inside of a CD/DVD drive on the VM Host. The VM Host CD/DVD drive is specified using an HP-UX sdisk character device file. While the Virtual DVD is read-only, the slowness of the physical VM Host CD/DVD drives prohibits them from being shared across active virtual machines. Thus only one active virtual machine at time should be given a particular Virtual DVD resource. Virtual DVD resources can be changed dynamically between active virtual machines (see Section ). Because the Virtual DVDs are read only, they do not require management to prevent conflicts writing to the device. However, to prevent sensitive information from being accessed by the wrong virtual machine, make sure you know which virtual machine currently owns the device before you load a CD/DVD. This information can be found on the VM Host with the hpvmstatus commands. The agile Virtual DVD resource statement takes the following form:
where /dev/rdisk/disk# is an HP-UX esdisk character device file for a VM Host CD/DVD drive. The legacy Virtual DVD resource statement takes the form dvd:scsi::disk:/dev/rdsk/cXtYdZ, where /dev/rdsk/cXtYdZ is an HP-UX sdisk character device file for a VM Host CD/DVD drive. Typically, the HP-UX esdisk and sdisk character files will already be created before booting the VM Host. If they are not, they can be created and managed using the ioscan, insf, and rmsf utilities. For example:
In this example, the Virtual DVD resource statement is dvd:scsi::disk:/dev/rdisk/disk7. For a virtual machine to recognize a Virtual DVD, physical media must be present inside the VM Host CD/DVD drive. If media is not added at virtual machine start time, it can be inserted into the VM Host CD/DVD drive after the virtual machine is already up. A rescan by the guest OS picks up the new media and adds the Virtual DVD to the virtual machine. If for some reason the VM Host Administrator requires control of the VM Host CD/DVD drive claimed by a virtual machine but has no media for the VM Host CD/DVD drive, then a Virtual NullDVD should be specified (see Section ). Physical media can then be inserted into the VM Host CD/DVD drive and become virtual media for a Virtual DVD using the hpvmmodify or the virtual console's insert command (see Section ). After the Virtual DVD is in the virtual machine, the VM Host CD/DVD drive is locked. The VM Host CD/DVD drive is automatically unlocked when the virtual machine is shut down. The VM Host CD/DVD can also be changed while the virtual machine is up using the virtual console's eject command. Once ejected, the Virtual DVD turns into a Virtual NullDVD and the VM Host CD/DVD drive unlocks. After you place physical media in the VM Host's CD/DVD drive, use the virtual console's insert command to turn a Virtual NullDVD back to a Virtual DVD, relocking the VM Host CD/DVD drive. Most physical VM Host CD/DVD devices on HP Integrity servers have only one path to them. As such, no multipath software is available on the VM Host for them. A Virtual FileDVD is an emulated SCSI DVD with virtual media that comes from a VM Host ISO file. The VM Host ISO file is specified using the absolute pathname to the ISO file. The file can be on a VxFS file systems locally mounted on the VM Host. NFS file systems are not supported for Virtual FileDVDs. The Virtual FileDVD resource statement takes the following form:
where the /pathname/file.ISO specifies the VM Host ISO file to use as virtual media. A VM Host ISO file can be created using the mkisofs utility or by using the dd command to copy CD/DVD media to a file. The VxFS file system should be enabled to support largefiles, because ISO files tend to be over 2 GB in size. All the ISO files that are useful to a guest OS should be placed in the same directory to take advantage of dynamic changes using the virtual console (see Section ). The ISO files should be marked with proper permissions; they must not be world writable. For example:
In this example, the Virtual FileDVD Resource Statement is: dvd:scsi::file:/var/opt/hpvm/ISOimages/hpux/0603-FOE-D1.iso. Virtual FileDVDs, like all files, can take advantage of the multipath options with which the file system is created. See Section for details. Virtual FileDVDs are read-only and are shareable across active virtual machines. Use the hpvmdevmgmt command to mark them sharable. To prevent media conflicts, you must manage Virtual FileDVDs carefully (see Section ). You can see where the file system directory where the ISO file resides using the guest's virtual console. To simplify accounting, allocate file directories from complete logical volumes or whole disks. A Virtual NullDVD is an emulated SCSI DVD-ROM with no virtual media currently present. The next media selection may come from a VM Host CD/DVD drive or VM Host ISO file, depending on how the Virtual NullDVD is configured. Once the next media is selected, the Virtual NullDVD turns into either a Virtual DVD (see Section ) or a Virtual FileDVD (see Section ) device. As such, a Virtual NullDVD is a transitory state of an empty virtual DVD type. The choice of how to configure a Virtual NullDVD depends on the access that the VM Host administrator gives to the guest administrator. Virtual DVD changes can be initiated from the virtual console (see Section ). All virtual DVD changes by the guest administrator are constrainted by the actions of the VM Host administrator. If the VM Host administrator gives access to the guest administrator to load and unload physical media on the VM Host CD/DVD drive, the Virtual NullDVD can be set up with the following form of the resource specification:
where /dev/rdisk/disk# is an HP-UX esdisk character device file that points to the VM Host CD/DVD drive. The legacy sdisk device file, /dev/rdsk/cXtYdZ, may also be used. This is the same as setting up a Virtual DVD (see Section ), except that the VM Host CD/DVD might not contain media. The media is expected to come from the guest administrator, who should have access to the VM Host to make such physical media changes. For example:
In this example, the Virtual NullDVD resource statement is dvd:scsi::null:/dev/rdisk/disk7. If the VM Host administrator does not want to give access to the VM Host CD/DVD drive to the guest administrator, you can set up a Virtual NullDVD to a file system directory containing the ISO files that the guest administrator wants to access. This resource statement would take the following form:
where /pathname is the file system directory where the ISO files are located. This is the same as setting up a Virtual FileDVD (see Section ), except that the file is not specified. By specifying a file directory, the guest administrator can choose which ISO files to use from the virtual console. The file directory must be a locally mounted VxFS file system. NFS file systems are not supported. If the ISO files are world writable, they are not available from the virtual console. For the following ISO files:
The Virtual NullDVD resource statement is dvd:scsi::file:/var/opt/hpvm/ISO-images/hpux/. You can configure the Virtual NullDVD to be sharable or have multipath options. If the Virtual NullDVD device is configured to use the VM Host CD/DVD device, it is not sharable and no multipath options are available. If the Virtual NullDVD is configured to use a file system directory, it is sharable and you can use multipath options (see Section ). To mark the directory sharable across virtual machines, use the hpvmdevmgmt command. For example:
For more information about using the hpvmdevmgmt command, see Section . Virtual NullDVDs require no additional management beyond that required for the Virtual DVD (see Section ) or Virtual FileDVD (see Section ) types they become. Integrity VM allows you to attach physical VM Host backup device types to virtual machines. The VM Host backup device types are tapes, media changers, and CD/DVD burners. These devices are specified on the VM Host using HP-UX agile esctl or legacy sctl device files. Use of the agile esctl device files are recommended, because they are per physical device not per path, as legacy sctl device files are. When using legacy sctl device files, do not specify a physical device more than once to a virtual machine through different hardware paths. Information about the use of legacy sctl device files cane be found throughout this manual. The guest OS running on the virtual machine has full control over an attached physical device. Therefore, the guest OS must support the device being attached. For a list of supported guest OS drivers, see the device's product documentation. The resource statements for attached devices take the following forms depending upon device type:
Attachable devices can be specified only as scsi. where /dev/pt/pt_* files are HP-UX esctl device files. To create an HP-UX esctl device file, follow these steps:
Attached devices cannot be shared simultaneously across active virtual machines. Only one active virtual machine can be given a particular attached device at a time. However, like virtual devices, attached devices can be attached and detached dynamically across active virtual machines (see Section ). Also, as the device is being attached to a virtual machine, it cannot be opened by the VM Host at the time of or during attachment. Because tapes, media changers, and CD/DVD burners are not virtualized, media changes with them must be done physically. Therefore, all media changes with attached devices must be done by individuals with access to that physical storage. Changes to attached devices might require the device to be unlocked from an active guest OS. Attached devices remain in the last lock state the guest OS put it in when the device is detached or the virtual machine is shut down. Empty devices are attached and are not locked. No multipath solutions are available for attached devices on the VM Host. No multipath products are supported in the virtual machine. Manage attached devices to prevent the wrong virtual machines from viewing sensitive information. You can display which virtual machines are currently using attached devices using the hpvmstatus command. |
Printable version | ||
|