Wednesday, June 04, 2008


Fedora 8 (64-bit) as a flexible target for Xen 3.2.1 Dom0 install



Procedure described bellow installs packages mercurial, dev86, python-virtinst,virt-manager,virt-viewer. Virt-install,virt-manager as well as pygrub and hvmloader appear to be completely functional on Xen 3.2.1 F8 Dom0 and allow to create PV and HVM guests like on enterprise class systems.
Commands xm start/stop/shutdown/reboot DomainName provide
ability to manage created domains as on native Xen 3.1 F8 Dom0.


1. Pre Xen installation phase



*******************
To build hvmloader
*******************

[root@XenServerF8 ~]# yum install dev86
primary.sqlite.bz2 100% |=========================| 3.7 MB 02:08
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package dev86.x86_64 0:0.16.17-7.fc8 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
dev86 x86_64 0.16.17-7.fc8 fedora 395 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 395 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): dev86-0.16.17-7.fc 100% |=========================| 395 kB 00:10
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Importing GPG key 0x4F2A6FD2 "Fedora Project " from /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
Is this ok [y/N]: y
Importing GPG key 0xDB42A60E "Red Hat, Inc " from /etc/pki/rpm-gpg/RPM-GPG-KEY
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: dev86 ######################### [1/1]

Installed: dev86.x86_64 0:0.16.17-7.fc8
Complete!

*************************************************
To clone Mercurial Repository from xensource.com
*************************************************

[root@XenServerF8 ~]# yum install mercurial
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package mercurial.x86_64 0:0.9.5-6.fc8 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mercurial x86_64 0.9.5-6.fc8 updates 924 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 924 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): mercurial-0.9.5-6. 100% |=========================| 924 kB 00:29
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: mercurial ######################### [1/1]

Installed: mercurial.x86_64 0:0.9.5-6.fc8
Complete!

*************************************
To get virt-install alive on Xen host
*************************************

[root@XenServerF8 ~]# yum install python-virtinst
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package python-virtinst.noarch 0:0.300.2-4.fc8 set to be updated
--> Processing Dependency: libvirt-python >= 0.2.1 for package: python-virtinst
--> Running transaction check
---> Package libvirt-python.x86_64 0:0.4.2-1.fc8 set to be updated
--> Processing Dependency: libvirt = 0.4.2 for package: libvirt-python
--> Processing Dependency: libxenstore.so.3.0()(64bit) for package: libvirt-python
--> Processing Dependency: libvirt.so.0()(64bit) for package: libvirt-python
--> Running transaction check
---> Package libvirt.x86_64 0:0.4.2-1.fc8 set to be updated
--> Processing Dependency: /usr/bin/qemu-img for package: libvirt
--> Processing Dependency: iscsi-initiator-utils for package: libvirt
--> Processing Dependency: bridge-utils for package: libvirt
---> Package xen-libs.x86_64 0:3.1.2-2.fc8 set to be updated
--> Running transaction check
---> Package iscsi-initiator-utils.x86_64 0:6.2.0.865-0.2.fc8 set to be updated
---> Package qemu.x86_64 0:0.9.0-7.fc8 set to be updated
---> Package bridge-utils.x86_64 0:1.2-2.fc8 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
python-virtinst noarch 0.300.2-4.fc8 updates 157 k
Installing for dependencies:
bridge-utils x86_64 1.2-2.fc8 fedora 28 k
iscsi-initiator-utils x86_64 6.2.0.865-0.2.fc8 fedora 531 k
libvirt x86_64 0.4.2-1.fc8 updates 1.1 M
libvirt-python x86_64 0.4.2-1.fc8 updates 84 k
qemu x86_64 0.9.0-7.fc8 updates 4.4 M
xen-libs x86_64 3.1.2-2.fc8 updates 144 k

Transaction Summary
=============================================================================
Install 7 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 6.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): bridge-utils-1.2-2 100% |=========================| 28 kB 00:00
(2/7): qemu-0.9.0-7.fc8.x 100% |=========================| 4.4 MB 02:39
(3/7): xen-libs-3.1.2-2.f 100% |=========================| 144 kB 00:05
(4/7): iscsi-initiator-ut 100% |=========================| 531 kB 00:19
(5/7): python-virtinst-0. 100% |=========================| 157 kB 00:05
(6/7): libvirt-python-0.4 100% |=========================| 84 kB 00:02
(7/7): libvirt-0.4.2-1.fc 100% |=========================| 1.1 MB 00:40
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: xen-libs ######################### [1/7]
Installing: bridge-utils ######################### [2/7]
Installing: qemu ######################### [3/7]
Installing: iscsi-initiator-utils ######################### [4/7]
Installing: libvirt ######################### [5/7]
Installing: libvirt-python ######################### [6/7]
Installing: python-virtinst ######################### [7/7]

Installed: python-virtinst.noarch 0:0.300.2-4.fc8
Dependency Installed: bridge-utils.x86_64 0:1.2-2.fc8
iscsi-initiator-utils.x86_64 0:6.2.0.865-0.2.fc8
libvirt.x86_64 0:0.4.2-1.fc8 libvirt-python.x86_64 0:0.4.2-1.fc8
qemu.x86_64 0:0.9.0-7.fc8 xen-libs.x86_64 0:3.1.2-2.fc8
Complete!
*************************************
To get virt-manager alive on Xen host
*************************************
[root@XenServerF8 ~]# yum install virt-manager
primary.sqlite.bz2 100% |=========================| 3.7 MB 02:06
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package virt-manager.x86_64 0:0.5.3-2.fc8 set to be updated
--> Processing Dependency: gtk-vnc-python for package: virt-manager
--> Processing Dependency: gnome-python2-gnomekeyring >= 2.15.4 for package: virt-manager
--> Running transaction check
---> Package gnome-python2-gnomekeyring.x86_64 0:2.20.0-1.fc8 set to be updated
---> Package gtk-vnc-python.x86_64 0:0.3.4-3.fc8 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
virt-manager x86_64 0.5.3-2.fc8 updates 1.2 M
Installing for dependencies:
gnome-python2-gnomekeyring x86_64 2.20.0-1.fc8 fedora 21 k
gtk-vnc-python x86_64 0.3.4-3.fc8 updates 12 k

Transaction Summary
=============================================================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): gtk-vnc-python-0.3 100% |=========================| 12 kB 00:00
(2/3): virt-manager-0.5.3 100% |=========================| 1.2 MB 00:38
(3/3): gnome-python2-gnom 100% |=========================| 21 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: gtk-vnc-python ######################### [1/3]
Installing: gnome-python2-gnomekeyring ######################### [2/3]
Installing: virt-manager ######################### [3/3]

Installed: virt-manager.x86_64 0:0.5.3-2.fc8
Dependency Installed: gnome-python2-gnomekeyring.x86_64 0:2.20.0-1.fc8 gtk-vnc-python.x86_64 0:0.3.4-3.fc8
Complete!
[root@XenServerF8 ~]# brctl show
bridge name bridge id STP enabled interfaces
[root@XenServerF8 ~]# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes
# yum install virt-viewer




2. Install Xen 3.2.1



# cd /usr/src/
# hg clone http://xenbits.xensource.com/xen-3.2-testing.hg
# cd xen-3.2-testing.hg
# make world vmxassist=n
# make install

Determine the name of the Xen Linux kernel version that was installed.

# ls /lib/modules

There should be a directory for the Xen Linux kernel (e.g., 2.6.18.8-xen)
Generate the module dependency list and map files

# /sbin/depmod 2.6.18.8-xen

To create the Xen initial ramdisk image remove from
/etc/modprobe.conf pata_jmicron entry and run:-

# /sbin/mkinitrd /boot/initrd-2.6.18.8-xen.img 2.6.18.8-xen

Disable tls

# mv /lib64/tls /lib64/tls.disabled

Set xend service to start

# /sbin/chkconfig --add xend
# /sbin/chkconfig xend on

Edit /usr/bin/pygrub and replace:-
sys.path = [ '/usr/lib/python' ] + sys.path
with
sys.path = [ '/usr/lib64/python' ] + sys.path

Modify xend-config.sxp:-
Set "xend-unix-server" to "yes"


Edit /boot/grub/grub.conf and copy one of the existing boot
entries to make the required changes for Xen and reboot into new kernel.

title Xen-3.2.1 x86_64 F8 (2.6.18.8-xen)
root (hd1,4)
kernel /xen-3.2.gz
module /vmlinuz-2.6.18.8-xen ro root=/dev/VolGroup01/LogVol00 rhgb quiet
module /initrd-2.6.18.8-xen.img




Environment verification after reboot:-



[root@XenServerF8 ~]# xm info
host : XenServerF8
release : 2.6.18.8-xen
version : #1 SMP Wed Jun 4 12:42:39 EDT 2008
machine : x86_64
nr_cpus : 2
nr_nodes : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 3005
hw_caps : bfebfbff:20100800:00000000:00000140:0008e3fd:00000000:00000001
total_memory : 4095
free_memory : 1067
node_to_cpu : node0:0-1
xen_major : 3
xen_minor : 2
xen_extra : .1
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : Mon Jun 02 10:59:29 2008 +0100 16924:ca3ebd5b04d3
cc_compiler : gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Wed Jun 4 12:44:12 EDT 2008
xend_config_format : 4
[root@XenServerF8 ~]# brctl show
bridge name bridge id STP enabled interfaces
eth0 8000.001e8c25cca5 no peth0
virbr0 8000.000000000000 yes




Virt-install PV CentOS 51.1 DomU :-











Virt-install HVM Solaris 10 (05/08) DomU :-









Runtime snapshots:-











Virt-manager at Xen 3.2.1 F8 Dom0 (64-bit)


References
http://lxer.com/module/newswire/view/103573/index.html