Virt-install Oneiric PV DomU at Xen 4.1.2 Oneiric Dom0 via remote HTTP mirror

November 20, 2011

RH’s opensource distros ISO images (Fedora,CentOS) have a nice feature,been loop mounted on apache folder /var/www/domain, they allow to create local mirror to virt-install corresponding paravirtual guest. Not customized Ubuntu ISOs don’t have this feature, however virt-install still works for Oneiric, Natty, Lucid utilizing remote system HTTP source. Virt-install Oneiric PV DomU is possible via remote official HTTP source :-

http://ca.archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-amd64/.

Start install by command :-

virt-install --connect xen:/// -n OneiricPV \
--nographics \
-p -r 2048 --vcpus=2 -f /dev/sdb6 \
-l http://ca.archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-amd64/

proceed with text mode install









Diring tasksel run I’ve selected “Basic Ubuntu Server”,”SSH”,”Ubuntu Desktop”



all done domain reboots



Open Virt-Manager and add VNC Server to graphics section



Start updated DomU via Virt-Manager:-





Set up Oneiric PV DomU at Xen 4.1.2 Oneiric Dom0 (3.1.0-030100-generic)

October 27, 2011

Procedure is standard Debian’s network PV install. Download configuration file from following location. Debian and consequently Ubuntu still consider Libvirt and virtinst tools like virt-manager and command line utility virt-install as way to manage RH’s Xen domains like F15,F16,CentOS 6 either to be utilized with remote system mirrors

# wget http://ca.archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg

# cp xm-debian.cfg xm-debian1.cfg

I had to patch xm-debian1.cfg via xm-debian1.patch to make it working

--- xm-debian1.cfg.orig	2011-10-27 17:17:17.333111002 +0400
+++ xm-debian1.cfg	2011-10-27 16:33:24.985110998 +0400
@@ -38,10 +38,10 @@
 # Standard variables
 
 # Initial memory allocation (in megabytes) for the new domain.
-memory = 128
+memory = 2048
 
 # A name for your domain. All domains must have different names.
-name = "ExampleDomain"
+name = "OneiricPVD"
 
 # 128-bit UUID for the domain.  The default behavior is to generate a new UUID
 # on each call to 'xm create'.
@@ -53,7 +53,7 @@
 #cpus = "0-3,5,^1" # run on cpus 0,2,3,5
 
 # Number of Virtual CPUS to use, default is 1
-#vcpus = 1
+vcpus = 2
 
 #----------------------------------------------------------------------------
 # Define network interfaces.
@@ -69,9 +69,9 @@
 #
 # or more than one interface may be configured:
 #
-# vif = ['', 'bridge=xenbr1']
+vif = ['', 'bridge=br0']
 
-vif = ['']
+# vif = ['']
 
 #----------------------------------------------------------------------------
 # Define the disk devices you want the domain to have access to, and
@@ -82,7 +82,7 @@
 #
 # NB: Only xvd devices are supported by the kernel in Debian Lenny and later.
 
-disk = ['file:/path/to/disk.img,xvda,w']
+disk = ['phy:/dev/sda7,xvda,w']
 
 #----------------------------------------------------------------------------
 # Define frame buffer device.
@@ -175,7 +175,7 @@
 xm_vars.check()
 
 if not xm_vars.env.get('install'):
-    bootloader="pygrub"
+    bootloader="/usr/lib64/xen/bin/pygrub"
 elif xm_vars.env['install-method'] == "network":
     import os.path
     print "Install Mirror: %s" % xm_vars.env['install-mirror']
@@ -192,12 +192,16 @@
     print
 
     if xm_vars.env.get('install-kernel'):
-        kernelurl = xm_vars.env['install-kernel']
+#       kernelurl = xm_vars.env['install-kernel']
+        kernelurl = installer + "/netboot/xen/vmlinuz"
+        print "Kernel to load: %s" % kernelurl
     else:
         kernelurl = installer + "/netboot/xen/vmlinuz"
-
+        
     if xm_vars.env.get('install-ramdisk'):
-        ramdiskurl = xm_vars.env['install-ramdisk']
+#       ramdiskurl = xm_vars.env['install-ramdisk']
+        ramdiskurl = installer + "/netboot/xen/initrd.gz"
+        print "Ramdisk to load: %s" %  ramdiskurl
     else:
         ramdiskurl = installer + "/netboot/xen/initrd.gz"
 
@@ -244,7 +248,7 @@
     disk.insert(0, 'file:%s,%s:cdrom,r' % (xm_vars.env['install-media'],
                                            xm_vars.env['install-cdrom-device']))
 
-    bootloader="pygrub"
+    bootloader="/usr/lib64/xen/bin/pygrub"
     bootargs="--kernel=%s --ramdisk=%s" % (kernelpath, ramdiskpath)
     print "From CD"
 else:


# xm create -f xm-debian1.cfg -c install=true \
install-kernel="vmlinuz" install-ramdisk="initrd.gz" \
install-mirror="http://ca.archive.ubuntu.com/ubuntu" \
install-arch=amd64 install-method=network

Network installation starts :-









Create file for XML PV Guest definition

# cat OneiricPVD.xml
<domain type='xen' id='7'>
<name>OneiricPVD</name>
<description></description>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader>/usr/lib64/xen/bin/pygrub</bootloader>
<bootloader_args>-q</bootloader_args>
<os>
<type>linux</type>
<kernel></kernel>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/sda7'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:63:7d:40'/>
<source bridge='br0'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<target dev='vif7.0'/>
</interface>
<console type='pty' tty='/dev/pts/3'>
<source path='/dev/pts/3'/>
<target type='xen' port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5900' autoport='yes'/>
</devices>
</domain>

# virsh define OneiricPVD.xml





Virt-install Fedora 16 PV Guest at Xen 4.1.2 Ubuntu Oneiric Dom0

October 23, 2011

Install Xen Hypervisor via PPA Xen 4.1.2 with pygrub gpt support for Ubuntu Oneiric not regular one.Pygrub gpt support patches, published @xen-devel, have been back ported to Xen 4.1.2 for build in PPA mentioned above. Next: mount loop Fedora-16-TC1-x86_64-DVD.iso on /var/www/f16 run virt-install in VNC mode :-

virt-install --connect xen:/// --debug -n VF16 \
--vnc -p -r 2048 --vcpus=2 \
-f /dev/sda7 -l http://192.168.0.175/f16

Series of screen-shots bellow should be a fair




Done. Pygrub is loading F16 DomU with gnu partitioning







Start domain via virsh and connect with vncviewer localhost:0



Start domain via virt-manager and connect with vncviewer localhost:0



Building Xen 4.1.2-rc(X) for Ubuntu 11.10.

September 3, 2011

In meantime 4.1.2-rc1 is tagged. I will start with short description preparing package to upload to Launchpad, presuming that you have PGP signature, regardless there is ready 4.1.2-rc1 to install from my PPA “Build Xen 4.1.2-rc1 for Ubuntu 11.10″

$ hg clone -r 4.1.2-rc1 http://xenbits.xen.org/hg/xen-4.1-testing.hg/
$ cp -R xen-4.1-testing.hg xen-4.1.2~rc1
$ git clone git://xenbits.xensource.com/qemu-xen-4.1-testing.git qemu
$ tar -zcvf xen_4.1.2~rc1.orig-qemu.tar.gz ./qemu/*
$ tar -zcvf xen-4.1.2~rc1.tar.gz ./xen-4.1.2~rc1/*
$ cd xen-4.1.2~rc1
$ dh_make -e bderzhavets@yahoo.com -f ../xen-4.1.2~rc1.tar.gz
$ tar -zxvf ../xen_4.1.2~rc1.orig-qemu.tar.gz
$ cd ..
$ wget https://launchpad.net/ubuntu/+archive/primary/+files/xen_4.1.1-2ubuntu2.debian.tar.gz
$ tar -zxvf xen_4.1.1-1ubuntu1.debian.tar.gz
Update debian/patches/series. Remove all (4) unstable* patches
$ cp -R debian ./xen-4.1.2~rc1
Update changelog
$ debuild -sa -S -k'PGPKEY'
$ dput ppa:yoursname/xen-4.1.2-rc1 package-name.changes

Then build @Launchpad

If you just want to get ready Xen, e.g. desired revision has been already uploaded by somebody else.
**************************************************************************
Install version ready to go via PPA “Build Xen 4.1.2-rc1 for Ubuntu 11.10″
**************************************************************************
Now run :-
# apt-add-repository ppa:bderzhavets/xen-next
# apt-get update
# apt-get install synaptic
Install Xen 4.1.2-rc1 Hypervisor (xen-4.1.2~rc1-0ubuntu1) and tools via Synaptic



Add to /etc/modules :-

xen-gntdev
xen-blkback
xen-netback

Reboot into Xen Host and check environment :-

root@boris-P5Q-E:~# xl info
host : boris-P5Q-E
release : 3.0.0-9-generic
version : #14-Ubuntu SMP Tue Aug 23 17:03:26 UTC 2011
machine : x86_64
nr_cpus : 2
nr_nodes : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 2999
hw_caps : bfebfbff:20100800:00000000:00000940:0008e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8191
free_memory : 1660
free_cpus : 0
xen_major : 4
xen_minor : 1
xen_extra : .2-rc1
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
xen_commandline : placeholder
cc_compiler : gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-7ubuntu2)
cc_compile_by : bderzhavets
cc_compile_domain : yahoo.com
cc_compile_date : Fri Aug 26 05:09:16 UTC 2011
xend_config_format : 4

root@boris-P5Q-E:~# virsh version
Compiled against library: libvir 0.9.2
Using library: libvir 0.9.2
Using API: Xen 3.0.1

Also make sure :-

root@boris-System-P5Q3:~# ls -l /dev/xen
total 0
crw——- 1 root root 10, 55 2011-07-25 10:31 evtchn
crw——- 1 root root 10, 56 2011-07-25 10:31 gntdev
root@boris-System-P5Q3:~# lsmod | grep xen

xen_evtchn 13172 1
xenfs 18311 1
xen_blkback 23177 0 [permanent]
xen_netback 27854 0 [permanent]
xen_gntdev 17676 0

If you are missing at least one device under /dev/xen or lsmod doesn’t
show all mentioned drivers, yours system won’t be functional.

Next to activate Libvirt 0.9.2 and virtinst tools :-

# apt-get install virtinst virt-viewer virt-manager

Comment out (xend-unix-server yes) in /etc/xen/xend-config.sxp and export variable

export VIRSH_DEFAULT_CONNECT_URI=”xen:///”

in root’s .bashrc. Then restart xend service
Attempt to run :-

# virt-install –connect xen:/// –debug -n LynxHVM –hvm -r 1024 –vcpus=1 \
-f /dev/sda7 –vnc \
-c /root/Downloads/ubuntu-10.04.3-desktop-amd64.iso

Generates an error

Mon, 25 Jul 2011 10:58:45 ERROR Domain not found: xenUnifiedDomainLookupByName
Mon, 25 Jul 2011 10:58:45 DEBUG Traceback (most recent call last):
File “/usr/bin/virt-install”, line 1079, in start_install
dom = guest.start_install(conscb, meter, wait=wait_on_console)
File “/usr/lib/pymodules/python2.7/virtinst/Guest.py”, line 1187, in start_install
start_xml, final_xml, is_initial)
File “/usr/lib/pymodules/python2.7/virtinst/Guest.py”, line 1246, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File “/usr/lib/python2.7/dist-packages/libvirt.py”, line 1686, in createLinux
if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’, conn=self)
libvirtError: Domain not found: xenUnifiedDomainLookupByName

/var/log/xen/qemu-dm-LNX.log reports

/usr/lib64/xen/bin/qemu-dm: error while loading shared libraries: libxenctrl.so: cannot open shared object file: No such file or directory

To fix this failure :

root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R lib /usr/lib64/xen
root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R boot /usr/lib64/xen
root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R bin /usr/lib64/xen


Sync Xen 4.1.2-rc(X) on Ubuntu 11.10 with tip or tip revision of xen-4.1-testing.hg

July 31, 2011

In meantime 4.1.2-rc1 is tagged. I will start with short description preparing package to upload to Launchpad, presuming that you have PGP signature, regardless there is ready 4.1.2-rc1 to install from my PPA “Build Xen 4.1.2-rc1 for Ubuntu 11.10″.
Actually, that’s the way to keep in sync Xen 4.1.2-r(X) on Oneiric with tip or tip revision of http://xenbits.xen.org/hg/xen-4.1-testing.hg/.

Build with external xen_4.1.2.orig-qemu.tar.gz


$ hg clone -r 4.1.2-rc1 http://xenbits.xen.org/hg/xen-4.1-testing.hg/
$ cp -R xen-4.1-testing.hg xen-4.1.2~rc1
$ git clone git://xenbits.xensource.com/qemu-xen-4.1-testing.git qemu
$ tar -zcvf xen_4.1.2~rc1.orig-qemu.tar.gz ./qemu/*
$ tar -zcvf xen-4.1.2~rc1.tar.gz ./xen-4.1.2~rc1/*
$ cd xen-4.1.2~rc1
$ dh_make -e bderzhavets@yahoo.com -f ../xen-4.1.2~rc1.tar.gz
$ tar -zxvf ../xen_4.1.2~rc1.orig-qemu.tar.gz
$ cd ..
$ wget https://launchpad.net/ubuntu/+archive/primary/+files/xen_4.1.1-2ubuntu2.debian.tar.gz
$ tar -zxvf xen_4.1.1-1ubuntu1.debian.tar.gz
Update debian/patches/series. Remove all (4) unstable* patches
$ cp -R debian ./xen-4.1.2~rc1
Update changelog
$ debuild -sa -S -k'PGPKEY'
$ dput ppa:yoursname/xen-4.1.2-rc1 package-name.changes

Then build @Launchpad

Attach PPA of upload to your system and install new Xen Hypersvisor and dependent packages. Add to /etc/modules :-

xen-gntdev
xen-blkback
xen-netback

Reboot into Xen Host and check environment.Xen Hypervisor, installed on Ubuntu Oneiric, reports now:

root@boris-P5Q-E:~# xl info
host : boris-P5Q-E
release : 3.0.0-9-generic
version : #14-Ubuntu SMP Tue Aug 23 17:03:26 UTC 2011
machine : x86_64
nr_cpus : 2
nr_nodes : 1
cores_per_socket : 2
threads_per_core : 1
cpu_mhz : 2999
hw_caps : bfebfbff:20100800:00000000:00000940:0008e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8191
free_memory : 1660
free_cpus : 0
xen_major : 4
xen_minor : 1
xen_extra : .2-rc1
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
xen_commandline : placeholder
cc_compiler : gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-7ubuntu2)
cc_compile_by : bderzhavets
cc_compile_domain : yahoo.com
cc_compile_date : Fri Aug 26 05:09:16 UTC 2011
xend_config_format : 4

root@boris-P5Q-E:~# virsh version
Compiled against library: libvir 0.9.2
Using library: libvir 0.9.2
Using API: Xen 3.0.1

Also make sure :-

root@boris-System-P5Q3:~# ls -l /dev/xen
total 0
crw——- 1 root root 10, 55 2011-07-25 10:31 evtchn
crw——- 1 root root 10, 56 2011-07-25 10:31 gntdev
root@boris-System-P5Q3:~# lsmod | grep xen

xen_evtchn 13172 1
xenfs 18311 1
xen_blkback 23177 0 [permanent]
xen_netback 27854 0 [permanent]
xen_gntdev 17676 0

If you are missing at least one device under /dev/xen or lsmod doesn’t
show all mentioned drivers, yours system won’t be functional.

Next to activate Libvirt 0.9.2 and virtinst tools :-

# apt-get install virtinst virt-viewer virt-manager

Comment out (xend-unix-server yes) in /etc/xen/xend-config.sxp and export variable

export VIRSH_DEFAULT_CONNECT_URI=”xen:///”

in root’s .bashrc. Then restart xend service
Attempt to run :-

# virt-install –connect xen:/// –debug -n LynxHVM –hvm -r 1024 –vcpus=1 \
-f /dev/sda7 –vnc \
-c /root/Downloads/ubuntu-10.04.3-desktop-amd64.iso

Generates an error

Mon, 25 Jul 2011 10:58:45 ERROR Domain not found: xenUnifiedDomainLookupByName
Mon, 25 Jul 2011 10:58:45 DEBUG Traceback (most recent call last):
File “/usr/bin/virt-install”, line 1079, in start_install
dom = guest.start_install(conscb, meter, wait=wait_on_console)
File “/usr/lib/pymodules/python2.7/virtinst/Guest.py”, line 1187, in start_install
start_xml, final_xml, is_initial)
File “/usr/lib/pymodules/python2.7/virtinst/Guest.py”, line 1246, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File “/usr/lib/python2.7/dist-packages/libvirt.py”, line 1686, in createLinux
if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’, conn=self)
libvirtError: Domain not found: xenUnifiedDomainLookupByName

/var/log/xen/qemu-dm-LNX.log reports

/usr/lib64/xen/bin/qemu-dm: error while loading shared libraries: libxenctrl.so: cannot open shared object file: No such file or directory

To fix this failure :

root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R lib /usr/lib64/xen
root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R boot /usr/lib64/xen
root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R bin /usr/lib64/xen

Test install Solaris 11 Express as PV Guest :-






Build Xen 4.1.1(2-rc1,2-rc2,2-rc3) on Ubuntu 11.10 and set up HVM via virt-manager

July 23, 2011

*****************************************************************************************
UPDATE on 10/25/11 Xen 4.1.2 with pygrub gpt support for Ubuntu 11.10 (virt-install fedora 16(TC1) works for me).
View PPA Xen 4.1.2 with pygrub gpt support for Ubuntu 11.10.
Attention, vif entry for HVM domains should look like :-

vif = [ 'type=ioemu, bridge=br0, model='e1000']

Then absence of Ubuntu’s patch xen-pirq-resubmit-irq.patch from official package is not important. Same entry for PV-on-HVM domains should look like :-

vif = [ 'bridge=br0, model='e1000']

Details may be viewed PV-on-HVM domains at Xen 4.1.2 Ubuntu Oneiric Dom0
I’ve also tested this hypervisor with 3.1.0-030100-generic. The last kernel has PCI_BACKEND implemented.
UPDATE on 10/21/11 Xen 4.1.2 for Ubuntu 11.10.
View PPA Xen 4.1.2 for Ubuntu 11.10.
UPDATE on 09/15/11 Xen 4.1.2-rc2 for Ubuntu 11.10.
View PPA Xen 4.1.2-rc2 for Ubuntu 11.10.
UPDATE on 08/26/11 Build Xen 4.1.2-rc1 for Ubuntu 11.10.
View PPA Build Xen 4.1.2-rc1 for Ubuntu 11.10
How to build Xen 4.1.2 on Launchpad on your own
******************************************************************************************
Patch changeset-23104 from xen-4.1-testing.hg (changeset 23104:1976adbf2b80) has been applied to fix build “hvmloader” by GCC 4.6. View thread @xen-devel (Posts #11,14,15,18) ([1]). Packages, ready to go, uploaded to PPA Xen 4.1.1 on Ubuntu 11.10. Workaround connected with ERROR: Domain not found: xenUnifiedDomainLookupByName when attempt to set up HVM DomU via virt-manager is also described in details. Build is based on https://launchpad.net/ubuntu/+source/xen/4.1.1-1ubuntu1
Now run :-
# apt-add-repository ppa:bderzhavets/xen-hg
# apt-get update
# apt-get install synaptic
Install Xen 4.1.1 Hypervisor (4.1.1-1ubuntu3) and tools via Synaptic Manager.



Add to /etc/modules :-

xen-gntdev
xen-blkback
xen-netback

Reboot into Xen environment

root@boris-System-P5Q3:~# xl info
host : boris-System-P5Q3
release : 3.0.0-6-generic
version : #7-Ubuntu SMP Wed Jul 20 13:53:04 UTC 2011
machine : x86_64
nr_cpus : 4
nr_nodes : 1
cores_per_socket : 4
threads_per_core : 1
cpu_mhz : 2833
hw_caps : bfebfbff:20100800:00000000:00000940:0008e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8190
free_memory : 2052
free_cpus : 0
xen_major : 4
xen_minor : 1
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
xen_commandline : placeholder
cc_compiler : gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-5ubuntu1)
cc_compile_by : bderzhavets
cc_compile_domain : yahoo.com
cc_compile_date : Sun Jul 24 12:24:37 UTC 2011
xend_config_format : 4

Also make sure :-

root@boris-System-P5Q3:~# ls -l /dev/xen
total 0
crw------- 1 root root 10, 55 2011-07-25 10:31 evtchn
crw------- 1 root root 10, 56 2011-07-25 10:31 gntdev
root@boris-System-P5Q3:~# lsmod | grep xen
xen_evtchn 13172 1
xenfs 18311 1
xen_blkback 23177 0 [permanent]
xen_netback 27854 0 [permanent]
xen_gntdev 17676 0

If you are missing at least one device under /dev/xen or lsmod doesn’t show all mentioned drivers, yours system won’t be functional.
Create HVM DomU via standard python profile. You should be able complete the task with no problem. Next step would be fixing bug with virtinst tools and install HVM Ubuntu 10.04.3 via virt-manager or virt-install. Installation via virt-manager is much easier and allows create Ubuntu 10.04.3 PV DomU via XML profiling and command “virsh define” in several minutes.




Next to activate Libvirt 0.9.2 and virtinst tools :-

# apt-get install virtinst virt-viewer virt-manager

Comment out (xend-unix-server yes) in /etc/xen/xend-config.sxp and export variable

export VIRSH_DEFAULT_CONNECT_URI="xen:///"

in root’s .bashrc. Then restart xend service
Attempt to run :-

# virt-install --connect xen:/// --debug -n LynxHVM --hvm -r 1024 --vcpus=1 \
-f /dev/sda7 --vnc \
-c /root/Downloads/ubuntu-10.04.3-desktop-amd64.iso


Generates an error

Mon, 25 Jul 2011 10:58:45 ERROR Domain not found: xenUnifiedDomainLookupByName
Mon, 25 Jul 2011 10:58:45 DEBUG Traceback (most recent call last):
File “/usr/bin/virt-install”, line 1079, in start_install
dom = guest.start_install(conscb, meter, wait=wait_on_console)
File “/usr/lib/pymodules/python2.7/virtinst/Guest.py”, line 1187, in start_install
start_xml, final_xml, is_initial)
File “/usr/lib/pymodules/python2.7/virtinst/Guest.py”, line 1246, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File “/usr/lib/python2.7/dist-packages/libvirt.py”, line 1686, in createLinux
if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’, conn=self)
libvirtError: Domain not found: xenUnifiedDomainLookupByName

/var/log/xen/qemu-dm-LNX.log reports

/usr/lib64/xen/bin/qemu-dm: error while loading shared libraries: libxenctrl.so: cannot open shared object file: No such file or directory

To fix this failure :

root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R lib /usr/lib64/xen
root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R boot /usr/lib64/xen
root@boris-System-P5Q3:/usr/lib64/xen-4.1# cp -R bin /usr/lib64/xen







Normal virt-install :
root@boris-System-P5Q3:~# virt-install –connect xen:/// –debug -n LynxHVM –hvm -r 1024 –vcpus=1 -f /dev/sda7 –vnc -c /root/Downloads/ubuntu-10.04.3-desktop-amd64.iso
Mon, 25 Jul 2011 11:07:40 DEBUG Launched with command line:
/usr/bin/virt-install –connect xen:/// –debug -n LynxHVM –hvm -r 1024 –vcpus=1 -f /dev/sda7 –vnc -c /root/Downloads/ubuntu-10.04.3-desktop-amd64.iso
Mon, 25 Jul 2011 11:07:40 DEBUG Requesting libvirt URI xen:///
Mon, 25 Jul 2011 11:07:40 DEBUG Received libvirt URI xen:///
Mon, 25 Jul 2011 11:07:40 DEBUG Requesting virt method ‘hvm’, hv type ‘default’.
Mon, 25 Jul 2011 11:07:40 DEBUG Received virt method ‘hvm’
Mon, 25 Jul 2011 11:07:40 DEBUG Hypervisor name is ‘xen’
Mon, 25 Jul 2011 11:07:40 DEBUG DistroInstaller location is a local file/path: /root/Downloads/ubuntu-10.04.3-desktop-amd64.iso
Mon, 25 Jul 2011 11:07:40 DEBUG Guest.has_install_phase: True

Starting install…
Mon, 25 Jul 2011 11:07:40 DEBUG Could not open “/etc/sysconfig/keyboard” [Errno 2] No such file or directory: ‘/etc/sysconfig/keyboard’
Mon, 25 Jul 2011 11:07:40 DEBUG Could not open “/etc/X11/xorg.conf”: [Errno 2] No such file or directory: ‘/etc/X11/xorg.conf’
Mon, 25 Jul 2011 11:07:40 DEBUG Could not open “/etc/sysconfig/keyboard” [Errno 2] No such file or directory: ‘/etc/sysconfig/keyboard’
Mon, 25 Jul 2011 11:07:40 DEBUG Could not open “/etc/X11/xorg.conf”: [Errno 2] No such file or directory: ‘/etc/X11/xorg.conf’
Mon, 25 Jul 2011 11:07:40 DEBUG Generated install XML:
<domain type=’xen’>
<name>LynxHVM</name>
<currentMemory>1048576</currentMemory>
<memory>1048576</memory>
<uuid>c4e2746f-bc7c-17ef-84e4-e37defc696d3</uuid>
<os>
<type arch=’x86_64′>hvm</type>
<loader>/usr/lib/xen-default/boot/hvmloader</loader>
<boot dev=’cdrom’/>
<boot dev=’hd’/>
</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/sda7′/>
<target dev=’hda’ bus=’ide’/>
</disk>
<disk type=’file’ device=’cdrom’>
<source file=’/root/Downloads/ubuntu-10.04.3-desktop-amd64.iso’/>
<target dev=’hdc’ bus=’ide’/>
<readonly/>
</disk>
<interface type=’bridge’>
<source bridge=’br0′/>
<mac address=’00:16:3e:6d:9c:aa’/>
</interface>
<input type=’mouse’ bus=’ps2′/>
<graphics type=’vnc’ port=’-1′ keymap=’en-us’/>
<console type=’pty’/>
<video>
<model type=’cirrus’/>
</video>
</devices>
</domain>

Mon, 25 Jul 2011 11:07:40 DEBUG Generated boot XML:
<domain type=’xen’>
<name>LynxHVM</name>
<currentMemory>1048576</currentMemory>
<memory>1048576</memory>
<uuid>c4e2746f-bc7c-17ef-84e4-e37defc696d3</uuid>
<os>
<type arch=’x86_64′>hvm</type>
<loader>/usr/lib/xen-default/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/sda7′/>
<target dev=’hda’ bus=’ide’/>
</disk>
<disk type=’block’ device=’cdrom’>
<target dev=’hdc’ bus=’ide’/>
<readonly/>
</disk>
<interface type=’bridge’>
<source bridge=’br0′/>
<mac address=’00:16:3e:6d:9c:aa’/>
</interface>
<input type=’mouse’ bus=’ps2′/>
<graphics type=’vnc’ port=’-1′ keymap=’en-us’/>
<console type=’pty’/>
<video>
<model type=’cirrus’/>
</video>
</devices>
</domain>

Creating domain… | 0 B 00:00
Mon, 25 Jul 2011 11:07:40 DEBUG Started guest, connecting to console if requested
Mon, 25 Jul 2011 11:07:40 DEBUG Launching console callback

** (virt-viewer:5321): CRITICAL **: viewer_activate: assertion `viewer->display == NULL’ failed
Guest installation complete… restarting guest.
Mon, 25 Jul 2011 11:22:14 DEBUG Launching console callback

(virt-viewer:5844): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 400 and height -2147483648

(virt-viewer:5844): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 400 and height -2147483648

********************************************************************************
Define following XML profile LucidPV.xml utilizing same storage device (/dev/sda7) as HVM:
********************************************************************************

<domain type=’xen’>
<name>LucidPV</name>
<description></description>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader>/usr/lib/xen-4.1/bin/pygrub</bootloader>
<bootloader_args>-q</bootloader_args>
<os>
<type>linux</type>
<kernel></kernel>
</os>
<clock offset=’utc’/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/xen-4.1/bin/qemu-dm</emulator>
<disk type=’block’ device=’disk’>
<driver name=’phy’/>
<source dev=’/dev/sda7′/>
<target dev=’xvda’ bus=’xen’/>
</disk>
<interface type=’bridge’>
<mac address=’00:16:3e:63:3b:51′/>
<source bridge=’br0′/>
<script path=’/etc/xen/scripts/vif-bridge’/>
<target dev=’vif10.0′/>
</interface>
<console type=’pty’ tty=’/dev/pts/3′>
<source path=’/dev/pts/3′/>
<target type=’xen’ port=’0′/>
</console>
<input type=’mouse’ bus=’xen’/>
<graphics type=’vnc’ port=’5900′ autoport=’yes’/>
</devices>
</domain>

Then run
# virsh define LucidPV.xml



References
1.Problem with Xen 4.1 on Ubuntu 11.10 ( Oneiric Ocelot) (HVM DomUs crash)


Follow

Get every new post delivered to your Inbox.