Application Notes Usage and best practices for Device Mapper Multipath with Xen enabled virtual machines for HP StorageWorks Disk Arrays Part number: 5697-7828 First edition: October 2008
Legal and notice information © Copyright 2008 Hewlett-Packard Development Company, L.P.
Document overview This document provides best practices for configuring the HP StorageWorks Disk Arrays in Xen environment. Intended audience This document is intended for users involved in configuring guest operating systems in Xen environment with HP StorageWorks Disk Arrays.
Xen overview Figure 1 Xen architecture Domain0 Domain0 (Dom0) is the operating system installed on the physical hardware which provides host environment to the virtual machine. It is a special privileged domain, used to manage virtual machines. It provides the administrator a graphical and command line environment to manage the virtual machines. The xen daemon monitors the configuration information about the virtual machines and controls their operations.
• Xen enabled operating system (RHEL 5 Update 2 or later) must be booted up on bare metal hardware which is also known as Dom0, and the xen daemon (xend) must be running. • Virt-manager tools for managing the virtual machine. • Ensure that the multipath devices are created for devices on SAN. NOTE: For installing Dom0 on SAN Boot environment, see the Booting Linux x86 and x86_64 systems from a Storage Area Network with Device Mapper Multipath document available at http://h18006.www1.hp.
Figure 2 Locating installation media screen 7. 6 Assign the storage space.
Figure 3 Assigning storage space screen For more information on preparing disks, see Preparing disks for DomU. 8. Select the Virtual Network type and click Next. 9. Allocate the virtual processors and the memory required, and click Next. 10. Click Finish to create and install the virtual machine.
Figure 4 Ready to begin installation screen Preparing disks for DomU The storage in the DomU is represented as virtual block devices (VBDs). The storage presented to DomU can be a raw image file, physical disk partitions or LVM volumes. Preparing physical disks for installing Xen virtual machine 1. Select the Device Mapper multipath device for installing the virtual machine. Example: /dev/mapper/mpath0 2. Provide multipath device file location at Normal Disk Partition text field as shown in Figure 3.
Advantages: 1. Provides flexibility for dynamic resizing of the volumes Preparing Xen disk image files for installing Xen virtual machine 1. Create a file system on the multipath device to be used for the Xen disk image file. # mkfs -t ext3 /dev/mapper/mpath8 2. Mount the multipath device # mount /dev/mapper/mpath8 /home/Xenimage 3. Provide the location of the mount point and disk image file name at File Location text field as shown in Figure 3. Advantages: 1.
Figure 5 Virtual Machine Manager 4. 5. 6. 10 Select Storage Device as the hardware type and click Forward. Select the storage type you want to present to the virtual machine. To assign a raw disk or a logical volume, select Normal Disk Partition and to assign disk image file, select Simple File. Select the device type as Virtual disk and click Forward.
Figure 6 Assigning storage space screen 7. Click Finish and the new storage device will be added to the virtual machine. The mapped devices are presented to the guest operating system as a virtual block device. Example: ~foo# cat /proc/partitions major minor #blocks name 202 0 71652960 xvba 202 1 1052226 xvba1 202 2 5116702 xvba2 202 3 65480940 xvbb iSCSI devices on virtual machines iSCSI devices can be presented to the virtual machines directly.
Recovery from all path failure condition When all paths to the LUN which is used for installing virtual machine fails, the root file system will be mounted with read-only permission. Recovery process depends on the type of storage used for installing Xen virtual machine. Physical disks or logical volumes for installing Xen virtual machine Rebooting the virtual machine will remount the root file system with read/write permissions.