Set up Spice-Gtk-0.7.4X (USB redirection support), LibUsbredir 0.3.1, Qemu-kvm-0.15.0 (spice enabled), Spice Server&Client 0.9.1 on Ubuntu 11.10

September 30, 2011

Following bellow is attempt to reproduce Hans de Goede blog entry at http://planet.spice-space.org/ on Ubuntu 11.10 with intent to build Spice-Gtk-0.7.4X up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk working stable with development Spice version 0.9.1. Build done on Ubuntu Oneiric include USB redirection support , but due to obvious reasons stays just a feature which cannot be used for real redirection. If USB redirection will appear to be in Qemu-kvm upstream, then Ubuntu will be ready to pick it up.
Packaged version version of Spice-Gtk-0.7.4X is built up on mentioned git repository with GTK2 and GTK3 as two sets of packages.
Libusb-1.0-2:1.0.9-3ubuntu9 is built up on git://people.freedesktop.org/~jwrdegoede/libusb (pre 1.0.9). Usbredir-0.3.1-1ubuntu5 is built up on official release usbredir-0.3.1.tar.gz. Of course no usb redirection really happens due to version of Qemu-kvm 0.15.0,compare with series of qxl and usbredir patches on top of 0.15.0 in Fedora 16. Version of Libvirt and etc. However, this version of Spice-Gtk >= 0.7.39 and should work stable with Spice 0.9.1
*********************************************************************************************************************
Running autogen.sh with exported environment variable NOCONFIGURE allows to perform it in one build per Debian’s Spice-Gtk-0.7-3 building schema.It has been already done as well. View:-
Spice-Gtk-0.7.46-314c been built per debian’s 0-7.2 schema
*********************************************************************************************************************
GTK2 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="2.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

Original file spice-gtk-3/gtk/Makefile.am was updated to handle GTK3 build, otherwise GTK3 build failed building spicy.

--- spice-gtk.orig/gtk/Makefile.am      2011-10-03 20:00:55.150133286 +0400
+++ spice-gtk/gtk/Makefile.am   2011-10-03 20:06:51.446137091 +0400
@@ -352,6 +352,7 @@
        libspice-client-glib-2.0.la             \
        $(XRANDR_LIBS)                  \
        $(GTHREAD_LIBS)                 \
+        $(GTK_LIBS)                     \
        $(NULL)

 spicy_CPPFLAGS =                       \

GTK3 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="3.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir3
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
spice-client seabios \
libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk

To install Livbirt and virtinst tools :-

$ sudo apt-get install virtinst virt-manager virt-viewer

You might have to disable apparmor profile for libvirtd

$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
$ sudo adduser $USER kvm

Link to PPA

Following builds have been debianized in current PPA :-

Spice-Gtk 0.7.46-314c
==============

prefix: /usr
c compiler: gcc -std=gnu99

Coroutine: ucontext
Audio: pulse
Target: Unix
SASL support: yes
Smartcard support: no
USB redirection support: yes
Gtk: 2.0

Now type ‘make’ to build spice-gtk

Spice-Gtk 0.7.46-314c-dirty
==============

prefix: /usr
c compiler: gcc -std=gnu99

Coroutine: ucontext
Audio: pulse
Target: Unix
SASL support: yes
Smartcard support: no
USB redirection support: yes
Gtk: 3.0

Now type ‘make’ to build spice-gtk


Set up Spice-Gtk 0.7.4X with usb redirection support on Ubuntu 11.10 ( beta 2)

September 28, 2011

Following bellow is attempt to reproduce Hans de Goede blog entry
at http://planet.spice-space.org/ on Ubuntu 11.10 just to fix bug with Windows 7 KVM after set up Spice&KVM Server via PPA “Qemu-kvm-0.15.0+noroms(spice enabled), Spice Server&Client 0.9.1, Spice-Gtk-0.7-2(via Debian)” ([2]). I’ve removed from local system all libspice_* packages after theirs install from mentioned PPA with intent to build and install new Spice-Gtk-0.7 system, based on the most recent snapshot of git://anongit.freedesktop.org/spice/spice-gtk, working stable with Spice 0.9.1. For bug description view [FFE] Please sync spice-gtk (0.7-2) from debian unstable (main) ([3]) #21. Second part of this post is describing Ubuntu PPA with packaged versions of pre (1.0.9) libusb, usbredir 0.3.1 and Spice-Gtk-0.7.4X has been built up on mentioned above git repository with GTK2

$ sudo apt-get install libpixman-1-dev libssl-dev \
libjpeg62-dev libgtk2.0-dev libgtk-3-dev \
libglib2.0-dev libcairo2-dev libpulse-dev \
libsasl2-dev libtext-csv-perl python-pyparsing \
python-gtk2-dev gobject-introspection \
libgirepository1.0-dev libcurl4-gnutls-dev \
librsvg2-dev iasl libaio-dev libasound2-dev \
libgnutls-dev libncurses5-dev libpci-dev \
libsdl1.2-dev libx11-dev nasm perl quilt \
sysv-rc uuid-dev zlib1g-dev \
libgudev-1.0-dev valac libtool gtk-doc-tools

First two steps per Hans de Goede ([1])

*******
Step 1
*******

git clone git://people.freedesktop.org/~jwrdegoede/libusb
cd libusb
git checkout -B for109 origin/for109
./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make -j2
sudo make install

ln -s /usr/lib/x86_64-linux-gnu/libusb-1.0.so /usr/lib/libusb.so

*******
Step 2
*******

tar xvfj usbredir-0.3.1.tar.bz2
cd usbredir-0.3.1
make -j2 PREFIX=/usr LIBDIR=/usr/lib
sudo make PREFIX=/usr LIBDIR=/usr/lib install

*******
Step 3
*******

$ git clone git://anongit.freedesktop.org/spice/spice-gtk
$ cd spice-gtk
$ cat setUSBREDIR.sh
export LIBUSB_CFLAGS="-I/usr/include/libusb-1.0"
export LIBUSB_LIBS="-L/usr/lib/x86_64-linux-gnu -lusb-1.0"
export LIBUSBREDIRHOST_CFLAGS="-I/usr/include"
export LIBUSBREDIRHOST_LIBS="-L/usr/lib -lusbredirhost"
$. ./setUSBREDIR.sh
$ env |grep LIB
LIBUSBREDIRHOST_LIBS=-L/usr/lib -lusbredirhost
LIBUSBREDIRHOST_CFLAGS=-I/usr/include
LIBUSB_LIBS=-L/usr/lib/x86_64-linux-gnu -lusb-1.0
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0

Then run

$ ./autogen.sh --enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="2.0" --prefix=/usr --libdir=/usr/lib

autoreconf: Entering directory `.’
autoreconf: running: autopoint –force
Copying file po/Makefile.in.in
autoreconf: running: aclocal –force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize –install –copy –force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux’.
libtoolize: copying file `build-aux/config.guess’
libtoolize: copying file `build-aux/config.sub’
libtoolize: copying file `build-aux/install-sh’
libtoolize: copying file `build-aux/ltmain.sh’
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4′.
libtoolize: copying file `m4/libtool.m4′
libtoolize: copying file `m4/ltoptions.m4′
libtoolize: copying file `m4/ltsugar.m4′
libtoolize: copying file `m4/ltversion.m4′
libtoolize: copying file `m4/lt~obsolete.m4′
autoreconf: running: /usr/bin/autoconf –force
autoreconf: running: /usr/bin/autoheader –force
autoreconf: running: automake –add-missing –copy –force-missing
autoreconf: Leaving directory `.’
You should update your ‘aclocal.m4′ by running aclocal.
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking how to print strings… printf
checking for style of include used by make… GNU
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking dependency style of gcc… gcc3
checking for a sed that does not truncate output… /bin/sed
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for fgrep… /bin/grep -F
checking for ld used by gcc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface… BSD nm
checking whether ln -s works… yes
checking the maximum length of command line arguments… 1572864
checking whether the shell understands some XSI constructs… yes
checking whether the shell understands “+=”… yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format… func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format… func_convert_file_noop
checking for /usr/bin/ld option to reload object files… -r
checking for objdump… objdump
checking how to recognize dependent libraries… pass_all
checking for dlltool… no
checking how to associate runtime and link libraries… printf %s\n
checking for ar… ar
checking for archiver @FILE support… @
checking for strip… strip
checking for ranlib… ranlib
checking command to parse /usr/bin/nm -B output from gcc object… ok
checking for sysroot… no
checking for mt… mt
checking if mt is a manifest tool… no
checking how to run the C preprocessor… gcc -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for dlfcn.h… yes
checking for objdir… .libs
checking if gcc supports -fno-rtti -fno-exceptions… no
checking for gcc option to produce PIC… -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works… yes
checking if gcc static flag -static works… yes
checking if gcc supports -c -o file.o… yes
checking if gcc supports -c -o file.o… (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
checking whether -lc should be explicitly linked in… no
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking whether to enable maintainer-specific portions of Makefiles… yes
checking whether NLS is requested… yes
checking for intltool >= 0.40.0… 0.41.1 found
checking for intltool-update… /usr/bin/intltool-update
checking for intltool-merge… /usr/bin/intltool-merge
checking for intltool-extract… /usr/bin/intltool-extract
checking for xgettext… /usr/bin/xgettext
checking for msgmerge… /usr/bin/msgmerge
checking for msgfmt… /usr/bin/msgfmt
checking for gmsgfmt… /usr/bin/msgfmt
checking for perl… /usr/bin/perl
checking for perl >= 5.8.1… 5.12.4
checking for XML::Parser… ok
checking for msgfmt… (cached) /usr/bin/msgfmt
checking for gmsgfmt… (cached) /usr/bin/msgfmt
checking for xgettext… (cached) /usr/bin/xgettext
checking for msgmerge… (cached) /usr/bin/msgmerge
checking for ld used by GCC… /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld… yes
checking for shared library run path origin… done
checking for CFPreferencesCopyAppValue… no
checking for CFLocaleCopyCurrent… no
checking for GNU gettext in libc… yes
checking whether to use NLS… yes
checking where the gettext function comes from… libc
checking for pkg-config… /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0… yes
checking for gtkdoc-check… /usr/bin/gtkdoc-check
checking for gtkdoc-rebase… /usr/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf… /usr/bin/gtkdoc-mkpdf
checking whether to build gtk-doc documentation… no
checking for gcc… (cached) gcc
checking whether we are using the GNU C compiler… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ISO C89… (cached) none needed
checking dependency style of gcc… (cached) gcc3
checking for gcc option to accept ISO C99… -std=gnu99
checking whether gcc -std=gnu99 and cc understand -c and -o together… yes
checking whether byte ordering is bigendian… no
checking for python2… no
checking for python… /usr/bin/python
checking if -Wl,–version-script works… yes
checking for native Win32… no
checking sys/ipc.h usability… yes
checking sys/ipc.h presence… yes
checking for sys/ipc.h… yes
checking sys/shm.h usability… yes
checking sys/shm.h presence… yes
checking for sys/shm.h… yes
checking sys/socket.h usability… yes
checking sys/socket.h presence… yes
checking for sys/socket.h… yes
checking netinet/in.h usability… yes
checking netinet/in.h presence… yes
checking for netinet/in.h… yes
checking arpa/inet.h usability… yes
checking arpa/inet.h presence… yes
checking for arpa/inet.h… yes
checking for PROTOCOL… yes
checking for PIXMAN… yes
checking for CELT051… yes
checking for SSL… yes
checking sasl/sasl.h usability… yes
checking sasl/sasl.h presence… yes
checking for sasl/sasl.h… yes
checking for sasl_client_init in -lsasl2… yes
checking which gtk+ version to compile against… 2.0
checking for GTK… yes
checking for XRANDR… yes
checking X11/XKBlib.h usability… yes
checking X11/XKBlib.h presence… yes
checking for X11/XKBlib.h… yes
checking What rendering backend to use….. cairo
checking for GLIB2… yes
checking for GOBJECT2… yes
checking for GIO… yes
checking for CAIRO… yes
checking for GTHREAD… yes
checking for PULSE… yes
checking for jpeg_destroy_decompress in -ljpeg… yes
checking for jpeglib.h…
checking for deflate in -lz… yes
checking for GUDEV… yes
checking for LIBUSB… yes
checking for LIBUSBREDIRHOST… yes
checking for makecontext… yes
checking for swapcontext… yes
checking for getcontext… yes
checking for GOBJECT_INTROSPECTION… yes
checking for gobject-introspection… yes
checking for valac… /usr/bin/valac
checking /usr/bin/valac is at least version 0.11.7… yes
checking for PYGTK… yes
checking for python version… 2.7
checking for python platform… linux2
checking for python script directory… ${prefix}/lib/python2.7/dist-packages
checking for python extension module directory… ${exec_prefix}/lib/python2.7/dist-packages
checking whether /usr/bin/python version >= 2.0… yes
checking for headers required to compile python extensions… found
checking for supported warning flags…
checking whether gcc -std=gnu99 supports -Wall… yes
checking whether gcc -std=gnu99 supports -Wno-sign-compare… yes
checking whether gcc -std=gnu99 supports -Wno-deprecated-declarations… yes
checking which warning flags were supported… -Wall -Wno-sign-compare -Wno-deprecated-declarations
configure: creating ./config.status
config.status: creating Makefile
config.status: creating spice-client-glib-2.0.pc
config.status: creating spice-client-gtk-2.0.pc
config.status: creating spice-client-gtk-3.0.pc
config.status: creating spice-controller.pc
config.status: creating common/Makefile
config.status: creating common/win/Makefile
config.status: creating common/win/my_getopt-1.5/Makefile
config.status: creating data/Makefile
config.status: creating data/spicy.desktop.in
config.status: creating data/spicy.nsis
config.status: creating po/Makefile.in
config.status: creating python_modules/Makefile
config.status: creating gtk/Makefile
config.status: creating gtk/controller/Makefile
config.status: creating doc/Makefile
config.status: creating doc/reference/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing po/stamp-it commands
configure:

Spice-Gtk 0.7.44-3867-dirty
==============

prefix: /usr
c compiler: gcc -std=gnu99

Coroutine: ucontext
Audio: pulse
Target: Unix
SASL support: yes
Smartcard support: no
USB redirection support: yes
Gtk: 2.0

Now type ‘make’ to build spice-gtk

$ make -j3
$ sudo make install



Ubuntu Oneiric’s packaged version version of Spice-Gtk-0.7.4X is built up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk with GTK2 and GTK3 as two builds.Libusb-1.0-2:1.0.9-3ubuntu9 is built up on git://people.freedesktop.org/~jwrdegoede/libusb (pre 1.0.9). Usbredir-0.3.1-1ubuntu5 is built up on official release usbredir-0.3.1.tar.gz. Of course no usb redirection really happens due to version of Qemu-kvm 0.15.0,compare with series of qxl and usbredir patches on top of 0.15.0 in Fedora 16. However, this version of Spice-Gtk >= 0.7.39 and should work stable with Spice 0.9.1

GTK2 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="2.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

GTK3 build debian/rules contains :-

override_dh_auto_configure:
./autogen.sh \
--enable-vala --disable-smartcard \
--enable-introspection --enable-werror=no \
--with-gtk="3.0" --prefix=/usr --libdir=/usr/lib \
LIBUSB_CFLAGS=-I/usr/include/libusb-1.0 \
LIBUSB_LIBS='-L/usr/lib/*-linux-gnu -lusb-1.0' \
LIBUSBREDIRHOST_CFLAGS=-I/usr/include \
LIBUSBREDIRHOST_LIBS='-L/usr/lib -lusbredirhost'

*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir3
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
spice-client seabios \
libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-4 libspice-client-glib-2.0-dev \
libspice-client-gtk-2.0-1 libspice-client-gtk-2.0-dev \
libspice-client-gtk-3.0-1 libspice-client-gtk-3.0-dev \
python-spice-client-gtk spice-client-gtk

To install Libvirt and virtinst tools :-

$ sudo apt-get install virtinst virt-manager virt-viewer

You might have to disable apparmor profile for libvirtd

$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
$ sudo adduser $USER kvm

Link to PPA
References
1.http://planet.spice-space.org/
2.https://launchpad.net/~bderzhavets/+archive/spice-test3
3.https://bugs.launchpad.net/ubuntu/oneiric/+bug/828785


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


Follow

Get every new post delivered to your Inbox.