Using Xen Full Virtualization to Run Windows on RHEL 5

From Techotopia
Jump to: navigation, search
PreviousTable of ContentsNext
Installing and Configuring RHEL 5 Xen VirtualizationManaging and Monitoring RHEL 5 based Xen Guest Systems


Purchase and download the full PDF and ePub versions of this RHEL 5 eBook for only $9.99
PDF/ePub edition contains 40 chapters and over 250 pages.
RHEL 6 Edition of this ebook now also available for purchase. Learn more.

Buy eBook


In this chapter of RHEL 5 Essentials we will continue to explore Xen virtualization on Red Hat Enterprise Linux 5 systems. In the chapter entitled Installing and Configuring RHEL 5 Xen Virtualization, the difference between full-virtualization and para-virtualization was explained together with a tutorial on how to create and run a para-virtualized virtual machine containing another Linux distribution as a guest operating system.

The goal of this chapter is to provide a tutorial that takes the reader through the steps involved in using Xen to run Windows as a guest operation system on an RHEL 5 system using full-virtualization.

This chapter assumes that a Xen-enabled kernel and associated tools are installed and that the Xen kernel is the currently running kernel. If this is not the case, refer to Installing and Configuring RHEL 5 Xen Virtualization before proceeding with the remainder of this chapter.




Hardware Requirements for Xen-based Full Virtualization on RHEL

Although this topic was covered in the preceding chapter, the importance of having the correct hardware support is such that it warrants a second mention. Xen based full-virtualization is only supported on processors with Intel-VT or AMD-V support.

The presence of appropriate CPU support can be verified using one the following commands depending on the brand of CPU:

For Intel CPUs:

grep vmx /proc/cpuinfo

For AMD CPUSs:

grep svm /proc/cpuinfo

If no output appears from the appropriate command then either your CPU does not support full-virtualization or support is available but turned off in the BIOS. In the latter instance, reboot your system and enter the system BIOS settings to verify that it is enabled.

Preparing the Guest OS Installation Media

Unlike para-virtualization, full virtualization allows a guest operating system to be installed either from a local ISO image, a mounted installation media (such as CDROM or DVD drive) or via PXE based network boot. If you have the required Windows installation media available, insert it into the physical disk drive of your RHEL 5 system. Alternatively, download the ISO installation image from your operating system provider and make a note of its location on the RHEL file system.


Creating the New Virtual Machine

Arguably the most convenient way to create a virtual machine is using the Virtual Machine Manager tool which may be launched using the desktop’s Application -> System Tools -> Virtual Machine Manager menu option.

Once launched the main window will appear listing Domain-0 (the host system) and any previously created virtual machines:


A list of Xen based virtual machines shown in the virt-manager window


Within this dialog select the top entry in the list representing the host machine (in the above figure this is the line highlighted in blue and named rhel5) and click on the New button located in the bottom right of the window. This will launch the New Virtual Machine wizard which will appear with a welcome screen. Click the Forward button to proceed to the Virtual Machine Name screen. In the text box provided, enter an appropriate name for the new virtual machine. For the purposes of this tutorial we will use the name WindowsVM. Click Forward to proceed.

Configuring Xen Virtualization Method

The next screen displayed by the new virtual machine will provide the option to choose the method of virtualization. Since we plan to install an unmodified guest in the form of Windows we will need to select the Full Virtualization method. If this option is disabled the most likely cause is that either the system CPU does not include the required virtualization features, or that they are currently disabled in the BIOS. Assuming the option is not disabled, select Full Virtualization and ensure that Xen is selected from the Hypervisor menu:


Selecting Xen Full Virtualization for the RHEL Windows guest OS


Once the new VM is configured to use Xen full virtualization, click Forward to proceed.

Selecting Installation Media

The Installation Method screen allows the installation media for the guest operating system to be specified in the form of a CDROM/DVD device, an ISO image of a CDROM or DVD or a network server configured for PXE network boot installation. Select the appropriate option and then choose the operating system type and variant. For the purposes of this tutorial we will be installing Windows 7. At the time of writing, however, Windows 7 is not listed as an option in the wizard. We can, however, safely select Windows Vista instead:


Specifying the guest OS installation media and OS type for Xen VM


On the following screen, specify the path to the ISO image, optical media device or network PXE server depending on the selection made and click the Forward button to proceed.

Configuring Storage

If you have a disk partition available for the guest operating system, enter the device path into the Block device (partition) text field. Otherwise, select File (disk image), enter the path of the file to be created (or accept the default provided) and select a file size (keeping in mind the space requirements for your chosen guest OS). Having defined these settings, click the Forward key once more to proceed.

Configuring Network Access

On the Connect to network host select Shared physical device and click Forward. This will configure the guest OS to share the host operating system's network connection. To use Network Address Translation (NAT) when accessing the external network (i.e the network to which the host is connected) select the Virtual Network option.

29.8 CPU and Memory Allocation

The next screen allows configuration of memory and CPU usage of the guest virtual machine:


Allocating memory and CPU resources to the RHEL based Xen guest


Select a memory setting that allows sufficient memory for the host system and the guest system to co-exist. If you plan to run multiple guest operating systems, be sure to allow for this.

On a multi-CPU or multi-core CPU environment it is possible to define how many CPUs the guest OS will have access to. Note that whilst it is possible to assign more virtual CPUs than the number physical CPUs doing so is not recommended. The final screen displays a summary of the configuration:


The RHEL 5 new Xen guest summary screen


Creating and Starting the New Xen Virtual Machine

Clicking on the Finish button will start the virtual machine creation process. This involves configuring the storage and accessing the installation media. A dialog containing a progress bar will provide a status update on the creation process as it is performed. Once the virtual machine has been created the virtual machine will be launched and appear the virtual machine console window. From this point on simply follow the installation process for the guest operating system:


Windows 7 running in full virtualization as an RHEL 5 Xen guest


Purchase and download the full PDF and ePub versions of this RHEL 5 eBook for only $9.99
PDF/ePub edition contains 40 chapters and over 250 pages.
RHEL 6 Edition of this ebook now also available for purchase. Learn more.

Buy eBook



PreviousTable of ContentsNext
Installing and Configuring RHEL 5 Xen VirtualizationManaging and Monitoring RHEL 5 based Xen Guest Systems