Appendix A. Lab 1
Xen Guest Installation
Goal: To install RHEL 3, 4, or 5 and Windows XP Xen guests.
Prerequisites: A workstation installed with Red Hat Enterprise Linux 5.0 with Virtualization component.
For this lab, you will configure and install RHEL 3, 4, or 5 and Win XP Xen guests using various virtualization tools.
Lab Sequence 1: Checking for PAE support
You must determine whether your system has PAE support. Red Hat Virtualization supports x86_64 or ia64 based CPU architectures to run para-virtualized guests. To run i386 guests the system requires a CPU with PAE extensions. Many older laptops (particularly those based on Pentium Mobile or Centrino) do not support PAE.
To determine if your CPU has PAE support, type:
grep pae /proc/cpuinfo
The following output shows a CPU that has PAE support. If the command returns nothing, then the CPU does not have PAE support. All the lab exercises require a i386 CPU with PAE extension or x86_64 or ia64 in order to proceed.
flags :
fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush dts acpi
mmx fxsr sse sse2 ss tm pbe nx up est tm2
Lab Sequence 2: Installing RHEL5 Beta 2 Xen para-virtualized guest using virt-install.
For this lab, you must install a Red Hat Enterprise Linux 5 Beta 2 Xen guest using virt-install.
To install your Red Hat Enterprise Linux 5 Beta 2 Xen guest, at the command prompt type: virt-install.
When asked to install a fully virtualized guest, type: no.
Type rhel5b2-pv1 for your virtual machine name.
Type 500 for your RAM allocation.
Type /xen/rhel5b2-pv1.img for your disk (guest image).
Type 6 for the size of your disk (guest image).
Type yes to enable graphics support.
Type nfs:server:/path/to/rhel5b2 for your install location.
The installation begins. Proceed as normal with the installation.
After the installation completes, type /etc/xen/rhel5b2-pv1, and make the following changes: #vnc=1#vncunused=1sdl=1
Use a text editor to modify /etc/inittab, and append this to the file: init 5.#id:3:initdefault:id:5:initdefault:
Lab Sequence 3: Installing RHEL5 Beta 2 Xen para-virtualized guest using virt-manager.
For this lab, you will install a Red Hat Enterprise Linux 5 Beta 2 Xen paravirtualized guest using virt-manager.
To install your Red Hat Enterprise Linux 5 Beta 2 Xen guest, at the command prompt type: virt-manager.
On the Open Connection window, select Local Xen host, and click on Connect.
Start Red Hat's Virtual Machine Manager application, and from the File menu, click on New.
Click on Forward.
Type rhel5b2-pv2 for your system name, and click on Forward.
Select Paravirtualized, and click Forward.
Type nfs:server:/path/to/rhel5b2 for your install media URL, and click Forward.
Select Simple File, type /xen/rhel5b2-pv2.img for your file location. Choose 6000 MB, and click Forward.
Choose 500 for your VM Startup and Maximum Memory, and click Forward.
Click Finish.
The Virtual Machine Console window appears. Proceed as normal and finish up the installation.
Lab Sequence 4: Checking for Intel-VT or AMD-V support
For this lab, you must determine if your system supports Intel-VT or AMD-V hardware. Your system must support Intel-VT or AMD-V enabled CPUs to successfully install the fully virtualized guest operating systems. Red Hat Virtualization incorporates a generic HVM layer to support these CPU vendors.
To determine if your CPU has Intel-VT or AMD-V support, type the following command: egrep -e 'vmx|svm' /proc/cpuinfo
The following output shows a CPU that supports Intel-VT:
.flags :
fpu tsc msr pae mce cx8 apic mtrr mca cmov pat clflush dts acpi mmx fxsr sse
sse2 ss ht tm pbe constant_tsc pni monitor vmx est tm2 xtpr
If the command returns nothing, then the CPU does not support Intel-VT or AMD-V.
To determine if your CPU has Intel-VT or AMD-V support, type the following command:
cat /sys/hypervisor/properties/capabilities
The following output shows that Intel-VT support has been enabled in the BIOS. If the command returns nothing, then go into the BIOS Setup Utlility and look for a setting related to 'Virtualization', i.e. 'Intel(R) Virtualization Technology' under 'CPU' section on a IBM T60p. Enable and save the setting and do a power off to take effect.
xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p
Lab Sequence 5: Installing RHEL5 Beta 2 Xen fully virtualized guest using virt-install.
For this lab, you will install a Red Hat Enterprise Linux 5 Beta 2 Xen fully virtualized guest using virt-install:
To install your Red Hat Enterprise Linux 5 Beta 2 Xen guest, at the command prompt type: virt-install.
When prompted to install a fully virtualized guest, type yes.
Type rhel5b2-pv2 for your virtual machine name.
Type 500 for your memory allocation.
Type /xen/rhel5b2-fv1.img for your disk (guest image).
Type 6 for the size of your disk (guest image).
Type yes to enable graphics support.
Type /dev/cdrom for the virtual CD image.
The VNC viewer appears within the installation window. If there is an error message that says “main: Unable to connect to host: Connection refused (111)”, then type the following command to proceed: vncviewer localhost:5900. VNC port 5900 refers to the first Xen guest that is running on VNC. If it doesn't work, you might need to use 5901, 5902, etc.
The installation begins. Proceed as normal with the installation.
Lab Sequence 6: Installing RHEL5 Beta 2 Xen fully virtualized guest using virt-manager.
For this lab, you will install a Red Hat Enterprise Linux 5 Beta 2 Xen fully virtualized guest using virt-manager:
To install your Red Hat Enterprise Linux 5 Beta 2 Xen guest, at the command prompt type: virt-manager.
On the Open Connection window, select Local Xen host, and click on Connect.
Start Red Hat's Virtual Machine Monitor application, and from the File menu, click on New.
Click on Forward.
Type rhel5b2-fv2 for your system name, and click on Forward.
Select Fully virtualized, and click Forward.
Specify either CD-ROM or DVD, and enter the path to install media. Specify ISO Image location if you will install from an ISO image. Click Forward.
Select Simple File, type /xen/rhel5b2-fv2.img for your file location. Specify 6000 MB, and click Forward.
Choose 500 for your VM Startup and Maximum Memory, and click Forward.
Click Finish .
The Virtual Machine Console window appears.
Proceed as normal and finish up the installation.
Lab Sequence 7: Installing RHEL3 Xen fully virtualized guest using virt-manager.
For this lab, you will install a Red Hat Enterprise Linux 3 Xen guest using virt-manager:
The same instructions for Lab Sequence 6 applies here.
Lab Sequence 8: Installing RHEL4 Xen fully virtualized guest using virt-manager
For this lab, you will install a Red Hat Enterprise Linux 4 Xen guest using virt-manager :
The same instructions for Lab Sequence 6 applies here.
Lab Sequence 9: Installing Windows XP Xen fully virtualized guest using virt-manager.
For this lab, you will install a Windows XP Xen fully virtualized guest using virt-manager:
To install your Red Hat Enterprise Linux 5 on your Windows XP host, at the command prompt type: virt-manager.
On the Open Connection window, select Local Xen host, and click on Connect.
Start Red Hat's Virtual Machine Manager application, and from the File menu click on New.
Click on Forward.
Type winxp for your system name, and click on Forward.
Select Fully virtualized, and click Forward.
Specify either CD-ROM or DVD, and enter the path to install media. Specify ISO Image location if you will install from an ISO image. Click Forward.
Select Simple File, type /xen/winxp.img for your file location. Specify 6000 MB, and click Forward.
Select 1024 for your VM Startup and Maximum Memory, and select 2 for VCPUs. Click Forward .
Click Finish.
The Virtual Machine Console window appears. Proceed as normal and finish up the installation.
Choose to format the C:\ partition in FAT file system format. Red Hat Enterprise Linux 5 does not come with NTFS kernel modules. Mounting or writing files to the Xen guest image may not be as straight-forward if you were to format the partition in NTFS file system format.
After you reboot the system for the first time, edit the winxp guest image: losetup /dev/loop0 /xen/winxp.imgkpartx -av /dev/loop0mount /dev/mapper/loop0p1 /mntcp -prv $WINDOWS/i386 /mnt/. This fixes a problem that you may face in the later part of the Windows installation.
Restart the Xen guest manually by typing: xm create -c winxp/.
In the Virtual Machine Manager window, select the winxp Xen guest and click Open.
The Virtual Machine Console window appears. Proceed as normal and finish up with the installation.
Whenever a 'Files Needed' dialog box appears, change the path GLOBALROOT\DEVICE\CDROM0\I386 to C:\I386. Depending on your installation, you may or may not see this problem. You may be prompted for missing files during the installation. Changing the path to C:\I386 should compensate for this problem.
If the Xen guest console freezes, click shutdown, make the following changes in /etc/xen/winxp:#vnc=1#vncunused=1sdl=1#vcpus=2
Repeat step 14 and proceed as normal with the installation.