xen-guest-installation
Virtualization Lab 1
Xen Guest Installation
Lab 1
Xen Guest Installation
Goal:
Setup at Start:
To install RHEL 3, 4 and 5 beta 2, and Windows XP Xen guests.
A workstation installed with Red Hat Enterprise Linux 5 beta 2/
Virtualization Platform.
In this lab, we will configure and install RHEL 3, 4 and 5 beta 2, and Win XP Xen guests using various virtualization
tools.
Sequence 1: Checking for PAE support
In this sequence, we will determine if your system has PAE support. Any x86_64 or ia64 CPU is supported for running
para-virtualized guests. To run i386 guests requires a CPU with PAE extension. Many older laptops (particularly those
based on Pentium Mobile or Centrino) do not have PAE support.
1.
To determine if your CPU has PAE support, run the following command:
grep pae /proc/cpuinfo
2.
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
Sequence 2: Installing RHEL5 beta 2 Xen para-virtualized guest using virt-install
In this sequence, we will install a Red Hat Enterprise Linux 5 beta 2 Xen guest using virt-install.
1.
Use the virt-install command to start install your Red Hat Enterprise Linux 5 beta 2 Xen guest.
virt-install
2.
When prompted to install a fully virtualized guest, enter 'no'.
3.
Enter rhel5b2-pv1 for your virtual machine name.
4.
Enter 500 for your RAM to be allocated.
Copyright © 2006 Red Hat, Inc., Eugene Teo
1 of 6
Xen/Virtualization Workshop
Last updated: Dec 7, 2006
Virtualization Lab 1
Xen Guest Installation
5.
Enter /xen/rhel5b2-pv1.img for your disk (guest image).
6.
Enter 6 for the size of your disk (guest image).
7.
Enter yes to enable graphics support.
8. Enter nfs:server:/path/to/rhel5b2 for your install location.
9.
The installation will then commence. Proceed as normal with the installation.
10. After installation, edit /etc/xen/rhel5b2-pv1, and make the following changes:
#vnc=1
#vncunused=1
sdl=1
11. Also, edit /etc/inittab, add in the following changes, and type init 5.
#id:3:initdefault:
id:5:initdefault:
Sequence 3: Installing RHEL5 beta 2 Xen para-virtualized guest using virt-manager
In this sequence, we will install a Red Hat Enterprise Linux 5 beta 2 Xen guest using virt-manager.
1.
Use the virt-manager command to start install your Red Hat Enterprise Linux 5 beta 2 Xen guest.
virt-manager
2.
On the 'Open connection' screen, select Local Xen host, and click on Connect.
3.
On the 'Virtual Machine Manager' screen, click on New.
4.
Click on Forward.
5.
Enter rhel5b2-pv2 for your system name, and click on Forward.
6.
Select Paravirtualized, and click Forward.
7.
Enter nfs:server:/path/to/rhel5b2 for your install media URL, and click Forward.
8.
Select Simple File, enter /xen/rhel5b2-pv2.img for your file location. Choose 6000 MB, and click
Forward.
9.
Choose 500 for your VM Max and Startup Memory, and click Forward.
Copyright © 2006 Red Hat, Inc., Eugene Teo
2 of 6
Xen/Virtualization Workshop
Last updated: Dec 7, 2006
Virtualization Lab 1
Xen Guest Installation
10. Click Finish.
12. The 'Virtual Machine Console' window will pop up. Proceed as normal with the installation.
Sequence 4: Checking for Intel-VT or AMD-V support
In this sequence, we will determine if your system has enabled Intel-VT or AMD-V support. Your system has to be using
a Intel-VT or AMD-V enabled CPU in order to install fully virtualized guest operating systems. Xen uses a generic 'HVM'
layer to support both CPU vendor.
1.
To determine if your CPU has Intel-VT or AMD-V support, run the following command:
egrep -e 'vmx|svm' /proc/cpuinfo
2.
The following output shows a CPU that has Intel-VT support. If the command returns nothing, then the CPU does not
have Intel-VT or AMD-V support.
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
3.
To determine if your system has enabled Intel-VT or AMD-V support, run the following command:
cat /sys/hypervisor/properties/capabilities
4.
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
Sequence 5: Installing RHEL5 beta 2 Xen fully virtualized guest using virt-install
In this sequence, we will install a Red Hat Enterprise Linux 5 beta 2 Xen guest using virt-install.
1.
Use the virt-install command to start install your Red Hat Enterprise Linux 5 beta 2 Xen guest.
virt-install
2.
When prompted to install a fully virtualized guest, enter 'yes'.
3.
Enter rhel5b2-fv1 for your virtual machine name.
4.
Enter 500 for your RAM to be allocated.
5.
Enter /xen/rhel5b2-fv1.img for your disk (guest image).
6.
Enter 6 for the size of your disk (guest image).
Copyright © 2006 Red Hat, Inc., Eugene Teo
3 of 6
Xen/Virtualization Workshop
Last updated: Dec 7, 2006
Virtualization Lab 1
Xen Guest Installation
7.
Enter yes to enable graphics support.
8.
Enter /dev/cdrom for the virtual CD image.
9.
VNC viewer will pop up with the installation window. If there is an error messages that says “main: Unable to
connect to host: Connection refused (111)”, then type the following command to proceed:
vncviewer localhost:59001
13. The installation will then commence. Proceed as normal with the installation.
Sequence 6: Installing RHEL5 beta 2 Xen fully virtualized guest using virt-manager
In this sequence, we will install a Red Hat Enterprise Linux 5 beta 2 Xen guest using virt-manager.
1.
Use the virt-manager command to start install your Red Hat Enterprise Linux 5 beta 2 Xen guest.
virt-manager
2.
On the 'Open connection' screen, select Local Xen host, and click on Connect.
3.
On the 'Virtual Machine Manager' screen, click on New.
4.
Click on Forward.
5.
Enter rhel5b2-fv2 for your system name, and click on Forward.
6.
Select Fully virtualized, and click Forward.
7.
Select CD-ROM or DVD and the Path to install media if you have the CD-ROM or DVD. Select ISO
Image location if you choose to install from ISO image. Click Forward.
8.
Select Simple File, enter /xen/rhel5b2-fv2.img for your file location. Choose 6000 MB, and click
Forward.
9.
Choose 500 for your VM Max and Startup Memory, and click Forward.
10. Click Finish.
11. The 'Virtual Machine Console' window will pop up. Proceed as normal with the installation.
Sequence 7: Installing RHEL3 Xen fully virtualized guest using virt-manager
1 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, etc.
Copyright © 2006 Red Hat, Inc., Eugene Teo
4 of 6
Xen/Virtualization Workshop
Last updated: Dec 7, 2006
Virtualization Lab 1
Xen Guest Installation
In this sequence, we will install a Red Hat Enterprise Linux 3 Xen guest using virt-manager.
1.
The same instructions for Sequence 6 applies here.
Sequence 8: Installing RHEL4 Xen fully virtualized guest using virt-manager
In this sequence, we will install a Red Hat Enterprise Linux 4 Xen guest using virt-manager.
2.
The same instructions for Sequence 6 applies here.
Sequence 9: Installing Windows XP Xen fully virtualized guest using virt-manager
In this sequence, we will install a Windows XP Xen fully virtualized guest using virt-manager.
1.
Use the virt-manager command to start install your Windows XP Xen guest.
virt-manager
2.
On the 'Open connection' screen, select Local Xen host, and click on Connect.
3.
On the 'Virtual Machine Manager' screen, click on New.
4.
Click on Forward.
5.
Enter winxp for your system name, and click on Forward.
6.
Select Fully virtualized, and click Forward.
7.
Select CD-ROM or DVD and the Path to install media if you have the CD-ROM or DVD. Select ISO
Image location if you choose to install from ISO image. Click Forward.
8.
Select Simple File, enter /xen/winxp.img for your file location. Choose 6000 MB, and click Forward.
9.
Choose 1024 for your VM Max and Startup Memory, and 2 for VCPUs. Click Forward.
10. Click Finish.
11. The 'Virtual Machine Console' window will pop up. Proceed as normal with the installation.
12. 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.
13. After the first reboot, fix the winxp guest image:
Copyright © 2006 Red Hat, Inc., Eugene Teo
5 of 6
Xen/Virtualization Workshop
Last updated: Dec 7, 2006
Virtualization Lab 1
Xen Guest Installation
losetup /dev/loop0 /xen/winxp.img
kpartx -av /dev/loop0
mount /dev/mapper/loop0p1 /mnt
cp -prv $WINDOWS/i386 /mnt/1
umount /mnt
14. Restart the Xen guest manually:
xm create -c winxp
15. Select winxp Xen guest from 'Virtual Machine Manager' and click Open.
16. The 'Virtual Machine Console' window will pop up. Proceed as normal with the installation.
17. 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 numerous times. Changing the path to C:\I386 will fix this problem.
18. If the Xen guest console freezes, click shutdown, make the following changes in /etc/xen/winxp:
#vnc=1
#vncunused=1
sdl=1
#vcpus=2
19. Repeat step 14 and proceed as normal with the installation.
1 This is to fix a problem that you may face in the later part of the Windows installation.
Copyright © 2006 Red Hat, Inc., Eugene Teo
6 of 6
Xen/Virtualization Workshop
Last updated: Dec 7, 2006
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising