Setup Libvirt 0.7.0-6 & Xen 3.4.1 Dom0 on top of Fedora 11 (64-bit)

This post follows up Mark McLoughlin’s ANNOUNCE: Rawhide virt repo for F11 users:- Another update available in http://markmc.fedorapeople.org/virt-preview
It’s targeting install the most recent version of Fedora’s libvirt on F11 and testing virt-manager and virt-install to work properly with Xen 3.4.1 Hypervisor been installed on F11 via xen 3.4.1-1 src.rpm downloaded from http://kojipkgs.fedoraproject.org/packages/xen/3.4.1/1.fc12/
PVOPS kernel 2.6.31-rc6 has been installed via Jeremy Fitzhardinge Git Repository to support Xen 3.4.1 Dom0.

Install packages required by rpmbuild:-

# yum install transfig texi2html libaio-devel dev86 glibc-devel.i586

Download xen-3.4.1-1.fc12.src.rpm

# wget http://kojipkgs.fedoraproject.org/packages/xen/3.4.1/1.fc12/src/xen-3.4.1-1.fc12.src.rpm
# rpm -iv xen-3.4.1-1.fc12.src.rpm
# cd /root/rpmbuild/SPECS
# rpmbuild -ba ./xen.spec

To install hypervisor and tools

# cd ../RPMS/x86_64
# yum install xen-3.4.1-1.fc11.x86_64.rpm \
xen-debuginfo-3.4.1-1.fc11.x86_64.rpm \
xen-devel-3.4.1-1.fc11.x86_64.rpm \
xen-doc-3.4.1-1.fc11.x86_64.rpm \
xen-hypervisor-3.4.1-1.fc11.x86_64.rpm \
xen-libs-3.4.1-1.fc11.x86_64.rpm \
xen-runtime-3.4.1-1.fc11.x86_64.rpm
. . . . .
Dependencies Resolved
==============================================================
Package Arch Version Repository Size
=============================================================
Installing:
xen x86_64 3.4.1-1.fc11 xen-3.4.1-1.fc11.x86_64.rpm 4.7 M
xen-debuginfo x86_64 3.4.1-1.fc11 xen-debuginfo-3.4.1-1.fc11.x86_64.rpm 4.3 M
xen-devel x86_64 3.4.1-1.fc11 xen-devel-3.4.1-1.fc11.x86_64.rpm 873 k
xen-doc x86_64 3.4.1-1.fc11 xen-doc-3.4.1-1.fc11.x86_64.rpm 1.5 M
xen-hypervisor x86_64 3.4.1-1.fc11 xen-hypervisor-3.4.1-1.fc11.x86_64.rpm 9.1 M
xen-libs x86_64 3.4.1-1.fc11 xen-libs-3.4.1-1.fc11.x86_64.rpm 356 k
xen-runtime x86_64 3.4.1-1.fc11 xen-runtime-3.4.1-1.fc11.x86_64.rpm 5.6 M
Installing for dependencies:
qemu-common x86_64 2:0.10.91-0.5.rc1.fc11 virt-preview 225 k
Transaction Summary
=============================================================
Install 8 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total size: 27 M
Total download size: 225 k
Is this ok [y/N]: y
Downloading Packages:
qemu-common-0.10.91-0.5.rc1.fc11.x86_64.rpm | 225 kB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : xen-libs 1/8
Installing : qemu-common 2/8
Installing : xen-hypervisor 3/8
Installing : xen-runtime 4/8
Installing : xen-devel 5/8
Installing : xen-debuginfo 6/8
Installing : xen-doc 7/8
Installing : xen 8/8
Installed:
xen.x86_64 0:3.4.1-1.fc11 xen-debuginfo.x86_64 0:3.4.1-1.fc11 xen-devel.x86_64 0:3.4.1-1.fc11
xen-doc.x86_64 0:3.4.1-1.fc11 xen-hypervisor.x86_64 0:3.4.1-1.fc11 xen-libs.x86_64 0:3.4.1-1.fc11
xen-runtime.x86_64 0:3.4.1-1.fc11
Dependency Installed:
qemu-common.x86_64 2:0.10.91-0.5.rc1.fc11
Complete!

*********************************************************************************
Apply patch from Pasi Karkkainen to handle DomUs with timeout=0 in menu.lst or build xen-3.4.1-1.fc12.src.rpm with one more patch – changeset 19740 ( already in http://xenbits.xensource.com/xen-3.4-testing.hg )
*********************************************************************************

--- pygrub-xen341 2009-08-17 22:22:29.000000000 +0300
+++ pygrub 2009-08-19 18:39:17.000000000 +0300
@@ -447,7 +447,7 @@
# So we may come here even after a key has been pressed.
# Check both timeout and mytime to avoid exiting
# when we shouldn't.
- if timeout != -1 and mytime >= int(timeout):
+ if mytime >= int(timeout):
self.isdone = True
break
else:

To install new libvirt-0.7.0-6

# cat > /etc/yum.repos.d/fedora-virt-preview.repo << EOF
[virt-preview]
name=Virtualization Rawhide for Fedora 11
baseurl=http://markmc.fedorapeople.org/virt-preview/f11/\$basearch/
enabled=1
gpgcheck=0
EOF

# yum install libvirt libvirt-python python-virtinst \
virt-manager virt-viewer
. . . . . .

Dependencies Resolved

=============================================================
Package Arch Version Repository Size
=============================================================
Installing:
libvirt x86_64 0.7.0-6.fc11 virt-preview 440 k
libvirt-python x86_64 0.7.0-6.fc11 virt-preview 132 k
python-virtinst noarch 0.500.0-1.fc11 virt-preview 446 k
virt-manager x86_64 0.7.0-5.fc11 updates 1.3 M
virt-viewer x86_64 0.2.0-1.fc11 virt-preview 37 k
Installing for dependencies:
glusterfs-client x86_64 2.0.1-2.fc11 updates 9.5 k
glusterfs-common x86_64 2.0.1-2.fc11 updates 802 k
libibverbs x86_64 1.1.2-2.fc11 fedora 45 k
libvirt-client x86_64 0.7.0-6.fc11 virt-preview 1.8 M
Transaction Summary
==============================================================
Install 9 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 5.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): glusterfs-client-2.0.1-2.fc11.x86_64.rpm | 9.5 kB 00:00
(2/9): glusterfs-common-2.0.1-2.fc11.x86_64.rpm | 802 kB 00:05
(3/9): libibverbs-1.1.2-2.fc11.x86_64.rpm | 45 kB 00:00
(4/9): libvirt-0.7.0-6.fc11.x86_64.rpm | 440 kB 00:05
(5/9): libvirt-client-0.7.0-6.fc11.x86_64.rpm | 1.8 MB 00:14
(6/9): libvirt-python-0.7.0-6.fc11.x86_64.rpm | 132 kB 00:00
(7/9): python-virtinst-0.500.0-1.fc11.noarch.rpm | 446 kB 00:31
(8/9): virt-manager-0.7.0-5.fc11.x86_64.rpm | 1.3 MB 00:10
(9/9): virt-viewer-0.2.0-1.fc11.x86_64.rpm | 37 kB 00:00
------------------------------------------------------------------------------------------------------
Total 71 kB/s | 5.0 MB 01:11
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libvirt-client 1/9
Installing : libibverbs 2/9
Installing : glusterfs-common 3/9
Installing : virt-viewer 4/9
Installing : glusterfs-client 5/9
Installing : libvirt 6/9
Installing : libvirt-python 7/9
Installing : python-virtinst 8/9
Installing : virt-manager 9/9
Installed:
libvirt.x86_64 0:0.7.0-6.fc11 libvirt-python.x86_64 0:0.7.0-6.fc11 python-virtinst.noarch 0:0.500.0-1.fc11
virt-manager.x86_64 0:0.7.0-5.fc11 virt-viewer.x86_64 0:0.2.0-1.fc11
Dependency Installed:
glusterfs-client.x86_64 0:2.0.1-2.fc11 glusterfs-common.x86_64 0:2.0.1-2.fc11 libibverbs.x86_64 0:1.1.2-2.fc11
libvirt-client.x86_64 0:0.7.0-6.fc11
Complete!

[root@ServerXen341 ~]# rpm -qa|grep virt
libvirt-client-0.7.0-6.fc11.x86_64
libvirt-python-0.7.0-6.fc11.x86_64
virt-viewer-0.2.0-1.fc11.x86_64
virt-manager-0.7.0-5.fc11.x86_64
libvirt-0.7.0-6.fc11.x86_64
python-virtinst-0.500.0-1.fc11.noarch

Load Xen Host via standard grub entry and verify environment:-

root@ServerXen341 /]# xm info
host : ServerXen341
release : 2.6.31-rc6
version : #5 SMP Thu Aug 20 11:17:13 MSD 2009
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:00000000
virt_caps : hvm
total_memory : 8191
free_memory : 3093
node_to_cpu : node0:0-1
node_to_memory : node0:3093
xen_major : 3
xen_minor : 4
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 : unavailable
cc_compiler : gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC)
cc_compile_by : root
cc_compile_domain : (none)
cc_compile_date : Wed Aug 19 23:06:14 MSD 2009
xend_config_format : 4
[root@ServerXen341 /]# chkconfig --list|grep xen
xenconsoled 0:off 1:off 2:off 3:on 4:on 5:on 6:off
xend 0:off 1:off 2:on 3:on 4:on 5:on 6:off
xendomains 0:off 1:off 2:on 3:on 4:on 5:on 6:off
xenstored 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@ServerXen341 /]# chkconfig --list|grep libvirt
libvirtd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Virt-manager appears to be able perform PV DomUs installs via HTTP and NFS sources and fails to create HVM DomU :-




Unable to complete install ' Domain not found: xenUnifiedDomainLookupByName
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 1501, in do_install
dom = guest.start_install(False, meter = meter)
File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 628, in start_install
return self._do_install(consolecb, meter, removeOld, wait)
File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 726, in _do_install
self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1077, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: Domain not found: xenUnifiedDomainLookupByName

Virt-install may be utilized for HVM DomU creation. HVM been created will become a manageable entry in virt-manager VM’s list. Sample of virt-install OSOL 200906 HVM :-

[root@ServerXen341 boris]# virt-install --debug -n OSOLHVM --hvm -r 1024 --vcpus=1 -f /dev/sdb6 --vnc -c /home/boris/osol-0906-x86.iso
Thu, 20 Aug 2009 09:36:36 DEBUG Launched with command line:
/usr/sbin/virt-install --debug -n OSOLHVM --hvm -r 1024 --vcpus=1 -f /dev/sdb6 --vnc -c /home/boris/osol-0906-x86.iso
Thu, 20 Aug 2009 09:36:36 DEBUG Requesting libvirt URI default
Thu, 20 Aug 2009 09:36:36 DEBUG Received libvirt URI xen:///
Thu, 20 Aug 2009 09:36:36 DEBUG Requesting virt method 'hvm', hv type 'default'.
Thu, 20 Aug 2009 09:36:36 DEBUG Received virt method 'hvm'
Thu, 20 Aug 2009 09:36:36 DEBUG Hypervisor name is 'xen'
Thu, 20 Aug 2009 09:36:36 DEBUG DistroInstaller location is a local file/path: /home/boris/osol-0906-x86.iso
Starting install...
Thu, 20 Aug 2009 09:36:36 DEBUG Creating guest from:
<domain type='xen'>
<name>OSOLHVM</name>
<currentMemory>1048576</currentMemory>
<memory>1048576</memory>
<uuid>f27d7d9e-3845-aa5a-fb9b-5cb16e8e639b</uuid>
<os>
<type arch='x86_64'>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='cdrom'/>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<source dev='/dev/sdb6'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/home/boris/osol-0906-x86.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<source bridge='eth0'/>
<mac address='00:16:36:03:fd:4c'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
<console type='pty'/>
</devices>
</domain>
Creating domain... | 0 B 00:00
Thu, 20 Aug 2009 09:36:36 DEBUG Created guest, looking to see if it is running
Thu, 20 Aug 2009 09:36:36 DEBUG Launching console callback
Thu, 20 Aug 2009 09:36:36 DEBUG Saving XML boot config:
<domain type='xen'>
<name>OSOLHVM</name>
<currentMemory>1048576</currentMemory>
<memory>1048576</memory>
<uuid>f27d7d9e-3845-aa5a-fb9b-5cb16e8e639b</uuid>
<os>
<type arch='x86_64'>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<source dev='/dev/sdb6'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='block' device='cdrom'>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<source bridge='eth0'/>
<mac address='00:16:36:03:fd:4c'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
<console type='pty'/>
</devices>
</domain>

VNC console comes up and install begins.




Runtime snapshots.














Jaunty HVM and PV DomUs running at a time at Xen 3.4.1 Dom0(2.6.29.6 xenified aka Suse kernel)



Vinagre connection from F11 Gnome Desktop at Dom0 to Jaunty PV DomU




About these ads

6 Responses to Setup Libvirt 0.7.0-6 & Xen 3.4.1 Dom0 on top of Fedora 11 (64-bit)

  1. [...] Update on 08/24/2009 . View the most recent post :- Fedora 11 as best target Xen 3.4.1 & Libvirt 0.7.0-6 deployment I have to notice that Libvirt (in other words virt-install,virt-manager) to work with Xen 3.4.1 is [...]

  2. Dante says:

    Hello my friend, Im trying to use your tutorial, but the file
    /usr/include/gnu/ dont have the file stubs-64.h

    /usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file or directory
    make[4]: *** [figlet] Error 1

    What should i do? Im usgin Fedora 11, 64!

  3. Dante says:

    yum install glibc-devel

  4. David Kowis says:

    Thanks for the info regarding setting up xen. I’ve got a fedora 11 install using the suse patches on 2.6.29.6 kernel. Everything else I followed exactly.

    I’ve even gotten a domU booted, however, I can’t figure out how to use the built in xen console, /dev/xvc0, instead of doing it via the virtual framebuffer. I’ve tried adding console=/dev/xvc0 and console=xvc0 to the grub config of the domU, I’ve copied /etc/event.d/tty1 to xvc0 and changed the stuff to fire up a getty on xvc0, but it’s not happening, I can’t figure out what the deal is. I took out the quiet and rhgb from the kernel opts too. I’ve hunted the internets for a bit, and found one about doing it in ubuntu, but following those steps (adjusted for fedora instead) didn’t seem to do anything.
    Thanks in advance, and thanks for all the hard work,
    David

  5. Hello, I check your new stuff on a regular basis. Your humoristic style is witty, keep up the good
    work!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: