Sunday, June 01, 2008


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



Package python-virtinst may be safely installed on Xen 3.2.1 F8 Dom0.
Minor tuning of /usr/bin/pygrub and xend-config.sxp makes possible
creating Linux DomUs with virt-install utilizing loop mounted ISOs



# mkdir -p /mnt01/tmp
# mount -o loop,ro CentOS51.iso /mnt01/tmp




and /mnt01/tmp as NFS shares for parameter
--location nfs:IP-ADDRESS-Dom0:/mnt01/tmp
in virt-install command line or interactively


1.Install F8 xen disabled
2.Install Xen 3.2.1 from source on F8 instance ([3]).



[root@dhcppc0 ~]# xm info
host : dhcppc0
release : 2.6.18.8-xen
version : #1 SMP Fri May 30 03:42:46 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 : 1044
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 : Wed May 28 16:36:13 2008 +0100 16919:84196133c9e5
cc_compiler : gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
cc_compile_by : root
cc_compile_domain : (none)
cc_compile_date : Fri May 30 03:43:55 EDT 2008
xend_config_format : 4




3.Run:-
# yum install python-virtinst



root@serverf8xen32 ~]# 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
---> 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
--> 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:
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 6 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/6): qemu-0.9.0-7.fc8.x 100% |=========================| 4.4 MB 02:38
(2/6): xen-libs-3.1.2-2.f 100% |=========================| 144 kB 00:04
(3/6): iscsi-initiator-ut 100% |=========================| 531 kB 00:17
(4/6): python-virtinst-0. 100% |=========================| 157 kB 00:05
(5/6): libvirt-python-0.4 100% |=========================| 84 kB 00:02
(6/6): libvirt-0.4.2-1.fc 100% |=========================| 1.1 MB 00:37
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: xen-libs ######################### [1/6]
Installing: qemu ######################### [2/6]
Installing: iscsi-initiator-utils ######################### [3/6]
Installing: libvirt ######################### [4/6]
Installing: libvirt-python ######################### [5/6]
Installing: python-virtinst ######################### [6/6]

Installed: python-virtinst.noarch 0:0.300.2-4.fc8
Dependency Installed: 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!
[root@serverf8xen32 ~]# ls -l /usr/bin/virt-install
-rwxr-xr-x 1 root root 21079 2008-03-19 15:05 /usr/bin/virt-install
[root@dhcppc0 ~]# brctl show
bridge name bridge id STP enabled interfaces
eth2 8000.001e8c25cca5 no peth2
virbr0 8000.000000000000 yes




4.Edit /usr/bin/pygrub ([1]) and replace:-
sys.path = [ '/usr/lib/python' ] + sys.path
with
sys.path = [ '/usr/lib64/python' ] + sys.path
5. As advised in [2] make sure, that in xend-config.sxp:-
the parameter "xend-unix-server" is set to "yes"
6.Run virt-install














When virt-install gets done system goes down and reboot:-





After tuning firewall and SELINUX DomU will be shutdown.
Bring it up:-
# xm start RHL51PV
Open second terminal and connect to PVM console via vncviewer:-
# vncviewer localhost:0











Install F8 DomU:-











Two PV DomU running at a time:-





References
1.http://lists.xensource.com/archives/html/xen-bugs/2008-04/msg00051.html
2.http://us.mc561.mail.yahoo.com/mc/showMessage?fid=Inbox&sort=date&order=down&startMid=25&.rand=942256399&midIndex=15&mid=1_12996_AMhu%2FNgAAS9BSD5Yww2z%2BBIjeZk&eps=&prevMid=1_12507_AMVu%2FNgAAT7kSD6aRgfrqxqxWrc&nextMid=1_13468_AM9u%2FNgAAQD%2BSD3Figr7S0AfY2I&m=1_10554_AMRu
3.http://lxer.com/module/newswire/view/100541/index.html