Attempt to build Qemu 1.3 spice enabled on Ubuntu 12.10

January 29, 2013

Qemu 1.3 doesn’t support spice on Ubuntu 12.10 in meantime. View build log

https://launchpadlibrarian.net/129880187/buildlog_ubuntu-quantal-amd64.qemu_1.3.0%2Bdfsg-1~exp3ubuntu9_FAILEDTOBUILD.txt.gz

ERROR
ERROR: User requested feature spice
ERROR: configure was not able to find it
ERROR
make: *** [configure-stamp] Error 1
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2
******************************************************************************
Build finished at 20130129-1938
FAILED [dpkg-buildpackage died]
******************************************************************************

 

View Serge Hallyn’s response down here :

https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1109256

Some private information about myself may be found at

http://nauchi61.ru


Set up Qemu-kvm 1.1 & Spice-gtk 0.12 with USB redirection on Ubuntu Precise

June 24, 2012

$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir81
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
seabios vgabios \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-1 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

$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

$ sudo adduser $USER libvirtd
REBOOT

Link to PPA  Qemu-kvm 1.1


Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise

May 22, 2012

This post follows up Bug #998435 qemu-kvm-spice doesn’t support spice/qxl installs

Build bellow is based on upstream (vs linaro) version of qemu-kvm 1.0 on Ubuntu Precise. View bug description above regarding details of qemu-kvm-spice misbehavior.

$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir80
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-1 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

$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

$ sudo adduser $USER libvirtd
REBOOT

*************************************************************************************
Link to PPA Set up qemu-kvm-1.0+noroms as spice enabled qemu server
*************************************************************************************

Set up qemu-kvm-1.0+noroms as spice enabled qemu server & Spice 0.10.1 with Visio patches for Windows
*************************************************************************************
Link to PPA Set up qemu-kvm-1.0+noroms as spice enabled qemu server & Spice 0.10.1 with Visio patches for Windows
*************************************************************************************


Set up Spice-Gtk 0.12 with USB redirection on Ubuntu Precise

May 2, 2012

Qemu-kvm 1.0 has been built based on branch
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.0-usbredir
as of 04/29/2012. It contains all required usb redirection patches on
top of QEMU-KVM 1.0 release

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ cd ..
$ cp -R qemu qemu-kvm-1.0-usbredir043012

libcap-dev added to debian/control for virtfs support.

Build requires spice and spice-protocol 0.10.1 and the most recent usbredir 0.4.3
as of 04/02/2012.

$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir75
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-1 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

$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

$ sudo adduser $USER libvirtd
REBOOT

*************************************************************************
Link to PPA Set up Spice-Gtk 0.12 on Ubuntu Precise (v.3)
*************************************************************************


Set up Spice-Gtk 0.11 with USB redirection on Ubuntu Precise

March 17, 2012

Build requires spice & spice-protocol 0.10.1 and the most recent usbredir 0.4.3 as of 04/02/2012. View also recent commit at http://cgit.freedesktop.org/spice/spice-gtk converted to 0001-usbredir-Check-for-existing-usb-channels-after-libus.patch for spice-gtk-0.11.
Qemu-kvm 1.0 has been built based on branch http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.0-usbredir
as of 04/05/2012.
It contains all required usb redirection patches on top of QEMU-KVM 1.0 release

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ cd ..
$ cp -R qemu qemu-kvm-1.0-usbredir040712

****************
Link to PPA V.4
****************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir71
$ $ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-1 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

$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

$ sudo adduser $USER libvirtd
REBOOT
View also bug report for F16 affecting Ubuntu as well



Start VM with virtfs support :
$ sudo /usr/bin/kvm -cpu host -enable-kvm \
-name VF15HQ -m 2048 \
-drive file=/dev/sdb5,if=virtio,media=disk,aio=native,cache=off \
-net nic,model=virtio -net user -localtime \
-usb -vga qxl -spice port=5900,disable-ticketing \
-device virtio-serial \
-chardev spicevmc,id=vdagent,name=vdagent \
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
-readconfig /etc/qemu/ich9-ehci-uhci.cfg \
-chardev spicevmc,name=usbredir,id=usbredirchardev1 \
-device usb-redir,chardev=usbredirchardev1, \
id=usbredirdev1,debug=3 \
-chardev spicevmc,name=usbredir, \
id=usbredirchardev2 \
-device usb-redir,chardev=usbredirchardev2, \
id=usbredirdev2,debug=3 \
-chardev spicevmc,name=usbredir,\
id=usbredirchardev3 \
-device usb-redir,chardev=usbredirchardev3, \
id=usbredirdev3,debug=3 \
-virtfs local,path=/home/boris,security_model=passthrough,mount_tag=host_share





do_spice_init: starting 0.10.1
spice_server_add_interface: SPICE_INTERFACE_MIGRATION
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
display_channel_create: create display channel
cursor_channel_create: create cursor channel
*** EHCI support is under development ***
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
reds_handle_auth_mechanism: Auth method: 1
reds_handle_main_link:
reds_disconnect:
reds_show_new_channel: channel 1:0, connected successfully, over Non Secure link
main_channel_link: add main channel client
reds_handle_main_link: NEW Client 0x7f5ed6e44cb0 mcc 0x7f5ed6e443a0 connect-id 1804289383
main_channel_handle_parsed: net test: latency 0.225000 ms, bitrate 9061946902 bps (8642.146017 Mbps)
reds_handle_auth_mechanism: Auth method: 1
reds_show_new_channel: channel 3:0, connected successfully, over Non Secure link
inputs_connect: inputs channel client create
reds_handle_auth_mechanism: Auth method: 1
reds_show_new_channel: channel 4:0, connected successfully, over Non Secure link
red_dispatcher_set_cursor_peer:
reds_handle_auth_mechanism: Auth method: 1
handle_dev_cursor_connect: cursor connect
red_connect_cursor: add cursor channel client
listen_to_new_client_channel: NEW ID = 0
reds_show_new_channel: channel 2:0, connected successfully, over Non Secure link
red_dispatcher_set_display_peer:
handle_dev_display_connect: connect
handle_new_display_channel: add display channel client
reds_handle_auth_mechanism: Auth method: 1
handle_new_display_channel: New display (client 0x7f5ed6e44cb0) dcc 0x7f5e30602c30 stream 0x7f5ed6e450a0
handle_new_display_channel: jpeg disabled
handle_new_display_channel: zlib-over-glz disabled
listen_to_new_client_channel: NEW ID = 0
reds_show_new_channel: channel 9:0, connected successfully, over Non Secure link
reds_handle_auth_mechanism: Auth method: 1
reds_show_new_channel: channel 9:1, connected successfully, over Non Secure link
kvm: usbredirparser info: Peer version: spice-gtk 0.11

kvm: usbredirparser info: Peer version: spice-gtk 0.11

reds_handle_auth_mechanism: Auth method: 1
reds_show_new_channel: channel 9:2, connected successfully, over Non Secure link
kvm: usbredirparser info: Peer version: spice-gtk 0.11

display_channel_client_wait_for_init: creating encoder with id == 0
spice_server_add_interface: SPICE_INTERFACE_TABLET
handle_dev_set_mouse_mode: mouse mode 2
display_channel_release_item: not pushed (101)
spice_server_remove_interface: remove SPICE_INTERFACE_TABLET
inputs_detach_tablet:
handle_dev_set_mouse_mode: mouse mode 1
red_channel_client_disconnect: 0x7f5e30602c30 (channel 0x7f5e30045920 type 2 id 0)
display_channel_client_on_disconnect:
*********************************************
F17 usbredir enabled VM in spicy session
*********************************************







Set up Spice-Gtk 0.9 with USB redirection on Ubuntu Precise

February 2, 2012

******************************************************************************
UPDATE on 02/14/2012 Set up Spice-Gtk 0.9 on Ubuntu Oneiric
******************************************************************************
New upstream release.
– add USB redirection support, see Hans comments in the log and that
post for details: http://hansdegoede.livejournal.com/11084.html
– introduce SpiceGtkSession to deal with session-wide Gtk events, such
as clipboard, instead of doing it per display
– many cursor and keyboard handling improvements
– handle the new “semi-seamless” migration
– support new Spice mini-headers
– better coroutines: fibers on windows & jmp on linux
– add Vala vapi bindings generation
– Add command line options for setting the cache size and the glz
window size
– Add a USB device selection widget to libspice-client-gtk
– many bug fixes and code improvements
Build requires spice-protocol 0.10.1 and the most recent usbredir 0.3.3
******************************************************************************************
Link to PPA Set up Spice-Gtk 0.9 on Ubuntu Precise (v.3)
******************************************************************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir64
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
libspice-protocol-dev libspice-server-dev \
libspice-client-glib-2.0-1 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

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

To start default network :-

sudo virsh net-start default
sudo virsh net-autostart default

Works with QEMU-KVM 1.0 with no special patch

You can now redirect already plugged in devices / un-redirect devices without unplugging them, go to the Input menu and click “Select USB Devices for redirection”.









However , I still have to run “sudo spicy” to get USB redirection on Ubuntu. Otherwhise, following error appears on console :-
“spice-client-glib-usb-helper: Error setting facl: Operation not permitted”


Qemu-kvm 1.0 & Spice-protocol 0.10.1 & Spice-Gtk 0.8 USB Redirection on Ubuntu Precise

January 17, 2012

In other words posting may be named “Set up Spice-Gtk 0.8 on Ubuntu Precise”. Short list of the changes per [1] :

- add USB redirection support, see Hans comments in the log and that
post for details: http://hansdegoede.livejournal.com/11084.html
- introduce SpiceGtkSession to deal with session-wide Gtk events, such
as clipboard, instead of doing it per display
- many cursor and keyboard handling improvements
- handle the new “semi-seamless” migration
- support new Spice mini-headers
- better coroutines: fibers on windows & jmp on linux
- add Vala vapi bindings generation
- many bug fixes and code improvements

Build requires spice-protocol 0.10.1 and the most recent usbredir 0.3.3
******************************************************************************************
Link to PPA Set up Spice-Gtk 0.8 on Ubuntu Precise (v.2)
View also PPA Set up Spice-Gtk 0.8 on Ubuntu Precise (v.3)
******************************************************************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir61
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
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

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

To start default network :-

sudo virsh net-start default
sudo virsh net-autostart default

Works with QEMU-KVM 1.0 with no special patch





References
1.1.http://www.mail-archive.com/spice-devel@lists.freedesktop.org/msg06659.html


QEMU-KVM 1.0 patching to support USB Redirection for Ubuntu Precise as of 12/29/2011

December 30, 2011

************************************************************************************
UPDATE on 01/13/2012 Libvirt 0.9.9-1 and 0.9.8-2 on Ubuntu Precise (libnl3 > 3.2)

View Build libvirt 0.9.9-1 Build-Depend on libnl-3-dev on Precise
View Build libvirt 0.9.8-2 Build-Depend on libnl-3-dev on Precise
*************************************************************************************
Two options of building patched QEMU-KVM 1.0 are considered bellow.

First one : Qemu-kvm 1.0 has been built based on branch qemu-kvm-1.0-usbredir as of 12/29/2011. It contains all required usb redirection patches on top of QEMU-KVM 1.0 release

Second one : Patching QEMU-KVM 1.0 (core git tree) via extracted patches set to support USB redirection on Ubuntu Precise. Generating patches set via commands
$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ git format-patch -M -C –output-directory \
/tmp/patches 30c044521889195f54a9f2c21310894f545994e8

First option) Qemu-kvm 1.0 has been built based on branch qemu-kvm-1.0-usbredir
as of 12/29/2011. It contains all required usb redirection patches on
top of QEMU-KVM 1.0 release

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ cd ..
$ cp -R qemu qemu-kvm-1.0-usbredir1

Environment:-
Libusb 1.0.9~rc3 (official version)
Spice 0.10.0
Spice-Gtk-0.7.159
Libvirt 0.9.8
************************************
Setting up system via PPA
************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir53
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
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

For 0.7.159 spice-client-gtk.install updated to accommodate
/usr/bin/spice-client-glib-usb-acl-helper

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

To start default network :-

sudo virsh net-start default
sudo virsh net-autostart default

*************************************************************************************************
Second option) Patching QEMU-KVM 1.0 (core git tree) via extracted patches set to support USB redirection on Ubuntu Precise
*************************************************************************************************
Patching QEMU-KVM 1.0 (core git tree) via extracted patches set from

http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.0-usbredir

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ git format-patch -M -C –output-directory \
/tmp/patches 30c044521889195f54a9f2c21310894f545994e8

$ ls /tmp/patches
0001-usb-redir-Clear-iso-irq-error-when-stopping-the-stre.patch
0002-usb-redir-Dynamically-adjust-iso-buffering-size-base.patch
0003-usb-redir-Pre-fill-our-isoc-input-buffer-before-send.patch
0004-usb-redir-Try-to-keep-our-buffer-size-near-the-targe.patch
0005-usb-redir-Improve-some-debugging-messages.patch
0006-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch
0007-char-Add-a-QemuChrHandlers-struct-to-initialise-char.patch
0008-iohandlers-Add-enable-disable_write_fd_handler-funct.patch
0009-char-Add-framework-for-a-write-unblocked-callback.patch
0010-char-Update-send_all-to-handle-nonblocking-chardev-w.patch
0011-char-Equip-the-unix-tcp-backend-to-handle-nonblockin.patch
0012-char-Throttle-when-host-connection-is-down.patch
0013-virtio-console-Enable-port-throttling-when-chardev-i.patch
0014-spice-qemu-char.c-add-throttling.patch
0015-spice-qemu-char.c-remove-intermediate-buffer.patch
0016-usb-redir-Add-flow-control-support.patch
0017-virtio-serial-bus-replay-guest_open-on-migration.patch
0018-char-Disable-write-callback-if-throttled-chardev-is-.patch

Patches set applies to snapshot of git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
checkout tag qemu-kvm-1.0.
$ git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
$ cd qemu-kvm
$ git checkout qemu-kvm-1.0 -b work
$ cd ..
$ cp -R qemu-kvm qemu-kvm-1.0-release
The last folder is snapshot for patching during debian build

Environment:-
Libusb 1.0.9~rc3 (official version)
Spice 0.10.0
Spice-Gtk-0.7.159
Libvirt 0.9.8

******************************
Setting up system via PPA
******************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir54
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
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

For 0.7.159 spice-client-gtk.install updated to accommodate
/usr/bin/spice-client-glib-usb-acl-helper

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

To start default network :-

sudo virsh net-start default
sudo virsh net-autostart default


Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk 0.7.159 & Libusb 1.0.9-rc3 (official) for Ubuntu Precise

December 27, 2011

**********************************************************************************************
UPDATE on 12/29/2011
**********************************************************************************************
View PPA https://launchpad.net/~bderzhavets/+archive/lib-usbredir53
Qemu-kvm 1.0 (in this PPA) has been built based on branch qemu-kvm-1.0-usbredir as of 12/29/2011. It contains all required usb redirection patches on top of QEMU-KVM 1.0 release

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ cd ..
$ cp -R qemu qemu-kvm-1.0-usbredir1

********************************************************************************************
Procedure following bellow set up Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk 0.7.159 & Libusb 1.0.9-rc3 (official) on daily build of Ubuntu Precise (kernel 3.2.0-6). Qemu-kvm has been built via git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git, tag qemu-kvm-1.0. There is only one change to official libusb 1.0.9~rc3.

CFLAGS = -fPIC -Wall vs CFLAGS = -Wall in debian/rules.

*****************************
Set up system via PPA
*****************************

$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir51
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
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

For Spice-Gtk-0.7.159 spice-client-gtk.install updated to accommodate
/usr/bin/spice-client-glib-usb-acl-helper. Packaging schema follows [1]
to support gobject-introspection.

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd

RELOGIN

To set up Libvirt 0.9.8 and related packages via PPA mentioned above :-
$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

To start default network :-

sudo virsh net-start default
sudo virsh net-autostart default

Works with QEMU-KVM 1.0 with no special patch.
To succeed with with Spice-Gtk-0.7.159 build I had to spleet GTK2 and GTK3 builds
into two set of packages.
GTK2 build debian/rules contains :-

override_dh_auto_configure:
./configure \
--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:
./configure \
--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'

I was not expecting Qemu&Spice USB redirection to work.
However, it seems to be working.





Snapshot on Server



Snapshot on remote WS



Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk-0.7.81 USB redirection for Ubuntu Precise, Oneiric and Linux Mint 12 (Lisa)

November 29, 2011

Following bellow is attempt to reproduce Hans de Goede blog entry at http://planet.spice-space.org/ on Ubuntu 12.04 and 11.10 with intend to build Qemu-kvm 1.0 with usb redirection network support per http://planet.spice-space.org/. Current build qemu-kvm for Ubuntu Precise is based on branch http://cgit.freedesktop.org/~jwrdegoede/qemu/. View similar PPA for Ubuntu Oneiric and Linux Mint 12 (Lisa) Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk-0.7.81 USB redirection and Libvirt 0.9.7-2 for Ubuntu Oneiric(v.6).Spice-Gtk-0.7.81 has been built up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk with usb redirection support working stable with Spice 0.10.0. Builds have been done on Ubuntu Precise and Oneiric as well.Packaged version version of Spice-Gtk-0.7.81 is built up on mentioned git repository. 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, however requiring several updates to debian/control and debian/rules due to snapshots have to be done from current git tree.Upgrade version of Libvirt up to 0.9.7-2 allows to avoid using “qemu” command line (libvirt 0.9.2) and follow http://planet.spice-space.org/ update VM’s XML profile under /etc/libvirt/qemu/ as suggested in second blog entry of Hans de Goede.

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ cd ..
$ cp -R qemu qemu-kvm-1.0-usbredir

Intermediate release :-

http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.0-usbredir

clearly demonstrates that all usb redirection patches won’t be in Qemu-kvm 1.0 release

Libusb build is based on libusb-1.0.9-rc3 official package
Qemu-kvm 1.0 debian/rules contains:-

./configure \
–target-list=”x86_64-softmmu i386-softmmu x86_64-linux-user i386-linux-user” \
–prefix=/usr \
–interp-prefix=/etc/qemu-binfmt/%M \
–disable-blobs \
–disable-strip \
–enable-spice \
–enable-usb-redir \
$(conf_arch)

VirtFS support is available.

*****************************************
To install packages from Precise PPA
*****************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir56
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common qemu-utils \
spice-client libusb-1.0-0 libusb-1.0-0-dev \
libusbredir libusbredir-dev usbredir-server \
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 \
gir1.2-spice-client-glib-2.0 \
gir1.2-spice-client-gtk-2.0 \
gir1.2-spice-client-gtk-3.0

$ sudo apt-get install virtinst virt-manager virt-viewer
$ sudo adduser $USER libvirtd
$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

Successful install looks like :-

boris@UbuntuPrecise:~$ dpkg -l |grep libspice
ii  libspice-client-glib-2.0-4         0.7.81~4f76-2ubuntu6    GObject for communicating with Spice servers (runtime library)
ii  libspice-client-glib-2.0-dev       0.7.81~4f76-2ubuntu6    GObject for communicating with Spice servers (development files)
ii  libspice-client-gtk-2.0-1          0.7.81~4f76-2ubuntu6    GTK2 widget for SPICE clients (runtime library)
ii  libspice-client-gtk-2.0-dev        0.7.81~4f76-2ubuntu6    GTK2 widget for SPICE clients (development files)
ii  libspice-client-gtk-3.0-1          0.7.81~4f76-2ubuntu6    GTK3 widget for SPICE clients (runtime library)
ii  libspice-client-gtk-3.0-dev        0.7.81~4f76-2ubuntu6    GTK3 widget for SPICE clients (development files)
ii  libspice-protocol-dev              0.10.0-2ubuntu2         SPICE protocol headers
ii  libspice-server-dev                0.10.0-2ubuntu7         Header files and development documentation for spice-server
ii  libspice-server1                   0.10.0-2ubuntu7         Implements the server side of the SPICE protocol

boris@UbuntuPrecise:~$ dpkg -l |grep qemu
ii  qemu                                1.0-usbredir-2ubuntu3   dummy transitional package from qemu to qemu-kvm
ii  qemu-common                         1.0-usbredir-2ubuntu3   qemu common functionality (bios, documentation, etc)
ii  qemu-kvm                            1.0-usbredir-2ubuntu3   Full virtualization on i386 and amd64 hardware

boris@UbuntuPrecise:~$ dpkg -l |grep libvirt
ii  libvirt-bin                         0.9.7-2ubuntu2         programs for the libvirt library
ii  libvirt0                            0.9.7-2ubuntu2         library for interfacing with different virtualization systems
ii  python-libvirt                      0.9.7-2ubuntu2         libvirt Python bindings



boris@boris-System-Product-P5Q3:~$ virsh version
Compiled against library: libvir 0.9.7
Using library: libvir 0.9.7
Using API: QEMU 0.9.7
Running hypervisor: QEMU 0.15.92

Per Hans de Goede – first create file /etc/qemu/ich9-ehci-uhci.cfg

[device "ehci"]
driver = "ich9-usb-ehci1"
addr = "1d.7"
multifunction = "on"

[device "uhci-1"]
driver = "ich9-usb-uhci1"
addr = "1d.0"
multifunction = "on"
masterbus = "ehci.0"
firstport = "0"

[device "uhci-2"]
driver = "ich9-usb-uhci2"
addr = "1d.1"
multifunction = "on"
masterbus = "ehci.0"
firstport = "2"

[device "uhci-3"]
driver = "ich9-usb-uhci3"
addr = "1d.2"
multifunction = "on"
masterbus = "ehci.0"
firstport = "4"

Upgrade version of Libvirt up to 0.9.7 allows to avoid using “qemu” command line (libvirt 0.9.2) and follow http://planet.spice-space.org/ update VM’s XML profile under /etc/libvirt/qemu/ as suggested in second blog entry of Hans de Goede (September 09, 2011):-
Change the first line from: <domain type=’kvm’> to:
<domain type=’kvm’ xmlns:qemu=’http://libvirt.org/schemas/domain/qemu/1.0′&gt;
And add the following lines at the end, above the “</domain>” line:
<qemu:commandline>
<qemu:arg value=’-readconfig’/>
<qemu:arg value=’/etc/qemu/ich9-ehci-uhci.cfg’/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev1′/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3′/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev2′/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=ehci.0,debug=3′/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev3′/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev3,id=usbredirdev3,bus=ehci.0,debug=3′/>
</qemu:commandline>

Then run :-

# /etc/init.d/libvirt-bin restart







Remote Qemu&Spice USB redirection. WIN7 VM is running on Server. USB pen plugged in workstation located on the same LAN, with Spice-Gtk-0.7.81 installed. Connection installed via spicy running by root.





Qemu-kvm 0.15.1 & Spice(0.10.0) & Libvirt 0.9.7-2 USB Redirection support for Ubuntu Precise and Oneiric

November 14, 2011

***********************************************************************
Update on 11/29/2011 . View also build based on Qemu-kvm-1.0-rc2
***********************************************************************
$ gir clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-1.0-usbredir origin/qemu-kvm-1.0-usbredir
$ cp -R qemu qemu-kvm-1.0-usbredir
Libusb build is based on git://git.libusb.org/libusb.git – 1.0.9-rc1
libusb-1.0.9-rc1 release candidate
Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk-0.7.81 USB redirection for Ubuntu Precise (v.6)
***********************************************************************
Following bellow is attempt to reproduce Hans de Goede blog entry at http://planet.spice-space.org/ on Ubuntu 12.04 and 11.10 with intend to build Qemu-kvm 0.15.1 with usb redirection network support per http://planet.spice-space.org/ via git repository git://people.freedesktop.org/~jwrdegoede/qemu.
Qemu-kvm 0.15.1 has been patched via top 28 commits from

http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-0.15.0-usbredir

Patches set for debian build may be generated as follows :
$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-0.15.0-usbredir origin/qemu-kvm-0.15.0-usbredir
$ mkdir -p /tmp/patches
$ git format-patch -M -C –output-directory \
/tmp/patches ea2798c1ebe0c12d5feb7d7471a999ea0671ef2f

Spice-Gtk-0.7.81 has been built up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk with usb redirection support working stable with Spice 0.10.0. Builds have been done on Ubuntu Precise and Oneiric as well.Packaged version version of Spice-Gtk-0.7.81 is built up on mentioned git repository. 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, however requiring several updates to debian/control and debian/rules due to snapshots have to be done from current git tree.Upgrade version of Libvirt up to 0.9.7-2 allows to avoid using “qemu” command line (libvirt 0.9.2) and follow http://planet.spice-space.org/ update VM’s XML profile under /etc/libvirt/qemu/ as suggested in second blog entry of Hans de Goede.
Per Daniel Berrange: In the same way that SSH allows you to setup hostname aliases in $HOME/.ssh/config, libvirt will now allow you to setup URI aliases in $HOME/.libvirt/libvirt.conf (if you are running unprivileged) or /etc/libvirt/libvirt.conf (if you are running as root). NB do not confuse this file with libvirtd.conf which is a server side libvirtd daemon config file. Due to spice upgrade users should be able to run Spice server on 32-bit OS (Precise daily builds). View also Qemu-kvm 0.15.1 & Spice(0.10.0) & Libvirt 0.9.7-2 USB Redirection support for Ubuntu Oneiric.
Libvirt upgrade is based on
$ git clone git://anonscm.debian.org/pkg-libvirt/libvirt.git
Tip commit bd0fbb5542d8f96209611bb2db4f58a5176275bb.
View : http://anonscm.debian.org/gitweb/?p=pkg-libvirt/libvirt.git

Qemu-kvm debian/rules contains:-

./configure \
–target-list=”x86_64-softmmu i386-softmmu x86_64-linux-user i386-linux-user” \
–prefix=/usr \
–interp-prefix=/etc/qemu-binfmt/%M \
–disable-blobs \
–disable-strip \
–enable-spice \
–enable-usb-redir \
$(conf_arch)

VirtFS support is available.

*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/spice-010
$ 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 \
gir1.2-spice-client-glib-2.0 \
gir1.2-spice-client-gtk-2.0 \
gir1.2-spice-client-gtk-3.0

$ sudo groupadd libvirtd
$ sudo adduser $USER libvirtd
RELOGIN
$ 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





Rebuilding 3.1 & 3.0 Linux Kernel in Ubuntu style to support PV-on-HVM

November 6, 2011

*********************************************************************************************************************
Stock kernel for Oneiric (3.0.X.Y) has same Xen configuration as 3.1. I have filed bug against 3.1 at Launchpad regarding kernel configuration fix,however, in meantime i had to pass through procedure bellow with intend to benefit from PV-on-HVM feature providing by Xen 4.1.X Hypervisor and properly built 3.0 or 3.1 linux kernel. I follow [1] step by step updating config.flavour.pvhvm as required to perform kernel rebuild. In meantime status of bug at Launchpad is “Triaged”.There is another attractive option – just add driver xen-platform-pci.ko to initrd.img as post installation procedure. Then reboot with xen_platform_pci=1. I choosed kernel rebuild as option following core development [2]
**********************************************************************************************************************

A) To rebuild 3.1 :-
$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git source
B) To rebuild 3.0 :-
$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-oneiric.git source
$ cd source
$ git tag|grep Ubu|sort -V
Ubuntu-3.1.0-1.0
Ubuntu-3.1.0-1.1
Ubuntu-3.1.0-2.2
Ubuntu-3.1.0-2.3
Checkout branch and give it name "pvhvm"
$ git checkout Ubuntu-3.1.0-2.3 -b pvhvm
$ cp debian.master/config/amd64/config.flavour.generic debian.master/config/amd64/config.flavour.pvhvm
$ fakeroot debian/rules clean
$ debian/rules updateconfigs
$ debian/rules editconfigs
*************************************************************
$ Do you want to edit config: amd64/config.flavour.pvhvm? [Y/n]
*************************************************************
#
# Config options for config.flavour.pv automatically generated by splitconfig.pl
#
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_INTEL_IDLE=y
CONFIG_NR_CPUS=256
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_VIRTIO=m
CONFIG_VIRTIO_BLK=m
CONFIG_VIRTIO_NET=m
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_RING=m
CONFIG_XEN_BLKDEV_FRONTEND=m
CONFIG_XEN_FBDEV_FRONTEND=y
CONFIG_XEN_NETDEV_FRONTEND=m
CONFIG_XEN_PLATFORM_PCI=y
CONFIG_XEN_XENBUS_FRONTEND=y






Make sure you have updated config.flavour.pvhvm before proceed.
****************
Backup config
****************

$ cp debian.master/config/amd64/config.flavour.pvhvm ../.
$ git reset --hard
$ git clean -df
To pick up number of previous version.
$ ls debian.master/abi
3.1.0-2.2
$ cp debian.master/abi/3.1.0-2.2/amd64/generic debian.master/abi/3.1.0-2.2/amd64/pvhvm
$ cp debian.master/abi/3.1.0-2.2/amd64/generic.modules debian.master/abi/3.1.0-2.2/amd64/pvhvm.modules

***************
Restore config
***************

cp ../config.flavour.pvhvm debian.master/config/amd64/

File: debian.master/etc/getabis

Search for the line:
getall amd64 generic server virtual
Change it in:
getall amd64 generic server virtual pvhvm

File: debian.master/rules.d/amd64.mk

Search for the line:
flavours = generic server virtual
Change it in:
flavours = generic server virtual pvhvm

File: debian.master/control.d/vars.pv
This files does not exist and in order to make the compilation process aware of our own flavor we want to compile we need to create it.

$ cp debian.master/control.d/vars.generic debian.master/control.d/vars.pvhvm
$ git add .
$ git commit -a -m "pv Modifications"
Checkout branch "work" for build
$ git checkout -b work
$ fakeroot debian/rules clean
$ skipabi=true skipmodule=true fakeroot debian/rules binary-indep
$ skipabi=true skipmodule=true fakeroot debian/rules binary-perarch
$ skipabi=true skipmodule=true fakeroot debian/rules binary-pvhvm

If all went OK, then
~/KERNEL02/source$ ls -l ../
total 54208
-rw-rw-r– 1 boris boris 606 2011-11-06 16:39 config.flavour.pvhvm
-rw-r–r– 1 boris boris 4496196 2011-11-06 16:52 linux-doc_3.1.0-2.3_all.deb
-rw-r–r– 1 boris boris 11586658 2011-11-06 16:52 linux-headers-3.1.0-2_3.1.0-2.3_all.deb
-rw-r–r– 1 boris boris 965564 2011-11-06 17:19 linux-headers-3.1.0-2-pvhvm_3.1.0-2.3_amd64.deb
-rw-r–r– 1 boris boris 37880092 2011-11-06 17:19 linux-image-3.1.0-2-pvhvm_3.1.0-2.3_amd64.deb
-rw-r–r– 1 boris boris 63952 2011-11-06 16:52 linux-source-3.1.0_3.1.0-2.3_all.deb
-rw-r–r– 1 boris boris 382278 2011-11-06 16:53 linux-tools-3.1.0-2_3.1.0-2.3_amd64.deb
-rw-r–r– 1 boris boris 112558 2011-11-06 16:52 linux-tools-common_3.1.0-2.3_all.deb
drwxr-xr-x 27 boris boris 4096 2011-11-06 16:53 source

Changes done to kernel been rebuilt .

--- xenconf.3.1.0-030100-generic 2011-11-06 11:03:39.225828270 +0400
+++ xenconf.3.1.0-2-vnc 2011-11-06 11:04:58.621827223 +0400
@@ -16,19 +16,20 @@
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
CONFIG_HVC_XEN=y
CONFIG_XEN_WDT=m
-CONFIG_XEN_FBDEV_FRONTEND=m
+CONFIG_XEN_FBDEV_FRONTEND=y
CONFIG_XEN_BALLOON=y
-# CONFIG_XEN_SELFBALLOONING is not set
+CONFIG_XEN_SELFBALLOONING=y
+CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
CONFIG_XEN_SCRUB_PAGES=y
CONFIG_XEN_DEV_EVTCHN=m
CONFIG_XEN_BACKEND=y
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
-CONFIG_XEN_XENBUS_FRONTEND=m
+CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_XEN_GNTDEV=m
CONFIG_XEN_GRANT_DEV_ALLOC=m
-CONFIG_XEN_PLATFORM_PCI=m
+CONFIG_XEN_PLATFORM_PCI=y
CONFIG_SWIOTLB_XEN=y
CONFIG_XEN_TMEM=y
CONFIG_XEN_PCIDEV_BACKEND=m

References
1. http://blog.avirtualhome.com/2011/10/28/how-to-compile-a-new-ubuntu-11-10-oneiric-kernel/
2. http://xen.1045712.n5.nabble.com/PATCH-xen-remove-XEN-PLATFORM-PCI-config-option-td4833154.html


Set up Oneiric PVHVM at Xen 4.1.2 Ubuntu Oneiric Dom0 (3.1.0-030100-generic)

November 2, 2011

This post is sample of utilizing optimized paravirtualized PVHVM drivers (also called PV-on-HVM drivers) with Xen fully virtualized HVM guests running Ubuntu 3.1 kernels at Xen 4.1.2 Dom0. Xen PVHVM drivers completely bypass the Qemu emulation and provide much faster disk- and network IO performance. First thing I had to do it was rebuild the recent Ubuntu kernel for precise Ubuntu-3.1.0-3 ( follow [1]) with CONFIG_XEN_PLATFORM_PCI=y. As result following debian packages gets created.

root@boris-System-P5Q3:/mnt/root/precise# ls -l
total 54196
-rw-r--r-- 1 root root 484 2011-11-02 17:44 config.flavour.pvhvm
-rw-r--r-- 1 root root 4496134 2011-11-02 17:53 linux-doc_3.1.0-2.3_all.deb
-rw-r--r-- 1 root root 11586896 2011-11-02 17:53 linux-headers-3.1.0-2_3.1.0-2.3_all.deb
-rw-r--r-- 1 root root 966630 2011-11-02 18:29 linux-headers-3.1.0-2-pvhvm_3.1.0-2.3_amd64.deb
-rw-r--r-- 1 root root 37869094 2011-11-02 18:29 linux-image-3.1.0-2-pvhvm_3.1.0-2.3_amd64.deb
-rw-r--r-- 1 root root 63952 2011-11-02 17:53 linux-source-3.1.0_3.1.0-2.3_all.deb
-rw-r--r-- 1 root root 382274 2011-11-02 17:55 linux-tools-3.1.0-2_3.1.0-2.3_amd64.deb
-rw-r--r-- 1 root root 112522 2011-11-02 17:53 linux-tools-common_3.1.0-2.3_all.deb
drwxr-xr-x 27 root root 4096 2011-11-02 17:55 source

I’ve updated only “git clone” to get 3.1 kernel.

git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git source

There is another attractive option – just add driver xen-platform-pci to initrd.img as post installation procedure. Then reboot with xen_platform_pci=1. I choosed kernel rebuild option following core development [2]
Regardless [1] is written for Oneiric , it works for Precise kernel with minimal change above.Details may be viewed in Rebuilding 3.1 Linux Kernel in Ubuntu’s style
Next install regular HVM domain via profile :-

kernel ='/usr/lib64/xen/boot/hvmloader'
builder='hvm'
device_model = '/usr/lib64/xen/bin/qemu-dm'
name = "OneiricPV-HVM"
memory = 2048
vcpus=2
pae=1
acpi=1
apic=1
vif = [ 'type=ioemu, mac=00:16:3f:03:01:14, bridge=virbr0, model=e1000' ]
disk = [ 'phy:/dev/sda7,hda,w', 'phy:/dev/loop0,hdc:cdrom,r' ]
# disk = [ 'phy:/dev/sda7,hda,w']
boot='d'
xen_platform_pci=0
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
sdl=0
vnc=1
vncpasswd=''
stdvga=0
serial='pty'
tsc_mode=0
usb=1
usbdevice='tablet'


Then three debian packages (result of standard Ubuntu 3.1 kernel rebuild):

linux-headers-3.1.0-2_3.1.0-2.3_all.deb
linux-headers-3.1.0-2-pvhvm_3.1.0-2.3_amd64.deb
linux-image-3.1.0-2-pvhvm_3.1.0-2.3_amd64.deb

have been scp’ed to Oneiric HVM DomU and new 3.1 Ubuntu kernel has been installed.

sudo dpkg -i linux-headers-3.1.0-2_3.1.0-2.3_all.deb \
linux-headers-3.1.0-2-pvhvm_3.1.0-2.3_amd64.deb \
linux-image-3.1.0-2-pvhvm_3.1.0-2.3_amd64.deb

Following xen front end’s drivers were included into /boot/initrd.img-3.1.0-2-pvhvm

root@boris-HVM-domU:~# echo "xen-blkfront" >> /etc/initramfs-tools/modules
root@boris-HVM-domU:~# echo "xen-netfront" >> /etc/initramfs-tools/modules
root@boris-HVM-domU:~# vi /etc/initramfs-tools/modules
root@boris-HVM-domU:~# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.1.0-2-pvhvm

Domain has been shutdown and restarted with updated profile,having
xen_platform_pci=1
Runtime profile

kernel ='/usr/lib64/xen/boot/hvmloader'
builder='hvm'
device_model = '/usr/lib64/xen/bin/qemu-dm'
name = "OneiricPV-HVM"
memory = 2048
vcpus=2
pae=1
acpi=1
apic=1
vif = [ 'mac=00:16:3f:03:01:14, bridge=virbr0, model=e1000' ]
# disk = [ 'phy:/dev/sda7,hda,w', 'phy:/dev/loop0,hdc:cdrom,r' ]
disk = [ 'phy:/dev/sda7,hda,w']
boot='c'
xen_platform_pci=1
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
sdl=0
vnc=1
vncpasswd=''
stdvga=0
serial='pty'
tsc_mode=0
usb=1
usbdevice='tablet'

This time HVM domU gets loaded ( vs using regular kernel) and dmesg report contains following messages which are the fair of success PVHVM domain loading :-

[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.1.0-2-pvhvm (root@boris-System-P5Q3) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #3 SMP Wed Nov 2 15:15:13 MSK 2011 (Ubuntu 3.1.0-2.3-pvhvm 3.1.0)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.1.0-2-pvhvm root=UUID=bff48eed-20df-4abf-b788-935c75ea6226 ro quiet splash vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009e000 (usable)
[ 0.000000] BIOS-e820: 000000000009e000 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000003f800000 (usable)
[ 0.000000] BIOS-e820: 00000000fc000000 - 0000000100000000 (reserved)
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] DMI 2.4 present.
[ 0.000000] DMI: Xen HVM domU, BIOS 4.1.2 10/20/2011
[ 0.000000] Hypervisor detected: Xen HVM
[ 0.000000] Xen version 4.1.
[ 0.000000] Xen Platform PCI: I/O protocol version 1
[ 0.000000] Netfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated NICs.
[ 0.000000] Blkfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated disks.
[ 0.000000] You might have to change the root device
[ 0.000000] from /dev/hd[a-d] to /dev/xvd[a-d]



Managing domains via xm ( Xen 4.1.2)

# apt-get install python-lxml
# xm new oneiric7.hvm
# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 7199 4 r----- 9276.7
OneiricPV-HVM 2048 2 0.0
# xm start OneiricPV-HVM
# vncviewer localhost:0

Several useful commands per http://wiki.xen.org/xenwiki/XenLinuxPVonHVMdrivers

# dmesg | egrep -i 'xen|front'
[ 0.000000] DMI: Xen HVM domU, BIOS 4.1.2 10/20/2011
[ 0.000000] Hypervisor detected: Xen HVM
[ 0.000000] Xen version 4.1.
[ 0.000000] Xen Platform PCI: I/O protocol version 1
[ 0.000000] Netfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated NICs.
[ 0.000000] Blkfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated disks.
[ 0.000000] ACPI: RSDP 00000000000ea020 00024 (v02 Xen)
[ 0.000000] ACPI: XSDT 00000000fc0134f0 0003C (v01 Xen HVM 00000000 HVML 00000000)
[ 0.000000] ACPI: FACP 00000000fc0132d0 000F4 (v04 Xen HVM 00000000 HVML 00000000)
[ 0.000000] ACPI: DSDT 00000000fc003440 0FE05 (v02 Xen HVM 00000000 INTL 20100528)
[ 0.000000] ACPI: APIC 00000000fc0133d0 000D8 (v02 Xen HVM 00000000 HVML 00000000)
[ 0.000000] ACPI: HPET 00000000fc0134b0 00038 (v01 Xen HVM 00000000 HVML 00000000)
[ 0.000000] Booting paravirtualized kernel on Xen HVM
[ 0.000000] Xen HVM callback vector for event delivery is enabled
[ 0.087915] Xen: using vcpuop timer interface
[ 0.087922] installing Xen timer for CPU 0
[ 0.176052] installing Xen timer for CPU 1
[ 0.631112] xen/balloon: Initialising balloon driver.
[ 0.631125] xen-balloon: Initialising balloon driver.
[ 0.636079] Switching to clocksource xen
[ 0.647494] xen: --> pirq=16 -> irq=8 (gsi=8)
[ 0.647569] xen: --> pirq=17 -> irq=12 (gsi=12)
[ 0.647619] xen: --> pirq=18 -> irq=1 (gsi=1)
[ 0.647665] xen: --> pirq=19 -> irq=6 (gsi=6)
[ 0.647719] xen: --> pirq=20 -> irq=4 (gsi=4)
[ 0.647792] xen: --> pirq=21 -> irq=7 (gsi=7)
[ 0.731857] xen: --> pirq=22 -> irq=28 (gsi=28)
[ 0.731861] xen-platform-pci 0000:00:03.0: PCI INT A -> GSI 28 (level, low) -> IRQ 28
[ 0.833848] xen: --> pirq=23 -> irq=23 (gsi=23)
[ 1.255228] blkfront device/vbd/768 num-ring-pages 1 nr_ents 32.
[ 1.258186] blkfront: xvda: flush diskcache: enabled
[ 1.274037] Initialising Xen virtual ethernet driver.
# ethtool -i eth0
driver: vif
version:
firmware-version:
bus-info: vif-0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
# cat /proc/partitions
major minor #blocks name
202 0 20480000 xvda
202 1 19439616 xvda1
202 2 1 xvda2
202 5 1037312 xvda5

At this point domain may be loaded via pygrub as PV guest :-

<domain type='xen' id='3'>
<name>OneiricPV</name>
<description></description>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader>/usr/lib/xen-default/bin/pygrub</bootloader>
<bootloader_args></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:35:61:47'/>
<source bridge='br0'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<target dev='vif3.0'/>
</interface>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target type='xen' port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
</devices>
</domain>

# virsh define OneiricPV.xml
# virsh start OneiricPV



References
1. http://blog.avirtualhome.com/2011/10/28/how-to-compile-a-new-ubuntu-11-10-oneiric-kernel/
2. http://xen.1045712.n5.nabble.com/PATCH-xen-remove-XEN-PLATFORM-PCI-config-option-td4833154.html


Qemu-kvm 0.15.1 & Spice USB Redirection support for Ubuntu Oneiric

November 1, 2011

Qemu-kvm 0.15.1 has been patched via top 28 commits from

http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-0.15.0-usbredir

Patches set for debian build may be generated as follows :
$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-0.15.0-usbredir origin/qemu-kvm-0.15.0-usbredir
$ mkdir -p /tmp/patches
$ git format-patch -M -C –output-directory \
/tmp/patches ea2798c1ebe0c12d5feb7d7471a999ea0671ef2f

Qemu-kvm debian/rules contains:-

./configure \
–target-list=”x86_64-softmmu i386-softmmu x86_64-linux-user i386-linux-user” \
–prefix=/usr \
–interp-prefix=/etc/qemu-binfmt/%M \
–disable-blobs \
–disable-strip \
–enable-spice \
–enable-usb-redir \
$(conf_arch)

Kernel installed is 3.1.0-030100-generic

Consider option downgrade seabios 1.6.3 => 0.6.2-qxl if some things go wrong for you.
It won’t affect USB Redirection support

Spicy should be run by root, view http://planet.spice-space.org/

Spice-Gtk-0.7.6X build in general follows Debian’s 0.7-3 packaging schema, however several changes have been done to debian/control and debian/rules
**********************************
To install packages from PPA
**********************************
$ sudo add-apt-repository ppa:bderzhavets/0151-usbredir
$ 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 \
gir1.2-spice-client-glib-2.0 \
gir1.2-spice-client-gtk-2.0 \
gir1.2-spice-client-gtk-3.0

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

It should result install libvirt 0.9.6 along with dependent packages
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


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



Set up Qemu&Spice&Libvirt 0.9.6 USB Redirection on Ubuntu 11.10

October 16, 2011

***********************************************************************************************
UPDATE on 11/12/2011. Experimental build libvirt 0.9.7 via git://anonscm.debian.org/pkg-libvirt/libvirt.git
tip commit e49612bea22c681aff95c974d36d009a5ae08a21 for Oneiric, seems to fix bug with VirtManager disconnection at domain shuts down (on Oneiric with kernel 3.1.0-030100-generic) View PPA: https://launchpad.net/~bderzhavets/+archive/xen-next6
***************************************************************************************************
UPDATE on 10/30/2011. View Qemu-kvm 0.15.1 & Spice USB Redirection support for Ubuntu Oneiric
Patches set for debian build may be generated as follows :

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-0.15.0-usbredir origin/qemu-kvm-0.15.0-usbredir
$ mkdir -p /tmp/patches
$ git format-patch -M -C --output-directory \
/tmp/patches ea2798c1ebe0c12d5feb7d7471a999ea0671ef2f

Kernel installed is 3.1.0-030100-generic
Consider option downgrade seabios 1.6.3 => 0.6.2-qxl if some things go wrong for you. It won’t affect USB Redirection support
***************************************************************************************************
UPDATE on 10/26/2011. After publishing I renamed this PPA as “Libvirt 0.9.6 for Oneiric”. View also :-
“Show PPAs matching Libvirt”
“Show PPAs matching Qemu-kvm”
“Libvirt” 0.9.6-1ubuntu3 was published in precise https://launchpad.net/ubuntu/+source/libvirt/0.9.6-1ubuntu3 on 10/24/2011. View for back ported version of libvirt in PPA :
Qemu&Spice USB Redirection with back ported Libvirt 0.9.6 (as of 10/24/11), new seabios 1.6.3 for Ubuntu Oneiric
***************************************************************************************************
I’ve built locally and uploaded to Launchpad Libvirt 0.9.6 via Debian Unstable, applying standard set of Ubuntu’s patches updated for 0.9.6.

Link to page at Launchpad



Build log for amd64 is attached

Build log for i386 is attached

To start default network :-

$ sudo virsh net-start default
$ sudo virsh net-autostart default

Looks like :-

boris@boris-P5Q-E:~$ sudo virsh net-start default
Network default started
boris@boris-P5Q-E:~$ sudo virsh net-autostart default
Network default marked as autostarted
boris@boris-P5Q-E:~$ brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes

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 Qemu-kvm 0.15.0 with usb redirection network support per http://planet.spice-space.org/ via git repository git://people.freedesktop.org/~jwrdegoede/qemu :-

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-0.15.0-usbredir origin/qemu-kvm-0.15.0-usbredir
$ git log|more

Spice-Gtk-0.7.6X has been built up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk with usb redirection support working stable with Spice 0.9.1. Build done on Ubuntu Oneiric.Packaged version version of Spice-Gtk-0.7.6X is built up on mentioned git repository. 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, however requiring several updates to debian/control and debian/rules due to snapshots have to be done from current git tree.

Upgrade version of Libvirt up to 0.9.6 allows to avoid using “qemu” command line (libvirt 0.9.2) and follow http://planet.spice-space.org/ update VM’s XML profile under /etc/libvirt/qemu/ as suggested in second blog entry of Hans de Goede :-

Change the first line from: <domain type=’kvm’> to:

<domain type=’kvm’ xmlns:qemu=’http://libvirt.org/schemas/domain/qemu/1.0′&gt;

And add the following lines at the end, above the “</domain>” line: <qemu:commandline>

<qemu:arg value=’-readconfig’/>
<qemu:arg value=’/etc/qemu/ich9-ehci-uhci.cfg’/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev1′/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3′/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev2′/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=ehci.0,debug=3′/>
<qemu:arg value=’-chardev’/>
<qemu:arg value=’spicevmc,name=usbredir,id=usbredirchardev3′/>
<qemu:arg value=’-device’/>
<qemu:arg value=’usb-redir,chardev=usbredirchardev3,id=usbredirdev3,bus=ehci.0,debug=3′/>
</qemu:commandline>

Then run :-

# /etc/init.d/libvirt-bin restart

Manage VMs via virsh or Virt Manager having USB redirection support active in Spicy’s sessions.
VirtManager :-





Virsh :-





USB redirection on F16 (TC)



*************************************************************************************************************
UPDATE on 11/14/2011 Issue fixed via upgrade Libvirt up to 0.9.7-2. That’s a link to PPA.
*************************************************************************************************************
VirtManager seems not to be ready for this kind of operations now. Spicy session with KVM started
via VirtManager runs fine working with USB pen. But on domain shutdown following error shows up :-

Error polling connection ‘qemu:///system’: Unable to read from monitor: Connection reset by peer

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/engine.py”, line 440, in _tick
conn.tick()
File “/usr/share/virt-manager/virtManager/connection.py”, line 1507, in tick
vm.tick(now)
File “/usr/share/virt-manager/virtManager/domain.py”, line 1541, in tick
pcentHostCpu, pcentGuestCpu) = self._sample_cpu_stats(info, now)
File “/usr/share/virt-manager/virtManager/domain.py”, line 1158, in _sample_cpu_stats
guestcpus = self.vcpu_count()
File “/usr/share/virt-manager/virtManager/domain.py”, line 831, in vcpu_count
return int(self._get_guest().vcpus)
File “/usr/share/virt-manager/virtManager/domain.py”, line 339, in _get_guest
xml = self._get_domain_xml(inactive, refresh_if_necc)
File “/usr/share/virt-manager/virtManager/domain.py”, line 331, in _get_domain_xml
refresh_if_necc=refresh_if_necc)
File “/usr/share/virt-manager/virtManager/libvirtobject.py”, line 95, in get_xml
self.refresh_xml()
File “/usr/share/virt-manager/virtManager/libvirtobject.py”, line 105, in refresh_xml
self._xml = self._XMLDesc(self._active_xml_flags)
File “/usr/share/virt-manager/virtManager/domain.py”, line 764, in _XMLDesc
return self._backend.XMLDesc(flags)
File “/usr/lib/python2.7/dist-packages/libvirt.py”, line 381, in XMLDesc
if ret is None: raise libvirtError (‘virDomainGetXMLDesc() failed’, dom=self)
libvirtError: Unable to read from monitor: Connection reset by peer

Final draft and instructions to install are in PPA Qemu&Spice USB Redirection and Libvirt 0.9.6 on Ubuntu 11.10 (Oneiric)
When working with the most recent PPA Qemu-kvm 0.15.1 & Spice USB Redirection support for Ubuntu Oneiric with virt-manager,
patched by RH against previous issue. Another error shows up on VM shutdown :-

Error polling connection ‘qemu:///system’: Unable to read from monitor: Connection reset by peer
Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/engine.py”, line 440, in _tick
conn.tick()
File “/usr/share/virt-manager/virtManager/connection.py”, line 1507, in tick
vm.tick(now)
File “/usr/share/virt-manager/virtManager/domain.py”, line 1531, in tick
info = self._backend.info()
File “/usr/lib/python2.7/dist-packages/libvirt.py”, line 1411, in info
if ret is None: raise libvirtError (‘virDomainGetInfo() failed’, dom=self)
libvirtError: Unable to read from monitor: Connection reset by peer

Consider option downgrade seabios 1.6.3 => 0.6.2-qxl to get more or less stable F15 KVM guest behavior.
It doesn’t help F16 RC1 KVM guest.


Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)

October 9, 2011

************************************************************************************************************************
UPDATE on 10/14/2011. Works on final release Ubuntu 11.10 . View also Set up Qemu&Spice&Libvirt 0.9.6 USB Redirection on Ubuntu 11.10
************************************************************************************************************************

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 Qemu-kvm 0.15.0 with usb redirection network support per http://planet.spice-space.org/ via git repository git://people.freedesktop.org/~jwrdegoede/qemu :-

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-0.15.0-usbredir origin/qemu-kvm-0.15.0-usbredir
$ git log|more

Spice-Gtk-0.7.4X has been built up on current snapshot of git://anongit.freedesktop.org/spice/spice-gtk to obtain Spice-Gtk with usb redirection support working stable with Spice 0.9.1. Build done on Ubuntu Oneiric.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. Details may be viewed here .
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.
*********************************************************************************************************************
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.3 schema
*********************************************************************************************************************

Currently two PPAs are ready to go :
1. Set up Qemu&Spice USB Redirection on Ubuntu 11.10 (Oneiric) v.1
2. Set up Qemu&Spice USB Redirection on Ubuntu 11.10 (Oneiric) v.2
*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir16
$ 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

Qemu-kvm debian/rules contains:-

./configure \
--target-list="x86_64-softmmu i386-softmmu x86_64-linux-user i386-linux-user" \
--prefix=/usr \
--interp-prefix=/etc/qemu-binfmt/%M \
--disable-blobs \
--disable-strip \
--enable-spice \
--enable-usb-redir \
$(conf_arch)

Spicy should be run by root, view http://planet.spice-space.org/. Make sure you’ve done on server

$ sudo apt-get install ipxe

Per Hans de Goede :-
Select the options menu entry and make sure that the “auto redirect newly plugged in USB devices” option is checked. After this make sure the vm has keyboard focus (so close the options menu), plug in a new USB device and watch it show up in your vm



Connection to remote KVM Spice enabled Server with USB Redirection on Oneiric :-



Copy from USB pen to remotely running qemu-kvm VM via spicy session issued by root on local box



Normal guest start via qemu-kvm with enabled usb redirection looks like :-
boris@boris-System-P5Q3:~$ sudo /usr/bin/kvm -cpu host -enable-kvm \
> -name VF15HQ -m 2048 \
> -drive file=/dev/sdb5,if=virtio,media=disk,aio=native,cache=off \
> -net nic,model=virtio -net user -localtime \
> -usb -vga qxl -spice port=5900,disable-ticketing \
> -device virtio-serial \
> -chardev spicevmc,id=vdagent,name=vdagent \
> -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
> -readconfig /etc/qemu/ich9-ehci-uhci.cfg \
> -chardev spicevmc,name=usbredir,id=usbredirchardev1 \
> -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3 \
> -chardev spicevmc,name=usbredir,id=usbredirchardev2 \
> -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2,debug=3 \
> -chardev spicevmc,name=usbredir,id=usbredirchardev3 \
> -device usb-redir,chardev=usbredirchardev3,id=usbredirdev3,debug=3
do_spice_init: starting 0.9.1
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
ensure_display_channel_created: create display channel
ensure_cursor_channel_created: create cursor channel
*** EHCI support is under development ***
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
spice_server_char_device_add_interface: CHAR_DEVICE usbredir
handle_dev_input: start
spice_server_char_device_add_interface: CHAR_DEVICE vdagent
reds_handle_auth_mechanism: Auth method: 1
reds_handle_main_link:
reds_disconnect:
reds_show_new_channel: channel 1:0, connected successfully, over Non Secure link
main_channel_link: add main channel client
reds_handle_main_link: NEW Client 0×2687990 mcc 0x26f8e30 connect-id 1804289383
main_channel_handle_parsed: agent start
handle_dev_input: mouse mode 2
main_channel_handle_parsed: net test: latency 0.292000 ms, bitrate 10893617021 bps (10388.962766 Mbps)
main_channel_release_pipe_item: SPICE_MSG_MAIN_AGENT_DATA 0x26f8d90 0x2687a20, 0
reds_handle_auth_mechanism: Auth method: 1
reds_show_new_channel: channel 4:0, connected successfully, over Non Secure link
red_dispatcher_set_cursor_peer:
reds_handle_auth_mechanism: Auth method: 1
handle_dev_input: cursor connect
red_connect_cursor: add cursor channel client
listen_to_new_client_channel: NEW ID = 0
reds_show_new_channel: channel 2:0, connected successfully, over Non Secure link
red_dispatcher_set_display_peer:
handle_dev_input: connect
reds_handle_auth_mechanism: Auth method: 1
handle_new_display_channel: add display channel client
handle_new_display_channel: New display (client 0×2687990) dcc 0x2b76160 stream 0x26f8aa0
handle_new_display_channel: jpeg disabled
handle_new_display_channel: zlib-over-glz disabled
listen_to_new_client_channel: NEW ID = 0
reds_show_new_channel: channel 3:0, connected successfully, over Non Secure link
inputs_connect: inputs channel client create
display_channel_client_wait_for_init: creating encoder with id == 0
display_channel_release_item: not pushed (101)
spice_server_char_device_remove_interface: remove CHAR_DEVICE vdagent
handle_dev_input: mouse mode 1
spice_server_char_device_add_interface: CHAR_DEVICE vdagent
handle_dev_input: mouse mode 2
main_channel_handle_parsed: agent start
main_channel_release_pipe_item: SPICE_MSG_MAIN_AGENT_DATA 0x274a830 0×2725900, 0
main_channel_release_pipe_item: SPICE_MSG_MAIN_AGENT_DATA 0x26fddb0 0×2725900, 0
reds_handle_auth_mechanism: Auth method: 1
reds_show_new_channel: channel 9:0, connected successfully, over Non Secure link
kvm: usbredirparser info: Peer version: spice-gtk 0.7.46-314c-dirty

red_channel_client_disconnect: 0x3879d80 (channel 0x23f36d0 type 9 id 0)
spice_server_char_device_remove_interface: remove CHAR_DEVICE vdagent
handle_dev_input: mouse mode 1

KVM itself may run ( via qemu command line) on any Oneiric box on the LAN with Qemu-kvm 0.15.0 with usb network redirection support (say address IP01).Spice-Gtk-0.7.46 should be installed on your local machine. Then run :-

# spicy -h IP01 -p 5900

Plug in USB pen on local box . It will be opened in Spicy session with remote qemu-kvm process.

Libvirt 0.9.6 is required to avoid qemu command line vm start and managing VMs via virsh XML definitions, what consequently allows to start VMs via virt-manager. Current version of libvirt in Oneiric is 0.9.2. I am not sure what version of libvirt will be choosed for Precise (12.04).Debian Unstable already contains 0.9.6.

Fedora 15 KVM running native spice-vdagent started via qemu command line







Oneiric KVM running built for Ubuntu spice-vdagent started via qemu command line






References
1. qemu-kvm-0.15.0-usbredir


Implementation Qemu-kvm 0.15.0,Spice Server and Spice-Gtk-0.7 on Ubuntu 11.10 KVM Server the most recent approach

August 30, 2011

**********************************************************************************************
UPDATE on 09/21/11 Ubuntu 11.10 beta-2 will be released tomorrow.
Ubuntu 11.10 (Oneiric Ocelot) final release on 10/14/11
**********************************************************************************************
1. Set up Qemu-kvm 0.15.0(spice enabled), Spice Server (0.8.2), Spice-Gtk-0.7-2(via Debian)
Stable Qemu-kvm-0.15.0+noroms(spice enabled), Spice Server&Client 0.8.2, Spice-Gtk-0.7-2 (via Debian)

2. First view :-

http://bderzhavets.wordpress.com/2011/10/09/usb-redirection-on-ubuntu-11-10-oneiric/

3. Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric). Experimental PPA Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)
View also “Howto” Set up Qemu&Spice USB Redirection support on Ubuntu 11.10 (Oneiric)
************************************************************************************************
Following bellow seems to be the best way to implement Qemu-kvm 0.15.0 spice enabled, Spice Server 0.8.2 and Spice-Gtk-0.7 with GObject-introspection enabled on Ubuntu 11.10 in meantime close to Beta 1. It’s based on PPA Building Spice-Gtk-0.7 via Debian Unstable with Gobject-introspection enabled published on 08/20/11. The original version of Spice-Gtk-0.7-2 came from Debian Unstable didn’t support GObject-introspection. Original version 0.7-2 was not supposed to install files like *.gir and *.typelib. View projects /collab-maint/spice-gtk.git/ summary. No tag “unstable/0.7-3″.It also clearly shows that introspection went into Git Repo on 09/01/11. View [2] also regarding this issue. Original version 0.7-2 also required fixes for debian/control and debian/rules. To understand better why this step should be undertaken, please , view Introspection Overivew

Now I feel myself like a detective whose 4 weeks old case, somebody wants to drop. It’s really funny, because lack of understanding GObject-introspection when porting Spice-Gtk-0.7 from F16 do Debian (Ubuntu) is not a crime.

Moreover file http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc (been located at http://mentors.debian.net/package/spice-gtk) doesn’t exist on the Net any longer,which has been used by myself for :
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc

and spice-gtk-0.7-2 was a base I used to rebuild debian packages with introspection enabled, view my PPA
“Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled”. It means I did it on my own . Everything had been done by myself from scratch.
I really did it from scratch but in different way and at different time. View another my PPA : Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10 as of 08/10/11 and my article at LinuxToday Set up Spice-Gtk-0.7 on Ubuntu 11.10
******************************************************************************************************************
UPDATE on 09/12/11. Bug – https://bugzilla.redhat.com/show_bug.cgi?id=734680 doesn’t show up when running with spice (0.8.2) enabled qemu-kvm 0.15.0 with Oneiric patching
******************************************************************************************************************
UPDATE on 09/06/11. As of 09/05/11 Mentioned error has been fixed. Packaging schema changed vs been used on 09/01/11. Original version 0.7-2 (as of 08/16/11) may be viewed now only at QA page http://qa.debian.org/developer.php?login=bluestonechina%40gmail.com. Front page doesn’t contain it any longer. However, page Debian Tracking System shows the history and build logs 0.7-2 pretty clear.View projects /collab-maint/spice-gtk.git/ summary.

Version 0.7-3
Information
Version: 0.7-3
Uploaded: 2011-09-05 15:30
Source package: http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-3.dsc
Section: misc
Priority: optional
Closes bugs: 639936 640136 640138

View PPA Build Spice-Gtk-0.7 via Debian Unstable as of 09/06/11

View also : http://packages.qa.debian.org/s/spice-gtk.html
TODO section :-
mentors.debian.net has version 0.7-3 of this package, you should consider sponsoring its upload.

*****************************************************************************************************************
Now back to rebuild spice-gtk-0.7-2 from Debian (08/16/11) to enable introspection , which had been done on 08/20/11
*****************************************************************************************************************
Port Debian Unstable Spice Server (been built with embedded libcelt051) to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice/spice_0.8.2-2.dsc
$ dpkg-source -x spice_0.8.2-2.dsc
Port Debian Unstable version of Spice-Gtk-0.7 to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc
It requires rebuild to enable gobject-introspection,which was done in PPA "Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled" for Ubuntu 11.10.

Details may be viewed here :
Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled

In particular,

1. Added –enable-introspection to debian/rules dh_auto_configure.

dh_auto_configure -B/build/buildd/spice-gtk-0.7/build-gtk3 -- \
--enable-smartcard=no --with-gtk=3.0 --disable-static --enable-introspection


dh_auto_configure -- \
--enable-smartcard=no --with-gtk=2.0 --disable-static --enable-introspection

2. Updated debian/control and added required dependencies

Build-Depends:
debhelper (>= 8.0.0),
libspice-protocol-dev (>= 0.8.1),
libspice-server-dev,
libpixman-1-dev (>= 0.17.7),
libgtk2.0-dev,
libgtk-3-dev,
libglib2.0-dev (>= 2.22),
libcairo2-dev (>= 1.2.0),
libpulse-dev,
python2.7,
python-gtk2-dev (>= 2.0.0),
python-pyparsing,
intltool,
libsasl2-dev,
libjpeg8-dev,
gobject-introspection, <=
libgirepository1.0-dev <=

The last two lines have been added.

3.Several debian/package_name.install files have been updated by adding right full path to corresponding library to accommodate installation of :-

/usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib
/usr/share/gir-1.0/SpiceClientGLib-2.0.gir
/usr/share/gir-1.0/SpiceClientGtk-3.0.gir

which otherwise won’t be installed.

Added to libspice-client-glib-2.0-4.install
line usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib

Added to libspice-client-gtk-2.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib

Added to libspice-client-gtk-3.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib

Added to libspice-client-glib-2.0-dev.install
line usr/share/gir-1.0/SpiceClientGLib-2.0.gir

Added to libspice-client-gtk-3.0-dev.install
line usr/share/gir-1.0/SpiceClientGtk-3.0.gir

Qemu-kvm 0.15.0 was built with changed dependencies in the same PPA
Packages from https://launchpad.net/~bderzhavets/+archive/test-deb2 installed with no conflicts on Oneiric daily build 08/27/11. Spice sessions (via VirtManager) in QXL mode (64M vram) for install and for runtime have been run.
******************************************************************************************************
The most recent snapshot for seabios supporting 64M vram for QXL device uploaded to ppa:bderzhavets/test-deb2,ppa:bderzhavets/test-deb1
******************************************************************************************************
Please, view regarding this issue [Qemu-devel] -vga qxl

To install packages from PPA

$ sudo add-apt-repository ppa:bderzhavet/test-deb2
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
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 spice-client \
seabios

$ 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
$ sudo reboot

In case trouble with “apt-get update” run :-

# sudo apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys 5CC1785DC05C1EB5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.IbkrNcyBsB --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 5CC1785DC05C1EB5
gpg: requesting key C05C1EB5 from hkp server keyserver.ubuntu.com
gpg: key C05C1EB5: public key "Launchpad PPA for Boris Derzhavets" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
# sudo apt-get update

Normal install looks like :-

$ sudo apt-get install qemu-kvm qemu qemu-common \
> 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 spice-client \
> seabios
[sudo] password for boris:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
bridge-utils cpu-checker libaio1 libcegui-mk2-1 libdevil1c2 libfreeimage3 libspice-server1
libxerces-c28 msr-tools vgabios
Suggested packages:
kvm-pxe mol-drivers-macosx openbios-sparc ubuntu-vm-builder uml-utilities
The following NEW packages will be installed:
bridge-utils cpu-checker libaio1 libcegui-mk2-1 libdevil1c2 libfreeimage3
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
libspice-server1 libxerces-c28 msr-tools python-spice-client-gtk qemu qemu-common qemu-kvm
seabios spice-client spice-client-gtk vgabios
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,977 kB of archives.
After this operation, 35.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y







References
1. Debian Tracking System
2.http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg3124003.html


Rebuild Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled

August 20, 2011

Following bellow seems to be the best way to implement Qemu-kvm 0.15.0 spice enabled, Spice Server 0.8.2 and Spice-Gtk-0.7 with GObject-introspection enabled on Ubuntu 11.10 in meantime close to Beta 1. It’s based on PPA Building Spice-Gtk-0.7 via Debian Unstable with Gobject-introspection enabled published on 08/20/11. The original version of Spice-Gtk-0.7-2 came from Debian Unstable didn’t support GObject-introspection. Original version 0.7-2 was not supposed to install files like *.gir and *.typelib. View projects /collab-maint/spice-gtk.git/ summary.It also clearly shows that introspection went into Git Repo on 09/01/11. View [2] also regarding this issue.
Original version 0.7-2 also required fixes for debian/control and debian/rules. To understand better why this step should be undertaken, please , view Introspection Overivew

Now I feel myself like a detective whose 4 weeks old case, somebody wants to drop. It’s really funny, because lack of understanding GObject-introspection when porting Spice-Gtk-0.7 from F16 do Debian (Ubuntu) is not a crime.

Moreover file http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc ( been located at http://mentors.debian.net/package/spice-gtk) doesn’t exist on the Net any longer,which has been used by myself for :
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc

and spice-gtk-0.7-2 was a base I used to rebuild debian packages with introspection enabled, view my PPA
“Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled”. It means I did it on my own . Everything had been done by myself from scratch.
I really did it from scratch but in different way and at different time. View another my PPA : Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10 as of 08/10/11 and my article at LinuxToday Set up Spice-Gtk-0.7 on Ubuntu 11.10
***********************************************************
Now back to rebuild spice-gtk-0.7-2 done on 08/20/11 :-
***********************************************************
Port Debian Unstable Spice Server (been built with embedded libcelt051) to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice/spice_0.8.2-2.dsc
$ dpkg-source -x spice_0.8.2-2.dsc
Port Debian Unstable version of Spice-Gtk-0.7 to Ubuntu 11.10.
$ dget -x http://mentors.debian.net/debian/pool/main/s/spice-gtk/spice-gtk_0.7-2.dsc
$ dpkg-source -x spice-gtk_0.7-2.dsc
It requires rebuild to enable gobject-introspection,which was done in PPA “Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled” for Ubuntu 11.10.

Details may be viewed here :
Building Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled

In particular,

1. Added –enable-introspection to debian/rules dh_auto_configure.

dh_auto_configure -B/build/buildd/spice-gtk-0.7/build-gtk3 -- \
--enable-smartcard=no --with-gtk=3.0 --disable-static --enable-introspection


dh_auto_configure -- \
--enable-smartcard=no --with-gtk=2.0 --disable-static --enable-introspection

2. Updated debian/control and added required dependencies

Build-Depends:
debhelper (>= 8.0.0),
libspice-protocol-dev (>= 0.8.1),
libspice-server-dev,
libpixman-1-dev (>= 0.17.7),
libgtk2.0-dev,
libgtk-3-dev,
libglib2.0-dev (>= 2.22),
libcairo2-dev (>= 1.2.0),
libpulse-dev,
python2.7,
python-gtk2-dev (>= 2.0.0),
python-pyparsing,
intltool,
libsasl2-dev,
libjpeg8-dev,
gobject-introspection, <=
libgirepository1.0-dev <=

The last two lines have been added.

3.Several debian/package_name.install files have been updated by adding right full path to corresponding library to accommodate installation of :-

/usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib
/usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib
/usr/share/gir-1.0/SpiceClientGLib-2.0.gir
/usr/share/gir-1.0/SpiceClientGtk-3.0.gir

which otherwise won’t be installed.

Added to libspice-client-glib-2.0-4.install
line usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib

Added to libspice-client-gtk-2.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib

Added to libspice-client-gtk-3.0-1.install
line usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib

Added to libspice-client-glib-2.0-dev.install
line usr/share/gir-1.0/SpiceClientGLib-2.0.gir

Added to libspice-client-gtk-3.0-dev.install
line usr/share/gir-1.0/SpiceClientGtk-3.0.gir

Qemu-kvm 0.15.0 was built with changed dependencies in the same PPA
Packages from https://launchpad.net/~bderzhavets/+archive/test-deb2 installed with no conflicts on Oneiric daily build 08/27/11. Spice sessions (via VirtManager) in QXL mode (64M vram) for install and for runtime have been run. The most recent snapshot for seabios supporting 64M vram for QXL device
uploaded to ppa:bderzhavets/test-deb2, ppa:bderzhavets/test-deb1

To install packages from PPA

$ sudo add-apt-repository ppa:bderzhavet/test-deb2
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
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 spice-client \
seabios

$ 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
$ sudo reboot







References
1. http://mentors.debian.net/package/spice-gtk
2. http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg3124003.html


Qemu-kvm 0.15.0 stable and Spice-Gtk-0.7 on Ubuntu 11.10

August 15, 2011

All packages required are already in PPA “Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10″. Spice-gtk-0.7 has been done for Oneiric as two builds. First one with python, gobject-introspection enabled and –with-gtk=”2.0″(GTK2). Second one –with-introspection and –with-gtk=”3.0″ (GTK3).This builds actually are the core builds in PPA, which bring RH’s technologies to Ubuntu 11.10. Notice, that option –with-audio=”pulse” is also used by both builds and appears to be working fine. Version of Spice Server has been
also upgraded to 0.8.2.
Following bellow is brief description of PPA Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10.
************************************************************************************************************
UPDATE on 08/18/11 I am aware of following builds made at Debian :-
Details about package spice-gtk
Packaging schema at link mentioned above is exactly the same as in spice-gtk-0.7.1-1.fc16.src.rpm
View Rebuild Spice-Gtk-0.7 via Debian Unstable with gobject-introspection enabled
*************************************************************************************************************

1.The most recent qemu-kvm packages were done via “git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git” are Release 0.15.0 as of 08/10/2011.
$ git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
$ cd qemu-kvm
$ git checkout -b stable-0.15 origin/stable-0.15
$ cd ..
Copy to building directory :
$ cp -R qemu-kvm ../BUILD/qemu-kvm-mmddyy
Stable branch is already patched to fix “QXL” issues and to support spicevmc channel

2. Spice-gtk-0.7 has been done for Oneiric as two builds.

GTK2 build performed with
./configure --prefix=/usr --build=x86_64-linux-gnu \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/bin \
--with-python --disable-static \
--enable-introspection \
--enable-smartcard=no \
--with-gtk="2.0" --with-audio="pulse"

GTK3 build performed with
./configure --prefix=/usr --build=x86_64-linux-gnu \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/bin \
--disable-static \
--enable-introspection \
--with-gtk="3.0" --enable-smartcard=no --with-audio="pulse"

libspice-protocol-dev 0.8.1-1 is required by both builds

3.Current version of spice-vdagent for Oneiric as KVM guest installs service and *.desktop (file) automatically and requires guest restart for activation or manual gdm restart and starting service.

***********************************************************************
UPDATE on 08/16/11. Please, view https://wiki.ubuntu.com/spice ,
regarding issues raised up on 08/16/11. You might have to import
PUBLIC KEY separately to install PPA.

Would you have problem with adding my PPAs , like this :-
Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /tmp/tmp.CuZyZy4MSK
–trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver hkp://keyserver.ubuntu.com:80/ –recv 5
gpg: “5″ not a key ID: skipping
Run “sudo apt-get update” . It will show you value of PUBLIC KEY to be imported . Then run :
$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys
$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys \
XXXXXXXXXXXXXXX

Where XXXXXXXXXXXXXX is a value been shown by “apt-get update” on your box
$ sudo apt-get update
***********************************************************************
Install software from PPA :-
************************************************************************
$ sudo apt-add-repository ppa:bderzhavets/qemu-git
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
libspice-client libspice-client-dev \
libspicegtk3-client libspicegtk3-client-dev \
spice libspice-protocol-dev spicegtk3-client

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

Disable libvirtd’s apparmor profile :

$ 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
$ sudo reboot

The most recent daily builds of Ubuntu 11.10 don’t contain Synaptic Manager. To install
$ sudo apt-get install synaptic


Set up Spice-Gtk-0.7 on Ubuntu 11.10

August 7, 2011

All packages required are already in PPA “Spice-Gtk-0.7 on Ubuntu 11.10″. Spice-gtk-0.7 has been done for Oneiric as two builds. First one with python, gobject-introspection enabled and –with-gtk=”2.0″(GTK2). Second one –with-introspection and –with-gtk=”3.0″ (GTK3).This builds actually are the core builds in PPA, which bring RH’s technologies to Ubuntu 11.10. Notice, that option –with-audio=”pulse” is also used by both builds and appears to be working fine.Patched virt-manager and virtinst also support spicevmc channel.
Following bellow is brief description of PPA Spice-Gtk-0.7 on Ubuntu 11.10.
View also PPA Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10

1.The most recent qemu-kvm packages were done via “git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git” are Release 0.15-rc1 as of 07/31/2011.
$ git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
$ cd qemu-kvm
$ git checkout -b stable-0.15 origin/stable-0.15
$ cd ..
Copy to building directory :
$ cp -R qemu-kvm ../BUILD/qemu-kvm-mmddyy
Stable branch is already patched to fix “QXL” issues and to support spicevmc channel

2. Spice-gtk-0.7 has been done for Oneiric as two builds.

GTK2 build performed with
./configure --prefix=/usr --build=x86_64-linux-gnu \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/bin \
--with-python --disable-static \
--enable-introspection \
--enable-smartcard=no \
--with-gtk="2.0" --with-audio="pulse"

GTK3 build performed with
./configure --prefix=/usr --build=x86_64-linux-gnu \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/bin \
--disable-static \
--enable-introspection \
--with-gtk="3.0" --enable-smartcard=no --with-audio="pulse"

libspice-protocol-dev 0.8.1-1 is required by both builds

3.Current version of spice-vdagent for Oneiric as KVM guest installs service and *.desktop (file) automatically and requires guest restart for activation or manual gdm restart and starting service.
4.Packages virt-manager-0.8.7-4ubuntu9 and virtinst-0.500.6-4ubuntu9
support spicevmc channel.
******************************
Install software from PPA :-
******************************
$ sudo apt-add-repository ppa:bderzhavets/spice-7
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
libspice-client libspice-client-dev \
libspicegtk3-client libspicegtk3-client-dev \
spice libspice-protocol-dev spicegtk3-client

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

Disable libvirtd’s apparmor profile :

$ 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
$ sudo reboot


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)


Implementation Spice on Ubuntu 11.10 KVM Server

July 5, 2011

**********************************************************************************************
UPDATE on 12/03/11. Ubuntu 12.04 (Precise Pangolin) alpha 1 is out.
**********************************************************************************************
View Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk-0.7.81 USB redirection for Ubuntu Precise, Oneiric and Linux Mint 12 (Lisa)
**********************************************************************************************
UPDATE on 10/15/11. Ubuntu 11.10 (Oneiric Ocelot) final release is out.
**********************************************************************************************
1. Set up Qemu-kvm 0.15.0(spice enabled), Spice Server (0.8.2), Spice-Gtk-0.7-2(via Debian)
Stable Qemu-kvm-0.15.0+noroms(spice enabled), Spice Server&Client 0.8.2, Spice-Gtk-0.7-2 (via Debian)
2. First view “howtos”
a.Set up Qemu&Spice USB redirection on Ubuntu 11.10
b.Set up Qemu&Spice&Libvirt 0.9.6 USB Redirection on Ubuntu 11.10
3.Link for PPA Qemu&Spice USB redirection and Libvirt 0.9.6 on Ubuntu 11.10
4.View also Qemu-kvm 0.15.1 & Spice USB Redirection support for Ubuntu Oneiric
**********************************************************************************************
UPDATE on 08/27/2011. Following bellow seems to be the best way to implement Qemu-kvm 0.15.0 spice enabled, Spice Server 0.8.2 and Spice-Gtk-0.7 with GObject-introspection enabled on Ubuntu 11.10 in meantime close to Beta 1. View PPA Building Spice-Gtk-0.7 via Debian Unstable with Gobject-introspection enabled. View for core details Implementation Spice on Ubuntu 11.10 KVM Server the most recent approach.
Qemu-kvm 0.15.0 was built with changed dependencies (due to SpiceServer 0.8.2 with embedded libcelt051) in the same PPA
Packages from https://launchpad.net/~bderzhavets/+archive/test-deb2 installed with no conflicts on Oneiric daily build 08/27/11. Spice sessions (via VirtManager) in QXL mode (64M vram) for install and for runtime have been run. The most recent snapshot for seabios supporting 64M vram for QXL device
uploaded to PPAs ppa:bderzhavets/test-deb2, ppa:bderzhavets/test-deb1

To install packages from PPA

$ sudo add-apt-repository ppa:bderzhavet/test-deb2
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
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 spice-client \
seabios

$ 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
**********************************************************************************
All packages required are already in PPA “Spice-Gtk-0.7 on Ubuntu 11.10″. Spice-gtk-0.7 has been done for Oneiric as two builds. First one with python, gobject-introspection enabled and –with-gtk=”2.0″(GTK2). Second one –with-introspection and –with-gtk=”3.0″ (GTK3).This builds actually are the core builds in PPA, which bring RH’s technologies to Ubuntu 11.10. Notice, that option –with-audio=”pulse” is also used by both builds and appears to be working fine.
Following bellow is brief description of PPA Spice-Gtk-0.7 on Ubuntu 11.10.
View also PPA Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10

1.The most recent qemu-kvm packages were done via “git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git” are Release 0.15.0 as of 08/10/2011.
$ git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
$ cd qemu-kvm
$ git checkout -b stable-0.15 origin/stable-0.15
$ cd ..
Copy to building directory :
$ cp -R qemu-kvm ../BUILD/qemu-kvm-mmddyy
Stable branch is already patched to fix “QXL” issues and to support spicevmc channel

2. Spice-gtk-0.7 has been done for Oneiric as two builds.

GTK2 build performed with
./configure --prefix=/usr --build=x86_64-linux-gnu \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/bin \
--with-python --disable-static \
--enable-introspection \
--enable-smartcard=no \
--with-gtk="2.0" --with-audio="pulse"

GTK3 build performed with
./configure --prefix=/usr --build=x86_64-linux-gnu \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/bin \
--disable-static \
--enable-introspection \
--with-gtk="3.0" --enable-smartcard=no --with-audio="pulse"

libspice-protocol-dev 0.8.1-1 is required by both builds

3.Current version of spice-vdagent for Oneiric as KVM guest installs service and *.desktop (file) automatically and requires guest restart for activation or manual gdm restart and starting service.

******************************
Install software from PPA :-
******************************
$ sudo apt-add-repository ppa:bderzhavets/spice-7
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
libspice-client libspice-client-dev \
libspicegtk3-client libspicegtk3-client-dev \
spice libspice-protocol-dev spicegtk3-client

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

Disable libvirtd’s apparmor profile :

$ 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
$ sudo reboot








Build Spice-Gtk-0.6 (GTK2&GTK3) on Ubuntu 11.10 (Oneiric)

June 28, 2011

Package spice-gtk-0.6 has been rebuilt on Natty to support gobject-introspection.Notice, that it was GTK2 build. Only GTK2 build creates SpiceClientGtk.so,which allows you to open Spice Console via virt-manager. Fedora 16 (rawhide) does two parallel builds GTK2 and GTK3. Analysis of spice-gtk-0.6-1.fc16.src.rpm clearly shows how packages are supposed to be created separating directories with GTK2 and GTK3 shared libraries. Actually, spice-gtk.spec works as a sample to create debian’s package.install files, providing an option reproduce exactly the same file layout on Ubuntu 11.10 as it is on F16 (rawhide) after install package spice-gtk-0.6-1.
Just SpiceClientGtk.so allows to run installs with video mode “vga” and spice sessions in “qxl” video mode with created domains via virt-manager.
View PPA Spice-Gtk-0.6 on Ubuntu 11.04 and Ubuntu 11.10 for details :-
Build with GTK2 : spice-gtk-0.6-9ubuntu15
Built packages
libspice-client Spice GTK+ Library
libspice-client-dev Spice GTK+ Library (development files)
Build with GTK3 : spice-gtk3-0.6-3ubuntu9
Built packages
libspicegtk3-client Spice GTK+ Library
libspicegtk3-client-dev Spice GTK+ Library (development files)
spicegtk3-client Virtual Desktop Interface Client using the Spice Protocol
Build spice-gtk3-0.6-3ubuntu9 depends on libspice-client. Both builds have been done for Oneiric and tested to install (with no conflicts) via Synaptic Manager and to work on daily builds 06/24/11 and 06/29/11 . Qemu-kvm build (spice enabled) was based on git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git as of 06/23/11.


Set up Spicevmc Channel on Ubuntu 11.04 as KVM Server and spice-vdagent on Natty as a KVM guest

June 13, 2011

Procedure following bellow set up spicevmc channel support on KVM Server Ubuntu Natty. It also instructs how to setup spice-vdagent on Natty installed as KVM guest at any KVM Server Ubuntu 11.04 or F15. In other words it contains build debian package spice-vdagent via source for Ubuntu 11.04 ( Natty). To setup spicevmc channel on Natty install qemu-kvm packages from PPA Packages in Spice-Gtk-0.6 on Ubuntu 11.04 and Ubuntu 11.10. Build qemu-kvm-060911-0ubuntu5 from PPA already supports spicevmc channel.It’s original tarball is based on git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git on 06/09/2011.Also upgrade virtinst via same PPA up to 0.500.6 to have virt-install understand option “–channel spicevmc”

Install VF15 KVM guest via :-

virt-install --connect qemu:///system \
--virt-type kvm \
--os-type=linux --os-variant=fedora15 \
--name VM15VMC --ram 2048 --disk path=/dev/sda5 \
--graphics spice --video qxl --channel spicevmc \
--cdrom /usr/tmp/Fedora-15-x86_64-DVD.iso --vcpus 2

Due to absence Virt-Manager’s ability to create channels,
e.g. it’s missing required F15 patches. Then in guest environment :
# sudo yum update
# sudo yum install spice-vdagent.
It provides an option cut text in VM Spice screen and paste in KVM Server Ubuntu 11.04 desktop environment and vice versa ….
Debian qemu-kvm packages providing spicevmc support have been also tested OK on Oneiric ( Libvirt 0.9.1)





Install Natty KVM guest as follows :-


virt-install --connect qemu:///system \
--virt-type kvm \
--os-type=linux --os-variant=ubuntunatty \
--name UbuntuVMC --ram 2048 \
--disk path=/dev/sdb7 \
--graphics spice --video qxl \
--channel spicevmc \
--cdrom /usr/tmp/ubuntuDesk11.04.iso \
--vcpus 2

When done install spice-vdagent for Natty via PPA Spice on Ubuntu 11.04 and 11.10.
*********************************************************************************
Update on 06/17/2011. Current versions of spice-vdagent install service and *.desktop (file) automatically and require guest restart for activation or manual gdm restart and starting service.
*********************************************************************************

Next :-
1. Create file /etc/xdg/autostart/spice-vdagent.desktop

[Desktop Entry]
Name=Spice vdagent
Comment=Agent for Spice guests
Exec=/usr/bin/spice-vdagent
Terminal=false
Type=Application
Categories=
X-GNOME-Autostart-Phase=Initialization
X-GNOME-AutoRestart=true

2. Then create service spice-vdagentd.

Create file /etc/init/spice-vdagentd.conf

# spice-vdagent - spice-vdagent job file
description "spice-vdagentd"
author "Boris Derzhavets <bderzhavets@yahoo.com>"
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect fork
# Run before process
pre-start script
[ -d /var/run/spice-vdagentd ] || mkdir -p /var/run/spice-vdagentd
echo "Put bash code here"
end script
# Start the process
exec /usr/sbin/spice-vdagentd

Expected result :-

boris@boris-virtual-machine:~$ ps -ef| grep spice- | grep -v grep
root 739 1 0 09:23 ? 00:00:00 /usr/sbin/spice-vdagentd
gdm 1041 1 0 09:23 ? 00:00:00 /usr/bin/spice-vdagent
boris 1248 1 0 09:23 ? 00:00:00 /usr/bin/spice-vdagent

Current Build is just for testing. All actions above should be incapsulated in debian package.
If feature doesn’t work :-
boris@boris-virtual-machine:~$ ps -ef|grep spice-
root 1044 1 0 18:25 ? 00:00:00 /usr/sbin/spice-vdagentd
boris 1439 1379 0 18:25 pts/0 00:00:00 grep –color=auto spice-
boris@boris-virtual-machine:~$ /usr/bin/spice-vdagent &
[1] 1445



Testing Oneiric Daily Build as KVM guest :-


Spice-Gtk-0.6 on Ubuntu 11.10 (Oneiric) after Libvirt & python-libvirt upgrade up to 0.9.1

June 10, 2011

Packages from PPA Spice-Gtk-0.6 on Ubuntu 11.04 have been rebuilt and installed on Oneiric Alpha 1 + (apt-get update; apt-get upgrade) as of 06/10/2011. Virt-Manager is able to perform guest’s installs with either VNC Server or Spice Server & Video Mode “VGA”. Afterwards guest’s Grapics may be switched to Spice Server and video mode to “QXL” Spice sessions run normal via Virt-Manager and spicec as well. As of now all packages from Spice-Gtk-0.6 on Ubuntu 11.04 and Ubuntu 11.10 are rebuilt for Oneiric and uploaded to the same PPA.








Set up Spice-Gtk-0.6 on Ubuntu 11.04 ( Natty Narwhal )

May 23, 2011

I presume that standard KVM Server has been already setup on Ubuntu 11.04. The intend is to push “spice” as far as possible on the system, including option of running spice session via virt-manager for domains install (video “vmvga”) and runtime (video “qxl” or “vmvga”) as well. Add to system PPA Building qemu-kvm&spice based on current /virt/kvm/qemu-kvm.git for Ubuntu 11.04

# apt-add-repository ppa:bderzhavets/git-spice
# apt-get update

Install all packages from PPA except spice-gtk. It will result install spice enabled qemu binaries into /usr/bin due to
original tar ball was based on git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git as of May 18 2011. Spice server and spice client will be installed also.
*************************************************************************************************************
Update on 05/25/2011. Finally i have rebuilt Spice-gtk package in mentioned PPA to support python and gobject-introspection
*************************************************************************************************************
Then we will build Spice-gtk-0.6 manually to enable gobject-introspection

# apt-get install cdbs debhelper autotools-dev spice-protocol-dev \
libpixman-1-dev pkg-config libssl-dev \
libjpeg62-dev libcelt051-dev libgtk2.0-dev libglib2.0-dev \
libcairo2-dev libpulse-dev libsasl2-dev \
python2.6 libtext-csv-perl python-pyparsing python-gtk2-dev \
gobject-introspection libgirepository1.0-dev

Download spice-gtk-0.6.tar.bz2 to /usr/src/SPICE_GTK_0.6

# cd /usr/src/SPICE_GTK_0.6
# tar -jxvf spice-gtk-0.6.tar.bz2
# cd spice-gtk-0.6
# ./configure –prefix=/usr –build=x86_64-linux-gnu \
–mandir=/usr/share/man –infodir=/usr/share/info –datadir=/usr/share \
–sysconfdir=/etc –localstatedir=/var –libexecdir=/usr/bin \
–with-python –disable-static –enable-introspection

. . . . . . . .

Spice-Gtk 0.6
==============

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

Coroutine: ucontext
Audio: pulse
Target:
SASL support: yes
Gtk: 2.0

Now type ‘make’ to build spice-gtk

# make
# checkinstall –install=no
# dpkg -i ./spice-gtk_0.6-1_amd64.deb
(Reading database … 148506 files and directories currently installed.)
Unpacking spice-gtk (from ./spice-gtk_0.6-1_amd64.deb) …
Setting up spice-gtk (0.6-1) …

There is also another option add to system PPA Spice-Gtk-0.6 on Ubuntu 11.04 and install ready package spice-gtk-0.6-1ubuntu8.

Start spice session via virt-manager :-





At this point mouse pointer will be lost after blind click on the bar ” Account Name”. But bar will stay highlighted. Press “Enter”
it will activate password prompt and get mouse pointer back. Otherwise, log into VM and mouse pointer should be alive again.
Procedure has been tested with F14,Natty,W7 virtual machines logging in.




Rebuild KVM/QEMU to support SPICE on Ubuntu 11.04 (Natty Narwhal)

May 9, 2011

Rebuild procedure of regular qemu-kvm package to support spice on Natty Narwhal follows bellow. It depends on all packages from ppa:serge-hallyn/spice2 except qemu-kvm-spice. New packages install spice enabled /usr/bin/qemu* binaries and graphical spice client. I just disabled libvirtd’s AppArmor profile to be able manage domains via virt-manager. Spice install may be performed via virt-install. It would understand options “–graphics spice”, “–video qxl”. All required packages have been uploaded and built in PPA Spice on Ubuntu 11.04. View also
Building qemu-kvm&spice based on current /virt/kvm/qemu-kvm.git for Ubuntu 11.04
Uncompress regular Natty qemu-kvm package :-

qemu-kvm_0.14.0+noroms-0ubuntu4.diff.gz
qemu-kvm_0.14.0+noroms-0ubuntu4.dsc
qemu-kvm_0.14.0+noroms.orig.tar.gz

# dpkg-source -x qemu-kvm_0.14.0+noroms-0ubuntu4.dsc
# cd qemu-kvm_0.14.0+noroms-0ubuntu4

Edit debian/rules and comment line ( per Serge Hallyn)

# $(MAKE) -f debian/rules unpatch

to get patching to work !!

That’s a reason why hack “spice-qxl-locking-fix-for-qemu-kvm.patch” didn’t work originally.

Change ./configure part of debian/rules adding “–enable-spice” :-

config-host.mak: $(QUILT_STAMPFN)
dh_testdir
./configure \
–target-list=”x86_64-softmmu i386-softmmu x86_64-linux-user i386-linux-user” \
–prefix=/usr \
–interp-prefix=/etc/qemu-binfmt/%M \
–disable-blobs \
–disable-strip \
–enable-spice \
$(conf_arch)
Save

Edit debian/patches/series:-

larger_default_ram_size.patch
# Detect-and-use-GCC-atomic-builtins-for-locking.patch
# spice-qxl-locking-fix-for-qemu-kvm.patch
0001-qxl-spice-display-move-pipe-to-ssd.patch
0002-qxl-implement-get_command-in-vga-mode-without-locks.patch
0003-qxl-spice-remove-qemu_mutex_-un-lock_iothread-around.patch
0004-hw-qxl-render-drop-cursor-locks-replace-with-pipe.patch

Save and copy required patches to debian/patches.

Edit debian/control like in SPICE2 PPA:-

Build-Depends: bcc,
bzip2,
debhelper (>= 7),
device-tree-compiler [powerpc],
iasl,
libaio-dev,
libasound2-dev,
libcelt051-dev,
libcurl4-gnutls-dev,
libgnutls-dev,
libncurses5-dev,
libpci-dev,
libpixman-1-dev,
libpulse-dev,
libsasl2-dev,
libsdl1.2-dev (>= 1.2.14),
libssl-dev,
libx11-dev,
nasm,
perl,
pkg-config,
quilt (>= 0.40),
libspice-server-dev,
spice-protocol-dev,
sysv-rc (>= 2.86.ds1-14.1ubuntu2),
texi2html,
texinfo,
uuid-dev,
zlib1g-dev
Save.

Edit debian/chagelog and upgrade version to 5.
# cd ..
# dpkg-buildpackage -rfakeroot -b -us -uc
# cd ..
root@boris-System-P5Q3:~/QEMU14# # dpkg -i ./qemu-kvm_0.14.0+noroms-0ubuntu5_amd64.deb \
qemu_0.14.0+noroms-0ubuntu5_amd64.deb \
qemu-common_0.14.0+noroms-0ubuntu5_all.deb

(Reading database … 141175 files and directories currently installed.)
Preparing to replace qemu-kvm 0.14.0+noroms-0ubuntu4 (using …/qemu-kvm_0.14.0+noroms-0ubuntu5_amd64.deb) …
Unpacking replacement qemu-kvm …
Preparing to replace qemu 0.14.0+noroms-0ubuntu4 (using qemu_0.14.0+noroms-0ubuntu5_amd64.deb) …
Unpacking replacement qemu …
Preparing to replace qemu-common 0.14.0+noroms-0ubuntu4 (using qemu-common_0.14.0+noroms-0ubuntu5_all.deb) …
Unpacking replacement qemu-common …
Setting up qemu-common (0.14.0+noroms-0ubuntu5) …
Setting up qemu-kvm (0.14.0+noroms-0ubuntu5) …
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
Processing triggers for man-db …
Setting up qemu (0.14.0+noroms-0ubuntu5) …

# dpkg -l | grep qemu

ii qemu 0.14.0+noroms-0ubuntu5 dummy transitional package from qemu to qemu-kvm
ii qemu-common 0.14.0+noroms-0ubuntu5 qemu common functionality (bios, documentation, etc)
ii qemu-kvm 0.14.0+noroms-0ubuntu5 Full virtualization on i386 and amd64 hardware

root@boris-System-P5Q3:~/QEMU14# ls -l /usr/bin/kvm*
lrwxrwxrwx 1 root root 18 2011-05-06 15:24 /usr/bin/kvm -> qemu-system-x86_64
lrwxrwxrwx 1 root root 8 2011-05-06 15:24 /usr/bin/kvm-img -> qemu-img
lrwxrwxrwx 1 root root 8 2011-05-06 15:24 /usr/bin/kvm-nbd -> qemu-nbd
-rwxr-xr-x 1 root root 11792 2011-02-22 16:34 /usr/bin/kvm_stat

root@boris-System-P5Q3:~/QEMU14# ls -l /usr/bin/qemu*
-rwxr-xr-x 1 root root 3520568 2011-05-06 15:08 /usr/bin/qemu
-rwxr-xr-x 1 root root 2014976 2011-05-06 15:08 /usr/bin/qemu-i386
-rwxr-xr-x 1 root root 270 2011-05-06 14:04 /usr/bin/qemu-ifdown
-rwxr-xr-x 1 root root 138 2011-02-22 16:34 /usr/bin/qemu-ifup
-rwxr-xr-x 1 root root 350640 2011-05-06 15:08 /usr/bin/qemu-img
-rwxr-xr-x 1 root root 362928 2011-05-06 15:08 /usr/bin/qemu-io
-rwxr-xr-x 1 root root 338384 2011-05-06 15:08 /usr/bin/qemu-nbd
lrwxrwxrwx 1 root root 4 2011-05-06 15:24 /usr/bin/qemu-system-i386 -> qemu
-rwxr-xr-x 1 root root 3590968 2011-05-06 15:08 /usr/bin/qemu-system-x86_64
-rwxr-xr-x 1 root root 2055128 2011-05-06 15:08 /usr/bin/qemu-x86_64

Signed packages uploaded to https://launchpad.net/~bderzhavets/+archive/spice2


Set up KVM/QEMU/SPICE on Ubuntu 11.04 via ppa:serge-hallyn/spice2

April 27, 2011

*****************************************************************************************************************
UPDATE on 09/21/11 Ubuntu 11.10 beta-2 will be released tomorrow.
Ubuntu 11.10 final release (Oneiric Ocelot) on 10/14/11
*****************************************************************************************************************
1. Set up Qemu-kvm 0.15.0(spice enabled), Spice Server(0.8.2), Spice-Gtk-0.7-2(via Debian) for Oneiric
Qemu-kvm-0.15.0+noroms (spice enabled), Spice Server&Client 0.8.2, Spice-Gtk-0.7-2 (via Debian)

2. Set up Qemu-kvm 0.15.1 & Spice USB Redirection support for Ubuntu Oneiric
Patches set for debian build may be generated as follows :

$ git clone git://people.freedesktop.org/~jwrdegoede/qemu
$ cd qemu
$ git checkout -B qemu-kvm-0.15.0-usbredir origin/qemu-kvm-0.15.0-usbredir
$ mkdir -p /tmp/patches
$ git format-patch -M -C --output-directory \
/tmp/patches ea2798c1ebe0c12d5feb7d7471a999ea0671ef2f

Kernel installed is 3.1.0-030100-generic
Consider option downgrade seabios 1.6.3 => 0.6.2-qxl if some things go wrong for you. It won’t affect USB Redirection support

*****************************************************************************************************************
UPDATE on 08/27/2011. In meantime the best way to solve the problem on Ubuntu 11.10 (Oneiric) is to work via PPA Building Spice-Gtk-0.7 via Debian Unstable with Gobject-introspection enabled. View for details Implementation Spice on Ubuntu 11.10 KVM Server the most recent approach.
Qemu-kvm 0.15.0 was built with changed dependencies in the same PPA
Packages from https://launchpad.net/~bderzhavets/+archive/test-deb2 installed with no conflicts on Oneiric daily build 08/27/11. Spice sessions (via VirtManager) in QXL mode (64M vram) for install and for runtime have been run.

To install packages from PPA

$ sudo add-apt-repository ppa:bderzhavet/test-deb2
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
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 spice-client \
seabios

$ 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
**********************************************************************************************************************
Packages installed via ppa:serge-hallyn/spice2 have been tested for F14, W7 KVMs installs and runtime. Package qemu-kvm-spice (0.14.0+noroms-0ubuntu4qxl2) is based on the most recent RH’s QXL patches sets for qemu-kvm-0.14.tar.gz. Disabling AppArmor’s profile for libvirtd allows to manage and create domains via virt-manager 0.8.6-1 installed on Ubuntu Natty Narwhal. However, first domain install with option “-spice port=5900,disable-ticketing -vga qxl” has been been performed via qemu-kvm command line keeping original restrictions in place.
Add new repository to system :-

# add-apt-repository ppa:serge-hallyn/spice2
# apt-get update

Install packages from PPA on your system :-



Verify install via “dpkg -l” :

root@boris-System-P5Q3:~# dpkg -l |grep spice
ii libspice-client 0.6-0ubuntu1 Spice GTK+ Library
ii libspice-client-dev 0.6-0ubuntu1 Spice GTK+ Library (development files)
ii libspice-server 0.8.1-0ubuntu1 Spice Server-Side Library
ii libspice-server-dev 0.8.1-0ubuntu1 Spice Server-Side Library (development files)
ii qemu-kvm-spice 0.14.0+noroms-0ubuntu4qxl2 Full virtualization on i386 and amd64 hardware
ii spice 0.8.1-0ubuntu1 Spice Client
ii spice-protocol-dev 0.8.0-0ubuntu1 SPICE protocol headers

AppArmor’s restriction for libvirtd profile on Natty Narwhal brings us initially to qemu-kvm command line installation.
Open terminal session and issue :-

/usr/bin/kvm-spice -cpu host -enable-kvm \
-name W7 -m 2048 \
-drive file=/dev/sdb7,if=virtio,media=disk,aio=native,cache=off \
-drive file=/usr/tmp/virtio-win-1.1.16.vfd,if=floppy \
-net nic,model=rtl8139 -net user -localtime \
-usb -vga qxl -spice port=5900,disable-ticketing \
-cdrom /usr/tmp/Win7_64.iso -boot d

Connect to console via “spicec -h localhost -p 5900″ and proceed with install :-







When done load W7 KVM as follows :-

/usr/bin/kvm-spice -cpu host -enable-kvm \
-name W7 -m 2048 \
-drive file=/dev/sdb7,if=virtio,media=disk,aio=native,cache=off \
-net nic,model=virtio -net user -localtime \
-usb -vga qxl -spice port=5900,disable-ticketing \
-cdrom /usr/tmp/virtio-win-1.1.16.iso

and set up VirtIO Net Driver




Finally runtime command line will look like :-

/usr/bin/kvm-spice -cpu host -enable-kvm \
-name W7 -m 2048 \
-drive file=/dev/sdb7,if=virtio,media=disk,aio=native,cache=off \
-net nic,model=virtio -net user -localtime \
-usb -vga qxl -spice port=5900,disable-ticketing



Now disable AppArmor profile for libvirtd :-

# ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
# apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
# reboot

Next step

# cd /usr/bin
# cp qemu-system-x86_64-spice qemu-system-x86_64
# cp qemu-x86_64-spice qemu-x86_64

Invoke virt-manager with option "Import Existing Image"



and update XML definition of W7 as follows.

<domain type='kvm'>
<name>W7</name>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='pc-0.14'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/sdb7'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:7d:5d:dc'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='spice' autoport='yes' listen='0.0.0.0'/>
<sound model='ac97'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' vram='32768' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>

Run
# virsh define W7.xml

Now start domain via Virt-Manger :-





Actually at this point domains may be created in VNC mode via virt-manager 0.8.6-1. SPICE Server activated invoking "Add Hardware" wizard -> "Graphics->Spice Server , previously removing VNC Server. Switching domain to "QXL" mode is also possible via virt-manager.

References
1. https://launchpad.net/~serge-hallyn/+archive/spice2


Backport Virt-manager 0.8.7-3 (without spice) & python-virtinst-0.500.6-2 to Scientific Linux 6

April 19, 2011

Primary target is to get virt-install supporting options “–graphics spice”,”–video qxl”,”–channel spicevmc”.
Virt-manager-0.8.7-3.fc15.src.rpm has to be installed and it’s spec’s file updated :-

%define with_spice 0

then rebuild and perform virt-manager-0.8.7-3.el6.noarch.rpm install, having python-virtinst-0.500.6-2 already in place :-

yum install virt-manager-0.8.7-3.el6.noarch.rpm

It seems running smoothly with python-virtinst-0.500.6-2 ( rebuilt and reinstalled in the same way). Obviously there is no access to spice console via virt-manager. I also upgraded spice-client up to 0.6.3 , what requires pixman-0.18.4-1.fc14.src.rpm rebuilt on SL 6 and install pixman & pixman-devel. In particular, “Add Hardware” wizard Graphics->Spice Server allows
to avoid manual updating XML VM’s profile as suggested in [1].
Two KVMs have been tested positive :-

virt-install --connect qemu:///system --virt-type kvm \
--os-type=linux --os-variant=virtio26 \
--name NattyB2 --ram 1024 --disk path=/dev/sdb3 \
--graphics spice --video qxl --channel spicevmc \
--cdrom /usr/tmp/ubuntu-11.04-beta2-desktop-amd64.iso --vcpus 2







virt-install --connect qemu:///system --virt-type kvm \
--name W7 --ram 4096 \
--disk path=/dev/sdb11,bus=virtio \
--disk /usr/tmp/virtio-win-1.1.16.vfd,device=floppy \
--os-variant win7 \
--graphics spice --video qxl --channel spicevmc \
--cdrom /usr/tmp/Win7_64.iso --vcpus 2







XML profile after virt-install looks like :-

<domain type='kvm'>
<name>W7</name>
<memory>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='rhel6.0.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sdb11'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='file' device='floppy'>
<driver name='qemu' type='raw'/>
<source file='/usr/tmp/virtio-win-1.1.16.vfd'/>
<target dev='fda' bus='fdc'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/usr/tmp/virtio-win-1.1.16.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='fdc' index='0'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:f1:01:e9'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='0'/>
</channel>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='spice' port='5900' tlsPort='-1' autoport='yes' />
<video>
<model type='qxl' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>

Updated via “virsh edit W7″ :-

<graphics type='spice' port='5900' tlsPort='-1' autoport='yes' listen='0.0.0.0'/>
<video>
<model type='qxl' vram='32768' heads='1'/>
. . . .

Same XML may be automatically generated via Virt-Manager 0.8.7-3 after normal VNC install :-
1. Remove VNC Server
2. “Add hardware”->”Graphics”->”SPICE Server”



Package “spice-gtk” is expected only in RHEL 6.2
References
1. http://www.server-world.info/en/note?os=Scientific_Linux_6&p=kvm&f=6


Attempt to manage Fedora 15 KVM Server via Gnome 3 shell

April 9, 2011

Following bellow is brief exercise managing Gnome 3 Desktop to create Ubuntu Maverick Meerkat KVM and run it in spice session.First of all after “yum update” i verified current “qemu” and “libvirt” status on Fedora 15. Virtualization Group has been selected during initial install.

[root@fedora15 ~]# rpm -qa |grep qemu
qemu-common-0.14.0-7.fc15.x86_64
qemu-kvm-0.14.0-7.fc15.x86_64
qemu-img-0.14.0-7.fc15.x86_64
qemu-system-x86-0.14.0-7.fc15.x86_64
gpxe-roms-qemu-1.0.1-4.fc15.noarch

[root@fedora15 ~]# rpm -qa |grep virt
redland-virtuoso-1.0.12-3.fc15.x86_64
virtuoso-opensource-6.1.2-3.fc15.x86_64
python-virtkey-0.50-9.fc15.x86_64
libvirt-0.8.8-4.fc15.x86_64
virt-manager-0.8.7-2.fc15.noarch
python-virtinst-0.500.6-1.fc15.noarch
virt-viewer-0.3.1-1.fc15.x86_64
libvirt-python-0.8.8-4.fc15.x86_64
libvirt-client-0.8.8-4.fc15.x86_64

Then added Virt-Manager to favourites to avoid several mouse clicks at every start up :-






Start Ubuntu 10.10 KVM install :-





Run “apt-get update; apt-get upgrade” in VNC session :-



Switch to SPICE Server



**********************************************************************************************************************************************
In this case Spice Display Screen will show address 127.0.0.1 and connection to via spicec will be available only locally.
To get spicec working remotely remove Display VNC and “Add hardware” Display Spice. It will show you address 0.0.0.0.
In this case connections via spicec will be available remotely
**********************************************************************************************************************************************
Started Ubuntu 10.10 KVM and activated command window via ALT+F2





Set up Ubuntu 11.04 ,10.10 KVM to run in spice session on Fedora 14 KVM Server ( Libvirt Preview Env)

March 19, 2011

The most recent patches to Fedora’s Qemu 0.14 went into qemu-0.14.0-6.fc14.src.rpm on 03/31/2011. Following bellow is brief description of F14 KVM and Spice Server set up via “Libvirt Preview” ( http://repos.fedorapeople.org/repos/jforbes/virt-preview/fedora-14/SRPMS/). Configured KVM Server allows to create Ubuntu 10.10, 11.04 Desktop KVM beta 1 (64 bit), which may run in spice session. Notice that Virt-Manager 0.8.7-2 does have SPICE support. It allows to switch particular VM from VNC Server to SPICE Server and run spice session via GUI or connect to VM via command line locally or remotely.
**********************************************************************************************************************************************
In this case Spice Display Screen will show address 127.0.0.1 and connections to VM via spicec will be available only locally.
To get spicec working remotely remove Display VNC and “Add hardware” Display Spice. It will show you address 0.0.0.0
In this case connections via spicec will be available remotely
***********************************************************************************************************************************************
Ubuntu 10.10 Desktop,11.04 Desktop KVM beta 1 require “apt-get update,apt-get upgrade” to run stable in SPICE session

Configure fedora-virt-preview.repo :-
[root@fedorakvm yum.repos.d]# cat fedora-virt-preview.repo

# Place this file in your /etc/yum.repos.d/ directory
[fedora-virt-preview]

name=Virtualization Preview Repository for Fedora 14 Users
baseurl=http://repos.fedorapeople.org/repos/jforbes/virt-preview/fedora-$releasever/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=0

[fedora-virt-preview-source]
name=Virtualization Preview Repository for Fedora 14 Users – Source
baseurl=http://repos.fedorapeople.org/repos/jforbes/virt-preview/fedora-$releasever/SRPMS
enabled=0
skip_if_unavailable=1
gpgcheck=0

Then run :-
# yum update

Make sure :-

[root@fedorakvm ~]# rpm -qa|grep virt
virt-manager-0.8.7-2.fc14.noarch
python-virtkey-0.50-8.fc14.x86_64
libvirt-client-0.8.8-2.fc14.x86_64
libvirt-0.8.8-2.fc14.x86_64
libvirt-python-0.8.8-2.fc14.x86_64
virt-viewer-0.3.1-1.fc14.x86_64
python-virtinst-0.500.6-1.fc14.noarch

[root@fedorakvm ~]# rpm -qa|grep qemu
qemu-system-x86-0.14.0-6.fc14.x86_64
qemu-kvm-0.14.0-6.fc14.x86_64
qemu-common-0.14.0-6.fc14.x86_64
qemu-img-0.14.0-6.fc14.x86_64
gpxe-roms-qemu-1.0.1-3.fc14.noarch

Install spice :-
# yum install spice-protocol spice-server spice-client

Make sure :-

# rpm -qa |grep spice
spice-server-devel-0.8.0-1.fc14.x86_64
spice-protocol-0.8.0-1.fc14.noarch
spice-gtk-python-0.5-1.fc14.x86_64
spice-client-0.8.0-1.fc14.x86_64
spice-glib-0.5-1.fc14.x86_64
spice-server-0.8.0-1.fc14.x86_64
spice-gtk-0.5-1.fc14.x86_64

Create via virt-manager Ubuntu 11.04 Desktop (betta 1) KVM and run :-

# apt-get update
# apt-get upgrade

Due to presence SPICE support in Virt-Manager 0.7.2 switch to SPICE DISPLAY and start SPICE session via Virt-Manager :-





Connection to VM via command line :-



Automatically generated XML profile :-

[root@fedora14sp ~]# virsh dumpxml Natty
<domain type='kvm' id='7'>
<name>Natty</name>
<uuid>18260de6-7958-046a-7bc6-cd5e6d15bff5</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='pc-0.14'>hvm</type>
<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>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sda9'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:63:5d:a9'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/0'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/0'>
<source path='/dev/pts/0'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='spice' port='5900' tlsPort='-1' autoport='yes' listen='0.0.0.0'/>
<sound model='ac97'>
<alias name='sound0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>

Graphics section now looks like :-

<graphics type='spice' port='5900' tlsPort='-1' autoport='yes' listen='0.0.0.0'/>

Old way with modifying XML definition and connecting via command would work as well.
Create script /usr/tmp/qemu-spice :
cat /usr/tmp/qemu-spice
#!/bin/bash

exec /usr/bin/qemu-kvm $* \
-vga qxl \
-spice port=5930,disable-ticketing

# chmod 755 /usr/tmp/qemu-spice

and add to root’s .bashrc
export PATH=/usr/tmp:$PATH

Create via virt-manager Ubuntu 11.04 Desktop (alpha 3) KVM and install QXL driver via Synaptic manager. Say name of VM created is NATTY. Then run :-
# virsh dumpxml NATTY > Natty.xml
Edit XML file as follows

1. Change emulator to /usr/tmp/qemu-spice
2. Remove VIDEO section
3. Remove UUID section
4. Change VM’s name

[root@fedorakvm ~]# cat Natty.xml
<domain type='kvm'>
<name>NATSP</name>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='pc-0.14'>hvm</type>
<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>
<devices>
<emulator>/usr/tmp/qemu-spice</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sdb6'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:c5:81:45'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<sound model='ac97'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>

Run :-
# virsh define Natty.xml
and new NATSP entry in Virt-Manager will be created. Start NATSP and connect via
# spicec -h localhost -p 5930
to NATSP







Attempt of qemu-kvm-0.14 patching via Gerd’s Hoffmann “spice/qxl: locking fix for qemu-kvm” on F14

March 13, 2011

Following bellow is attempt to test mentioned patch to resolve problem with loading KVM with “-vga qxl” by /usr/bin/qemu-kvm (v. 0.14) on Fedora 14 ( Libvirt Preview Environment ) . View : http://patchwork.ozlabs.org/patch/84704/. Test was successful for SL6,F14,W2K3,W7 KVMs (without QXL driver installed) and failed on Ubuntu 10.10 KVM no matter of presence or absence of QXL driver.
Download corresponding SRC RPM :-
# wget http://repos.fedorapeople.org/repos/jforbes/virt-preview/fedora-14/SRPMS/qemu-0.14.0-2.fc14.src.rpm
Install it :-
# rpm -iv qemu-0.14.0-2.fc14.src.rpm
# cd
#cd rpmbuild/SPECS

Patch ../SOURCES/qemu-kvm-0.14.0.tar.gz via Gerd’s Hoffmann “spice/qxl: locking fix for qemu-kvm” .Then build

[root@fedora14 SPECS]# rpmbuild –with x86only -bb ./qemu.spec

*****************************
Remove old RPMS :-
*****************************
[root@fedora14 x86_64]# cat remove.sh
yum remove qemu-0.14.0-2.fc14.x86_64 \
qemu-common-0.14.0-2.fc14.x86_64 \
qemu-debuginfo-0.14.0-2.fc14.x86_64 \
qemu-img-0.14.0-2.fc14.x86_64 \
qemu-kvm-0.14.0-2.fc14.x86_64 \
qemu-kvm-tools-0.14.0-2.fc14.x86_64 \
qemu-system-x86-0.14.0-2.fc14.x86_64 \
qemu-user-0.14.0-2.fc14.x86_64
[root@fedora14 x86_64]# ./remove.sh
Removing:
qemu x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 0.0
qemu-common x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 767 k
qemu-img x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 686 k
qemu-kvm x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 0.0
qemu-system-x86 x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 10 M
qemu-user x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 33 M
Removing for dependencies:
libvirt x86_64 0.8.8-2.fc14 @fedora-virt-preview 2.8 M
qemu-system-arm x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 3.2 M
qemu-system-cris x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 1.6 M
qemu-system-m68k x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 2.1 M
qemu-system-mips x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 13 M
qemu-system-ppc x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 12 M
qemu-system-sh4 x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 4.1 M
qemu-system-sparc x86_64 2:0.14.0-2.fc14 @fedora-virt-preview 1.8 M

[root@fedora14 x86_64]# cat inst.sh
yum install qemu-0.14.0-2.fc14.x86_64.rpm \
qemu-common-0.14.0-2.fc14.x86_64.rpm \
qemu-debuginfo-0.14.0-2.fc14.x86_64.rpm \
qemu-img-0.14.0-2.fc14.x86_64.rpm \
qemu-kvm-0.14.0-2.fc14.x86_64.rpm \
qemu-kvm-tools-0.14.0-2.fc14.x86_64.rpm \
qemu-system-x86-0.14.0-2.fc14.x86_64.rpm \
qemu-user-0.14.0-2.fc14.x86_64.rpm
********************************************************************
Install patched ones , just built via rpmbuild procedure :-
********************************************************************
[root@fedora14 x86_64]# ./inst.sh
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Install Process
Examining qemu-0.14.0-2.fc14.x86_64.rpm: 2:qemu-0.14.0-2.fc14.x86_64
Marking qemu-0.14.0-2.fc14.x86_64.rpm to be installed
Examining qemu-common-0.14.0-2.fc14.x86_64.rpm: 2:qemu-common-0.14.0-2.fc14.x86_64
Marking qemu-common-0.14.0-2.fc14.x86_64.rpm to be installed
Examining qemu-debuginfo-0.14.0-2.fc14.x86_64.rpm: 2:qemu-debuginfo-0.14.0-2.fc14.x86_64
Marking qemu-debuginfo-0.14.0-2.fc14.x86_64.rpm to be installed
Examining qemu-img-0.14.0-2.fc14.x86_64.rpm: 2:qemu-img-0.14.0-2.fc14.x86_64
Marking qemu-img-0.14.0-2.fc14.x86_64.rpm to be installed
Examining qemu-kvm-0.14.0-2.fc14.x86_64.rpm: 2:qemu-kvm-0.14.0-2.fc14.x86_64
Marking qemu-kvm-0.14.0-2.fc14.x86_64.rpm to be installed
Examining qemu-kvm-tools-0.14.0-2.fc14.x86_64.rpm: 2:qemu-kvm-tools-0.14.0-2.fc14.x86_64
Marking qemu-kvm-tools-0.14.0-2.fc14.x86_64.rpm to be installed
Examining qemu-system-x86-0.14.0-2.fc14.x86_64.rpm: 2:qemu-system-x86-0.14.0-2.fc14.x86_64
Marking qemu-system-x86-0.14.0-2.fc14.x86_64.rpm to be installed
Examining qemu-user-0.14.0-2.fc14.x86_64.rpm: 2:qemu-user-0.14.0-2.fc14.x86_64
Marking qemu-user-0.14.0-2.fc14.x86_64.rpm to be installed
Resolving Dependencies
–> Running transaction check
—> Package qemu.x86_64 2:0.14.0-2.fc14 set to be installed
–> Processing Dependency: qemu-system-sparc = 2:0.14.0-2.fc14 for package: 2:qemu-0.14.0-2.fc14.x86_64
–> Processing Dependency: qemu-system-arm = 2:0.14.0-2.fc14 for package: 2:qemu-0.14.0-2.fc14.x86_64
–> Processing Dependency: qemu-system-cris = 2:0.14.0-2.fc14 for package: 2:qemu-0.14.0-2.fc14.x86_64
–> Processing Dependency: qemu-system-sh4 = 2:0.14.0-2.fc14 for package: 2:qemu-0.14.0-2.fc14.x86_64
–> Processing Dependency: qemu-system-m68k = 2:0.14.0-2.fc14 for package: 2:qemu-0.14.0-2.fc14.x86_64
–> Processing Dependency: qemu-system-mips = 2:0.14.0-2.fc14 for package: 2:qemu-0.14.0-2.fc14.x86_64
–> Processing Dependency: qemu-system-ppc = 2:0.14.0-2.fc14 for package: 2:qemu-0.14.0-2.fc14.x86_64
—> Package qemu-common.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-debuginfo.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-img.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-kvm.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-kvm-tools.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-system-x86.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-user.x86_64 2:0.14.0-2.fc14 set to be installed
–> Running transaction check
—> Package qemu-system-arm.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-system-cris.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-system-m68k.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-system-mips.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-system-ppc.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-system-sh4.x86_64 2:0.14.0-2.fc14 set to be installed
—> Package qemu-system-sparc.x86_64 2:0.14.0-2.fc14 set to be installed
–> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
Package Arch Version Repository Size
===================================================================================================================
Installing:
qemu x86_64 2:0.14.0-2.fc14 /qemu-0.14.0-2.fc14.x86_64 0.0
qemu-common x86_64 2:0.14.0-2.fc14 /qemu-common-0.14.0-2.fc14.x86_64 775 k
qemu-debuginfo x86_64 2:0.14.0-2.fc14 /qemu-debuginfo-0.14.0-2.fc14.x86_64 322 M
qemu-img x86_64 2:0.14.0-2.fc14 /qemu-img-0.14.0-2.fc14.x86_64 701 k
qemu-kvm x86_64 2:0.14.0-2.fc14 /qemu-kvm-0.14.0-2.fc14.x86_64 0.0
qemu-kvm-tools x86_64 2:0.14.0-2.fc14 /qemu-kvm-tools-0.14.0-2.fc14.x86_64 12 k
qemu-system-x86 x86_64 2:0.14.0-2.fc14 /qemu-system-x86-0.14.0-2.fc14.x86_64 10 M
qemu-user x86_64 2:0.14.0-2.fc14 /qemu-user-0.14.0-2.fc14.x86_64 3.9 M
Installing for dependencies:
qemu-system-arm x86_64 2:0.14.0-2.fc14 fedora-virt-preview 1.0 M
qemu-system-cris x86_64 2:0.14.0-2.fc14 fedora-virt-preview 593 k
qemu-system-m68k x86_64 2:0.14.0-2.fc14 fedora-virt-preview 705 k
qemu-system-mips x86_64 2:0.14.0-2.fc14 fedora-virt-preview 3.4 M
qemu-system-ppc x86_64 2:0.14.0-2.fc14 fedora-virt-preview 2.9 M
qemu-system-sh4 x86_64 2:0.14.0-2.fc14 fedora-virt-preview 1.4 M
qemu-system-sparc x86_64 2:0.14.0-2.fc14 fedora-virt-preview 641 k

Transaction Summary
===================================================================================================================
Install 15 Package(s)

Total size: 348 M
Total download size: 11 M
Installed size: 375 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 11 M
(1/7): qemu-system-arm-0.14.0-2.fc14.x86_64.rpm | 1.0 MB 00:02
(2/7): qemu-system-cris-0.14.0-2.fc14.x86_64.rpm | 593 kB 00:01
(3/7): qemu-system-m68k-0.14.0-2.fc14.x86_64.rpm | 705 kB 00:01
(4/7): qemu-system-mips-0.14.0-2.fc14.x86_64.rpm | 3.4 MB 00:05
(5/7): qemu-system-ppc-0.14.0-2.fc14.x86_64.rpm | 2.9 MB 00:03
(6/7): qemu-system-sh4-0.14.0-2.fc14.x86_64.rpm | 1.4 MB 00:02
(7/7): qemu-system-sparc-0.14.0-2.fc14.x86_64.rpm | 641 kB 00:01
——————————————————————————————————————-
Total 534 kB/s | 11 MB 00:20
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 2:qemu-common-0.14.0-2.fc14.x86_64 1/15
Installing : 2:qemu-system-x86-0.14.0-2.fc14.x86_64 2/15
Installing : 2:qemu-system-ppc-0.14.0-2.fc14.x86_64 3/15
Installing : 2:qemu-system-mips-0.14.0-2.fc14.x86_64 4/15
Installing : 2:qemu-system-sparc-0.14.0-2.fc14.x86_64 5/15
Installing : 2:qemu-user-0.14.0-2.fc14.x86_64 6/15
Installing : 2:qemu-system-arm-0.14.0-2.fc14.x86_64 7/15
Installing : 2:qemu-system-sh4-0.14.0-2.fc14.x86_64 8/15
Installing : 2:qemu-system-m68k-0.14.0-2.fc14.x86_64 9/15
Installing : 2:qemu-system-cris-0.14.0-2.fc14.x86_64 10/15
Installing : 2:qemu-img-0.14.0-2.fc14.x86_64 11/15
Installing : 2:qemu-0.14.0-2.fc14.x86_64 12/15
Installing : 2:qemu-kvm-0.14.0-2.fc14.x86_64 13/15
Installing : 2:qemu-kvm-tools-0.14.0-2.fc14.x86_64 14/15
Installing : 2:qemu-debuginfo-0.14.0-2.fc14.x86_64 15/15

Installed:
qemu.x86_64 2:0.14.0-2.fc14 qemu-common.x86_64 2:0.14.0-2.fc14 qemu-debuginfo.x86_64 2:0.14.0-2.fc14
qemu-img.x86_64 2:0.14.0-2.fc14 qemu-kvm.x86_64 2:0.14.0-2.fc14 qemu-kvm-tools.x86_64 2:0.14.0-2.fc14
qemu-system-x86.x86_64 2:0.14.0-2.fc14 qemu-user.x86_64 2:0.14.0-2.fc14

Dependency Installed:
qemu-system-arm.x86_64 2:0.14.0-2.fc14 qemu-system-cris.x86_64 2:0.14.0-2.fc14
qemu-system-m68k.x86_64 2:0.14.0-2.fc14 qemu-system-mips.x86_64 2:0.14.0-2.fc14
qemu-system-ppc.x86_64 2:0.14.0-2.fc14 qemu-system-sh4.x86_64 2:0.14.0-2.fc14
qemu-system-sparc.x86_64 2:0.14.0-2.fc14

Complete!
[root@fedora14 x86_64]#

Install F14 KVM as usual as VFS14.
# virsh dumpxml VFS14 > VF14.xml
Update VF14.xml :
1. Set name to VFSP14
2.Remove uuid section
3.Replace emulator with /usr/local/bin/qemu-spice
4.Remove video section ( pci slot 0×02)
# virsh define VF14.xml
will create KVM VFSP14 to run in spice session

Runtime VFSP14 profile :-

<domain type='kvm' id='7'>
<name>VFSP14</name>
<uuid>96172c80-c4df-4bbb-469e-a9e999289915</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='pc-0.14'>hvm</type>
<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>
<devices>
<emulator>/usr/local/bin/qemu-spice</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/vg_kvms/vm01'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:f6:88:9a'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/1'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes'/>
<sound model='ac97'>
<alias name='sound0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>

Emulator

#cat /usr/local/bin/qemu-spice
#!/bin/bash
exec /usr/bin/qemu-kvm $* \
-vga qxl \
-spice port=5930,disable-ticketing
[root@fedora14 ~]#






File /var/log/libvirt/qemu/VFSP14.log
*****************
Before patching
*****************
2011-03-13 13:04:55.858: starting up
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/local/bin/qemu-spice -S -M pc-0.14 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name VFSP14 -uuid 96172c80-c4df-4bbb-469e-a9e999289915 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/VFSP14.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -boot c -drive file=/dev/vg_kvms/vm01,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0×5,drive=drive-virtio-disk0,id=virtio-disk0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=21,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:f6:88:9a,bus=pci.0,addr=0×3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0×4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0×6
char device redirected to /dev/pts/1
do_spice_init: starting 0.8.0
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
handle_dev_destroy_surfaces:
handle_dev_destroy_surfaces:
handle_dev_input: start
qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.14.0/qemu-kvm.c:1724: kvm_mutex_unlock: Assertion `!cpu_single_env’ failed.
2011-03-13 13:05:31.775: shutting down
*****************
After patching
*****************
2011-03-13 13:45:19.141: starting up
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/local/bin/qemu-spice -S -M pc-0.14 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name VFSP14 -uuid 96172c80-c4df-4bbb-469e-a9e999289915 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/VFSP14.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -boot c -drive file=/dev/vg_kvms/vm01,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0×5,drive=drive-virtio-disk0,id=virtio-disk0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=21,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:f6:88:9a,bus=pci.0,addr=0×3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0×4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0×6
char device redirected to /dev/pts/1
do_spice_init: starting 0.8.0
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
handle_dev_destroy_surfaces:
handle_dev_destroy_surfaces:
handle_dev_input: start
handle_dev_destroy_surfaces:
handle_dev_destroy_surfaces:
reds_handle_main_link:
reds_show_new_channel: channel 1:0, connected successfully, over Non Secure link
reds_main_handle_message: net test: latency 0.200000 ms, bitrate 4071570576 bps (3882.952286 Mbps)
reds_show_new_channel: channel 4:0, connected successfully, over Non Secure link
red_dispatcher_set_cursor_peer:
handle_dev_input: cursor connect
reds_show_new_channel: channel 2:0, connected successfully, over Non Secure link
red_dispatcher_set_peer:
handle_dev_input: connect
handle_new_display_channel: jpeg disabled
handle_new_display_channel: zlib-over-glz disabled
reds_show_new_channel: channel 3:0, connected successfully, over Non Secure link
inputs_link:
spice_server_add_interface: SPICE_INTERFACE_TABLET
handle_dev_input: mouse mode 2
handle_dev_input: oom current 0 pipe 0
handle_dev_input: oom current 0 pipe 0
handle_dev_input: oom current 0 pipe 0
handle_dev_input: oom current 0 pipe 0
handle_dev_input: oom current 0 pipe 0
handle_dev_input: oom current 0 pipe 0
spice_server_remove_interface: remove SPICE_INTERFACE_TABLET
handle_dev_input: mouse mode 1
2011-03-13 13:48:07.644: shutting down

Windows 7 KVM running in spice terminal



Virtio install Windows 7 KVM (x64/x86) on Fedora 14

January 25, 2011

Fedora 14 has version of Libvirt 0.8.7 and qemu-0.13.0-1 installed via Rawhide Preview Repo. However, straightforward attempt to virt-install Windows 7 on virtio boot device fails to detect device after viostor.sys gets preloaded. It’s a known bug [1]. Actually, thread at Red Hat Bugzilla – Bug 656353 contains required patch , but doesn’t contain any explanation how to rebuild and reinstall required package python-virtinst-0.500.4-1.fc14.noarch.rpm. Detailed workaround for this issue follows bellow as well as build of new package python-virtinst-0.500.5-1.fc14.noarch.rpm based on recent release virtinst 0.500.5 (Friday January 14, 2011)
Download and install python-virtinst-0.500.4-1.fc14.src.rpm. Apply patch bellow to /root/rpmbuild/SOURCES/virtinst-0.500.4/virtinst/Installer.py per Red Hat Bugzilla – Bug 656353 ( [1] ) and recreate /root/rpmbuild/SOURCES/virtinst-0.500.4.tar.gz. Then
# cd ../SPECS
# rpmbuild -bb ./python-virtinst.spec

--- aaa/virtinst/Installer.py	2010-08-24 00:05:33.000000000 +0400
+++ bbb/virtinst/Installer.py	2011-01-24 23:03:13.142553167 +0300
@@ -236,6 +236,20 @@
     # Private methods
     def _get_bootdev(self, isinstall, guest):
         raise NotImplementedError
+    def _build_boot_order(self, isinstall, guest):
+        bootorder = [self._get_bootdev(isinstall, guest)]
+
+        # If guest has an attached disk, always have 'hd' in the boot
+        # list, so disks are marked as bootable/installable (needed for
+        # windows virtio installs, and booting local disk from PXE)
+        for disk in guest.get_devices("disk"):
+            if disk.device == disk.DEVICE_DISK:
+                bootdev = self.bootconfig.BOOT_DEVICE_HARDDISK
+                if bootdev not in bootorder:
+                    bootorder.append(bootdev)
+                break
+
+        return bootorder
 
     def _get_osblob_helper(self, guest, isinstall, bootconfig):
         def get_param(obj, paramname):
@@ -287,6 +301,8 @@
         @type isinstall: C{bool}
         """
         bootdev = self._get_bootdev(isinstall, guest)
+        bootorder = self._build_boot_order(isinstall, guest)
+
         if isinstall:
             bootconfig = self._install_bootconfig
         else:
@@ -298,7 +314,7 @@
 
         bootconfig = copy.copy(bootconfig)
         if not bootconfig.bootorder:
-            bootconfig.bootorder = [bootdev]
+          bootconfig.bootorder = bootorder
 
         return self._get_osblob_helper(guest, isinstall, bootconfig)

Now reinstall python-virtinst-0.500.4-1.fc14.noarch.rpm
# cd ../RPMS/noarch
# yum reinstall python-virtinst-0.500.4-1.fc14.noarch.rpm
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Reinstall Process
Examining python-virtinst-0.500.4-1.fc14.noarch.rpm: python-virtinst-0.500.4-1.fc14.noarch
Resolving Dependencies
–> Running transaction check
—> Package python-virtinst.noarch 0:0.500.4-1.fc14 set to be reinstalled
–> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
Package Arch Version Repository Size
===================================================================================================================
Reinstalling:
python-virtinst noarch 0.500.4-1.fc14 /python-virtinst-0.500.4-1.fc14.noarch 1.7 M

Transaction Summary
===================================================================================================================
Reinstall 1 Package(s)

Total size: 1.7 M
Installed size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : python-virtinst-0.500.4-1.fc14.noarch 1/1

Installed:
python-virtinst.noarch 0:0.500.4-1.fc14

Complete!

Another option based on virtinst 0.500.5 released on Friday January 14, 2011 :-
# cd ../SOURCES
# wget http://virt-manager.org/download/sources/virtinst/virtinst-0.500.5.tar.gz
# cd ../SPECS
# Update in python-virtinst.spec
Version: 0.500.5
Save
# rpmbuild -ba ./python-virtinst.spec
# cd ../RPMS/noarch
# yum install python-virtinst-0.500.5-1.fc14.noarch.rpm

New version of python-virtinst-0.500.5-1.fc14.src.rpm should be available for download
via https://bugzilla.redhat.com/show_bug.cgi?id=656353
Now run virt-install :-

virt-install --connect qemu:///system --virt-type kvm \
--name W7VIRT64 --ram 4096 --disk path=/dev/vg_virtuals/vm01,bus=virtio \
--disk /usr/tmp/virtio-win-1.1.16.vfd,device=floppy \
--os-variant win7 \
--cdrom /usr/tmp/Win7_64.iso --vcpus 2










References
1.https://bugzilla.redhat.com/show_bug.cgi?id=656353


Virtio install Windows 7 KVM (x64/x86) on Ubuntu 10.04.1 Server via DNJL PPA

January 20, 2011

First of all setup DNJL PPA to upgrade KVM/QEMU up to Qemu 0.12.5 & Libvirt 0.8.3 on Ubuntu Lucid Server and download the most recent Fedora virtio-win drivers from http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin as floppy and ISO image. Notice , that same virt-install will run fine on KVM Server Ubuntu 10.10 due to required versions of Libvirt & Qemu appear to be installed by default.

root@ServerLNX:~# add-apt-repository ppa:dnjl/virtualization
Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /etc/apt/secring.gpg –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver keyserver.ubuntu.com –recv 5C1F788FDE6E8657FF5864FFD18C7A1DF6E6BED2
gpg: requesting key F6E6BED2 from hkp server keyserver.ubuntu.com
gpg: key F6E6BED2: public key “Launchpad ppa” imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)

Add to /etc/apt/sources.list

deb http://ppa.launchpad.net/dnjl/virtualization/ubuntu lucid main
deb-src http://ppa.launchpad.net/dnjl/virtualization/ubuntu lucid main

Save

# apt-get update
# apt-get upgrade

Check packages installed

root@ServerLNX:~# dpkg -l |grep qemu
ii kvm 1:84+dfsg-0ubuntu16+0.12.5+noroms+0ubuntu1.1~dnjl1~lucid0 dummy transitional pacakge from kvm to qemu-
ii qemu-common 0.12.5+noroms-0ubuntu1.1~dnjl1~lucid0 qemu common functionality (bios, documentati
ii qemu-kvm 0.12.3+noroms-0ubuntu9.2 Full virtualization on i386 and amd64 hardwa
root@ServerLNX:~# dpkg -l |grep libvirt
ii libvirt-bin 0.8.3-1ubuntu4+dnjl1~lucid0 the programs for the libvirt library
ii libvirt0 0.8.3-1ubuntu4+dnjl1~lucid0 library for interfacing with different virtu

Without step bellow i was unable to attach virtio-win-1.1.16.vfd as floppy before W7 (x64) KVM start up

root@ServerLNX:~# apt-get remove kvm qemu-kvm
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
kvm qemu-kvm ubuntu-virt-server
0 upgraded, 0 newly installed, 3 to remove and 3 not upgraded.
After this operation, 8,483kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database … 160403 files and directories currently installed.)
Removing kvm …
Removing ubuntu-virt-server …
Removing qemu-kvm …
qemu-kvm stop/waiting
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
Processing triggers for man-db …
root@ServerLNX:~# apt-get install kvm qemu-kvm
Reading package lists… Done
Building dependency tree
Reading state information… Done
=> The following extra packages will be installed:
=> libvdeplug2
The following NEW packages will be installed:
kvm libvdeplug2 qemu-kvm
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 2,969kB/2,985kB of archives.
After this operation, 8,536kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/universe libvdeplug2 2.2.3-3 [13.0kB]
Get:2 http://ppa.launchpad.net/dnjl/virtualization/ubuntu/ lucid/main qemu-kvm 0.12.5+noroms-0ubuntu1.1~dnjl1~lucid0 [2,956kB]
Fetched 2,969kB in 10s (277kB/s)
Selecting previously deselected package libvdeplug2.
(Reading database … 160361 files and directories currently installed.)
Unpacking libvdeplug2 (from …/libvdeplug2_2.2.3-3_amd64.deb) …
Selecting previously deselected package qemu-kvm.
Unpacking qemu-kvm (from …/qemu-kvm_0.12.5+noroms-0ubuntu1.1~dnjl1~lucid0_amd64.deb) …
Selecting previously deselected package kvm.
Unpacking kvm (from …/kvm_1%3a84+dfsg-0ubuntu16+0.12.5+noroms+0ubuntu1.1~dnjl1~lucid0_amd64.deb) …
Processing triggers for ureadahead …
Processing triggers for man-db …
Setting up libvdeplug2 (2.2.3-3) …

Setting up qemu-kvm (0.12.5+noroms-0ubuntu1.1~dnjl1~lucid0) …
qemu-kvm start/running

Proceed with install W7 KVM on virtio bootup device

virt-install --name W7VIRT64 --ram 4096 --disk /dev/sda8,bus=virtio \
--disk /usr/tmp/virtio-win-1.1.16.vfd,device=floppy --os-variant win7 \
--cdrom /usr/tmp/Win7_64.iso --cpu 2












Set up virtio network driver





Virtio install Windows 7 KVM (x64/x86) on Scientific Linux 6 (alpha 4)

January 11, 2011

Download and install virtio-win-1.1.16-0.el6.noarch.rpm via http://rghost.net/3412907
Before starting install KVM make some changes to “Details”
1. Attach virtio-win-1.1.16.vfd as floppy.
2. Change type of boot up device to “Virtio”







Load virtio.sys driver from floppy to detect boot up device :-





Complete install as usual :-





Shutdown KVM , change type of bridge “br0″ to “virtio” and attach CDROM virtio-win-1.1.16.iso to KVM. Then load KVM with broken Network , load “Device manager” and “Update driver for Ethernet Adapter” via attached RH CDROM





Set up RH VirtIO SCSI&Network drivers on Windows 7, Windows XP KVMs at KVM-QEMU Instance on F14

January 8, 2011

Create Windows KVM via virt-manager as usual. Download Latest VirtIO Win drivers from Fedora. Location is http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/. Notice also , that the last virtio-win-1.1.16-0.el6.noarch.rpm ( Last Redhat virtio signed windows driver ) been installed on Scientific Linux 6, allows to perform install Windows 7 KVM directly on “virtio” boot up device via loading drivers from virtio-win-1.1.16.vfd been attached as floppy to KVM before installation starts up. Virtio-win-1.1.16-0.el6.noarch.rpm may be downloaded in meantime at http://rghost.net/3412907. View for details
Virtio install Windows 7 KVM (x64/x86) on Scientific Linux 6 (alpha 4)
Download files virtio-win-1.1.11-0.vfd and ISO image virtio-win-1.1.11-0.iso to Fedora’s FS. Create fake qcow2 file :-

# cd /vms
# qemu-img create -f qcow2 fake.qcow2 1G

Procedure bellow is specific for 32-bit version of W7, 64-bit version requires KVM shut down (via my experience) to add fake.qcow2 disk and virtio-win-1.1.16.iso as CDROM. Then load KVM and Update broken SCSI driver ( “Device Manager”) via attached CD.
Start Windows KVM and switch to “Details”
1. Attach virtio-win-1.1.11-0.iso as CDROM to KVM
2. Add fake.qcow2 as “virtio” disk





Now switch to “Console” . “Add New Hardware” Wizard should be already up and running. Install required driver from attached
CDROM.







Shutdown Windows KVM . Remove fake qcow2 disk and change type Windows boot up disk to “Virtio”



Start up Windows KVM and make sure driver has been properly installed



Same procedure works for 32-bit version Windows 7 KVM









Shutdown Windows 7 KVM . Remove fake disk and switch type of boot up device to “Virtio”



Boot up Windows 7 KVM again and make sure RH VirtIO SCSI Driver has been properly installed



To install RH Virtio Ehernet Adapter via same CDROM :
1. Change bridge type “br0″ to “Virtio”
2. Start KVM with broken network
3. Go to “Control Panel=>Devices Management
4. Update Network driver via Fedora’s CDROM attached







Final Windows 7 KVM XML profile :-

<domain type='kvm'>
<name>W7Virtio</name>
<uuid>b45da320-34d7-55c6-dd3a-c66214d1f1b8</uuid>
<memory>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='rhel6.0.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/root/Downloads/virtio-win-1.1.11-0.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sdb10'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:d9:c9:5f'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<sound model='ac97'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='vga' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>


2010 in review

January 2, 2011

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Wow.

Crunchy numbers

Featured image

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 180,000 times in 2010. If it were an exhibit at The Louvre Museum, it would take 8 days for that many people to see it.

In 2010, there were 44 new posts, growing the total archive of this blog to 111 posts. There were 176 pictures uploaded, taking up a total of 86mb. That’s about 3 pictures per week.

The busiest day of the year was September 9th with 1,135 views. The most popular post that day was GNOME 3 at Xen 4.0.1 (2.6.32.21 pvops) on top of F14 (rawhide).

Where did they come from?

The top referring sites in 2010 were wiki.xensource.com, linuxtoday.com, wiki.xen.org, librenix.com, and lxer.com.

Some visitors came searching, mostly for xen grub2, grub2 xen, suse 11.3, ubuntu 10.04 xen, and ubuntu server.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

GNOME 3 at Xen 4.0.1 (2.6.32.21 pvops) on top of F14 (rawhide) September 2010

2

Set up Ubuntu 10.04 Server PV DomU at Xen 4.0 Dom0 (pvops 2.6.32.12 kernel) Dom0 on top of Ubuntu 10.04 Server April 2010
60 comments

3

Set up Libvirt 0.8.1 & Xen 4.0.1 Dom0 (2.6.32.15 pvops) on top of Ubuntu 10.04 Server via Daniel Baumann Virtualization PPA June 2010
2 comments

4

Loading Xen via GRUB2 on top Ubuntu Karmic Server (alpha 4) August 2009
27 comments

5

Virt-install&Virt-manager at Xen 4.0 (2.6.32.12 pvops) Dom0 on top Ubuntu Karmic Koala Server March 2010
10 comments


Install Oracle 11gR2 on SL6 KVM at KVM-QEMU Instance on SL 6 (alpha 3)

December 31, 2010

Setup KVM-QEMU instance per [1] on SL 6 alpha 3 and install SL6 KVM with ISO image SL-6-x86_64-2010-12-17-boot.iso to run installation via http://ftp.scientificlinux.org/linux/scientific/6rolling/x86_64/os/ source



Follow [2] with minor changes for “yum install script” in previously installed SL 6 KVM via Net Repos. Virtio drivers should be enabled during install. First update for /etc/sysctl.conf

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586

# /sbin/syctl -p

Add the following lines to the “/etc/security/limits.conf” file.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
Add the following line to the “/etc/pam.d/login” file.
session required pam_limits.so
***************************************
Run Script 1 to install packages
***************************************

yum install binutils \
compat-libstdc++-33 \
compat-libstdc++-33.i686 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc.i686 \
glibc-common \
glibc-devel \
glibc-devel.i686 \
glibc-headers \
ksh \
libaio \
libaio.i686 \
libaio-devel \
libaio-devel.i686 \
libgcc \
libgcc.i686 \
libstdc++ \
libstdc++.i686 \
libstdc++-devel \
make \
numactl-devel \
sysstat \
unixODBC \
unixODBC.i686 \
unixODBC-devel \
unixODBC-devel.i6

********************************************************************************************
Run Script 2 to create oracle account, groups and directories for installation
********************************************************************************************

groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin
useradd -g oinstall -G dba,oper,asmadmin oracle
passwd oracle
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Disable SELINUX and reboot VM.
********************************************
Create oracle’s .bash_profile per [2]
********************************************

TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ServerASL6; export ORACLE_HOSTNAME
ORACLE_UNQNAME=data1231; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=data1231; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

As oracle

unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip

cd database
$ ./runInstaller









References
1.http://bderzhavets.wordpress.com/2010/12/23/set-up-kvm-on-scientific-linux-6-server-alpha-3/
2.http://www.oracle-base.com/articles/11g/OracleDB11gR2InstallationOnFedora14.php


KVM & Virtio (disk/nic) on Scientific Linux 6 (alpha 3)

December 29, 2010

KVM as a “full virtualization” is a nice feature because it allows you to run any operating system virtualized. However, it’s relatively slow because the hypervisor has to emulate actual physical devices such as RTL8139 network cards and the most recent SeaBios emulates IDE interface.This fragment from KVM guest dmesg log is fair enough :-

[ 0.129740] ata_piix 0000:00:01.1: version 2.13
[ 0.129802] ata_piix 0000:00:01.1: setting latency timer to 64
[ 0.129954] scsi0 : ata_piix
[ 0.130522] scsi1 : ata_piix
[ 0.130552] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc000 irq 14
[ 0.130554] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc008 irq 15

Virtio is a Linux standard for network and disk device drivers where just the guest’s device driver “knows” it is running in a virtual environment, and cooperates with the hypervisor. This enables guests to get high performance network and disk operations, and gives most of the performance benefits of paravirtualization.
If you want to install a machine with virtio drivers you should add these lines to your virt-install command:

--os-type=linux \
--os-variant=virtio26 \

Using this command you enable the virtio drivers at install time on SL 6 (alpha 3)

# virt-install –connect qemu:///system -n UDSK10.10 -r 2048 –vcpus=2 \
> –os-type=linux –os-variant=virtio26 \
> -f /dev/vg_kvms/vm02 -c \
> /usr/tmp/u1010desk.iso –vnc \
> –accelerate –network=bridge:br0 –hvm –debug
Wed, 29 Dec 2010 18:53:06 DEBUG Launched with command line:
/usr/sbin/virt-install –connect qemu:///system -n UDSK10.10 -r 2048 –vcpus=2 –os-type=linux –os-variant=virtio26 -f /dev/vg_kvms/vm02 -c /usr/tmp/u1010desk.iso –vnc –accelerate –network=bridge:br0 –hvm –debug
Wed, 29 Dec 2010 18:53:06 DEBUG Requesting libvirt URI qemu:///system
Wed, 29 Dec 2010 18:53:06 DEBUG Received libvirt URI qemu:///system
Wed, 29 Dec 2010 18:53:06 DEBUG Requesting virt method ‘hvm’, hv type ‘default’.
Wed, 29 Dec 2010 18:53:06 DEBUG Received virt method ‘hvm’
Wed, 29 Dec 2010 18:53:06 DEBUG Hypervisor name is ‘kvm’
Wed, 29 Dec 2010 18:53:06 DEBUG DistroInstaller location is a local file/path: /usr/tmp/u1010desk.iso

Starting install…
Wed, 29 Dec 2010 18:53:07 DEBUG Generated install XML:
<domain type=’kvm’>
<name>UDSK10.10</name>
<currentMemory>2097152</currentMemory>
<memory>2097152</memory>
<uuid>017cec13-8c2f-56cf-6762-4575c26d988f</uuid>
<os>
<type arch=’x86_64′>hvm</type>
<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>2</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type=’block’ device=’disk’>
<driver name=’qemu’ cache=’none’/>
<source dev=’/dev/vg_kvms/vm02′/>
<target dev=’vda’ bus=’virtio’/>
</disk>
<disk type=’file’ device=’cdrom’>
<driver name=’qemu’/>
<source file=’/usr/tmp/u1010desk.iso’/>
<target dev=’hdc’ bus=’ide’/>
<readonly/>
</disk>
<interface type=’bridge’>
<source bridge=’br0′/>
<mac address=’52:54:00:37:b9:0b’/>
<model type=’virtio’/>
</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
Wed, 29 Dec 2010 18:53:07 DEBUG Started guest, looking to see if it is running
Wed, 29 Dec 2010 18:53:07 DEBUG Launching console callback
Wed, 29 Dec 2010 18:53:07 DEBUG Generated boot XML:
<domain type=’kvm’>
<name>UDSK10.10</name>
<currentMemory>2097152</currentMemory>
<memory>2097152</memory>
<uuid>017cec13-8c2f-56cf-6762-4575c26d988f</uuid>
<os>
<type arch=’x86_64′>hvm</type>
<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>2</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type=’block’ device=’disk’>
<driver name=’qemu’ cache=’none’/>
<source dev=’/dev/vg_kvms/vm02′/>
<target dev=’vda’ bus=’virtio’/>
</disk>
<disk type=’block’ device=’cdrom’>
<target dev=’hdc’ bus=’ide’/>
<readonly/>
</disk>
<interface type=’bridge’>
<source bridge=’br0′/>
<mac address=’52:54:00:37:b9:0b’/>
<model type=’virtio’/>
</interface>
<input type=’mouse’ bus=’ps2′/>
<graphics type=’vnc’ port=’-1′ keymap=’en-us’/>
<console type=’pty’/>
<video>
<model type=’cirrus’/>
</video>
</devices>
</domain>
Guest installation complete… restarting guest.
Wed, 29 Dec 2010 19:00:27 DEBUG Launching console callback





Runtime profile of KVM Ubuntu 10.10 Desktop looks as follows :-
# virsh dumpxml UDSK10.10 > UDSK10.10.xml
# cat UDSK10.10.xml
<domain type=’kvm’>
<name>UDSK10.10</name>
<uuid>017cec13-8c2f-56cf-6762-4575c26d988f</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch=’x86_64′ machine=’rhel6.0.0′>hvm</type>
<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>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type=’block’ device=’disk’>
<driver name=’qemu’ type=’raw’ cache=’none’/>
<source dev=’/dev/vg_kvms/vm02′/>
<target dev=’vda’ bus=’virtio’/>
<address type=’pci’ domain=’0×0000′ bus=’0×00′ slot=’0×04′ function=’0×0′/>
</disk>
<disk type=’block’ device=’cdrom’>
<driver name=’qemu’ type=’raw’/>
<target dev=’hdc’ bus=’ide’/>
<readonly/>
<address type=’drive’ controller=’0′ bus=’1′ unit=’0′/>
</disk>
<controller type=’ide’ index=’0′>
<address type=’pci’ domain=’0×0000′ bus=’0×00′ slot=’0×01′ function=’0×1′/>
</controller>
<interface type=’bridge’>
<mac address=’52:54:00:37:b9:0b’/>
<source bridge=’br0′/>
<target dev=’vnet0′/>
<model type=’virtio’/>
<address type=’pci’ domain=’0×0000′ bus=’0×00′ slot=’0×03′ function=’0×0′/>
</interface>
<serial type=’pty’>
<target port=’0′/>
</serial>
<console type=’pty’>
<target port=’0′/>
</console>
<input type=’mouse’ bus=’ps2′/>
<graphics type=’vnc’ port=’-1′ autoport=’yes’ keymap=’en-us’/>
<video>
<model type=’cirrus’ vram=’9216′ heads=’1′/>
<address type=’pci’ domain=’0×0000′ bus=’0×00′ slot=’0×02′ function=’0×0′/>
</video>
<memballoon model=’virtio’>
<address type=’pci’ domain=’0×0000′ bus=’0×00′ slot=’0×05′ function=’0×0′/>
</memballoon>
</devices>
</domain>

Activating virtio driver via virt-manager







Set up KVM on Scientific Linux 6 Server (alpha 3)

December 23, 2010

Include virtualization group during initial install. Attempt to start virt-manager pops up an error message

Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 413, in
main()
File "/usr/share/virt-manager/virt-manager.py", line 344, in main
appname + "-icon.svg")
GError: Couldn't recognize the image file format for file '/usr/share/virt-manager/pixmaps/virt-manager-icon.svg'

To be able to start virt-manager run as root to re-create the ‘gdk-pixbuf.loaders’ file :-

/usr/bin/gdk-pixbuf-query-loaders-64 > /etc/gtk-2.0/x86_64-redhat-linux-gnu/gdk-pixbuf.loaders

or just comment out lines 343,344 in /usr/share/virt-manager/virt-manager.py to allow virt-manager to start . Set up bridged networking as follows :-
To create network initscripts in the /etc/sysconfig/network-scripts directory it is necessary to create 2 config files. The first one (ifcfg-eth0) defines your physical network interface, and says that it will be part of a bridge:

# cat ifcfg-eth0
DEVICE=eth0
HWADDR=00:16:76:D6:C9:45
ONBOOT=yes
BRIDGE=br0
NM_CONTROLLED=no

Obviously change the HWADDR to match your actual NIC’s address.
The second config file (ifcfg-br0) defines the bridge device:

# cat ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
DELAY=0
NM_CONTROLLED=no

# chkconfig NetworkManager off
# chkconfig network on
# service network start

Install domains via commands like

*****************************************************************************************************
[root@ServerASL6 ~]# virt-install --connect qemu:///system -n VMF14 -r 1024 --vcpus=2 -f /vm/vm14.qcow2 -s 12 -c /mnt/usr/tmp/f14.iso --vnc --accelerate --network=bridge:br0 --hvm
Starting install...
Creating storage file vm14.qcow2 | 12 GB 00:00
Creating domain... | 0 B 00:00
Guest installation complete... restarting guest.
*****************************************************************************************************
[root@ServerASL6 vm]# virt-install --connect qemu:///system -n UDESK1010 -r 1024 --vcpus=2 \
> -f /vm/u1010.qcow2 -s 12 -c \
> /vm/u1010desk.iso --vnc \
> --accelerate --network=bridge:br0 --hvm
Starting install...
Creating storage file u1010.qcow2 | 12 GB 00:00
Creating domain... | 0 B 00:00
Guest installation complete... restarting guest.
*****************************************************************************************************
[root@ServerASL6 root]# virt-install --connect qemu:///system -n VM14F -r 1024 --vcpus=2 \
> -f /dev/vg_kvms/vm03 -c /mnt1/usr/tmp/f14.iso --vnc \
> --accelerate --network=bridge:br0 --hvm
Starting install...
Creating domain... | 0 B 00:00
Guest installation complete... restarting guest.
*******************************************************************************************************












Restart domain via virt-mamager



Virt-install Ubuntu 10.10 desktop











References
1. http://forums.fedoraforum.org/showthread.php?t=179996


Rebuild kernel-2.6.32.26-174.xendom0.fc12.src.rpm on RHEL Server 6

November 29, 2010

This post follows up “Howto” http://wiki.xen.org/xenwiki/RHEL6Xen4Tutorial ( [1] ).
Install kernel-2.6.32.26-174.xendom0.fc12.src.rpm on RHEL 6 Server.

# wget http://fedorapeople.org/~myoung/dom0/src/kernel-2.6.32.26-174.xendom0.fc12.src.rpm
# rpm -iv kernel-2.6.32.26-174.xendom0.fc12.src.rpm

*********************************************************************************************
UPDATE @ 12/01/10
Straight forward build with option “– with firmware” :
# rpmbuild -bb –with firmware kernel.spec
allows to get all rpms been built and installed, including kernel-firmware.rpm
*********************************************************************************************
Actually , we have two options to perform this rebuild on RHEL 6 Server.
************
Option 1
************
Apply manually following patch to kernel.spec. It changes just one line in code. Remove the one with (-) and add the one with (+).

--- kernel.spec.orig 2010-11-23 16:36:51.000000000 +0300
+++ kernel.spec 2010-11-29 21:50:28.609899657 +0300
@@ -466,7 +466,7 @@
# Packages that need to be installed before the kernel is, because the %post
# scripts use them.
#
-%define kernel_prereq fileutils, module-init-tools, initscripts >= 8.11.1-1, kernel-firmware >= %{rpmversion}-%{pkg_release}, grubby >= 7.0.4-1
+%define kernel_prereq fileutils, module-init-tools, initscripts >= 8.11.1-1,grubby >= 7.0.4-1
%if %{with_dracut}
%define initrd_prereq dracut >= 002 xorg-x11-drv-ati-firmware
%else

Install EPEL Repos to succeed with build

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

After compile and install, disable the epel repo change /etc/yum.repos.d/epel.repo to ‘enabled=0′ and then run ‘yum clean all && yum update’
Now run :-

# rpmbuild -bb ./kernel.spec
# cd ../RPMS/x86_64

and install generated RPMS :-
[root@ServerTest x86_64]# ./inst.sh
Loaded plugins: refresh-packagekit, rhnplugin
Setting up Install Process
Examining kernel-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-2.6.32.26-174.xendom0.el6.x86_64.rpm as an update to kernel-2.6.32-71.el6.x86_64
Examining kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64.rpm to be installed
Examining kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64.rpm to be installed
Examining kernel-devel-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-devel-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-devel-2.6.32.26-174.xendom0.el6.x86_64.rpm as an update to kernel-devel-2.6.32-71.el6.x86_64
Examining kernel-headers-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-headers-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-headers-2.6.32.26-174.xendom0.el6.x86_64.rpm as an update to kernel-headers-2.6.32-71.el6.x86_64
Resolving Dependencies
–> Running transaction check
—> Package kernel.x86_64 0:2.6.32.26-174.xendom0.el6 set to be installed
—> Package kernel-debuginfo.x86_64 0:2.6.32.26-174.xendom0.el6 set to be updated
—> Package kernel-debuginfo-common-x86_64.x86_64 0:2.6.32.26-174.xendom0.el6 set to be updated
—> Package kernel-devel.x86_64 0:2.6.32.26-174.xendom0.el6 set to be installed
—> Package kernel-headers.x86_64 0:2.6.32.26-174.xendom0.el6 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
Package Arch Version Repository Size
===================================================================================================================
Installing:
kernel x86_64 2.6.32.26-174.xendom0.el6 /kernel-2.6.32.26-174.xendom0.el6.x86_64 91 M
kernel-debuginfo x86_64 2.6.32.26-174.xendom0.el6 /kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64 1.1 G
kernel-debuginfo-common-x86_64 x86_64 2.6.32.26-174.xendom0.el6 /kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64 151 M
kernel-devel x86_64 2.6.32.26-174.xendom0.el6 /kernel-devel-2.6.32.26-174.xendom0.el6.x86_64 22 M
Updating:
kernel-headers x86_64 2.6.32.26-174.xendom0.el6 /kernel-headers-2.6.32.26-174.xendom0.el6.x86_64 2.3 M

Transaction Summary
===================================================================================================================
Install 4 Package(s)
Upgrade 1 Package(s)

Total size: 1.4 G
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-2.6.32.26-174.xendom0.el6.x86_64 1/6

grubby fatal error: unable to find a suitable template => May be ignored

Installing : kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64 2/6
Installing : kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64 3/6
Updating : kernel-headers-2.6.32.26-174.xendom0.el6.x86_64 4/6
Installing : kernel-devel-2.6.32.26-174.xendom0.el6.x86_64 5/6
Cleanup : kernel-headers-2.6.32-71.el6.x86_64 6/6

Installed: kernel.x86_64
0:2.6.32.26-174.xendom0.el6
kernel-debuginfo.x86_64 0:2.6.32.26-174.xendom0.el6
kernel-debuginfo-common-x86_64.x86_64 0:2.6.32.26-174.xendom0.el6
kernel-devel.x86_64 0:2.6.32.26-174.xendom0.el6

Updated:
kernel-headers.x86_64 0:2.6.32.26-174.xendom0.el6

Complete!

Reboot with new kernel

title Xen 4.0.1 with Red Hat Enterprise Linux (vmlinuz-2.6.32.26-174.xendom0.el6.x86_64)
root (hd1,7)
kernel /xen.gz dom0_mem=1024M loglvl=all guest_loglvl=all
module /vmlinuz-2.6.32.26-174.xendom0.el6.x86_64 ro root=/dev/mapper/vg_servertest-lv_root rd_LVM_LV=vg_servertest/lv_root
module /initramfs-2.6.32.26-174.xendom0.el6.x86_64.img

[root@ServerTest ~]# xm info
host : ServerTest
release : 2.6.32.26-174.xendom0.el6.x86_64
version : #1 SMP Mon Nov 29 20:12:24 MSK 2010
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 : 7070
node_to_cpu : node0:0-3
node_to_memory : node0:7070
node_to_dma32_mem : node0:3259
max_node_id : 0
xen_major : 4
xen_minor : 0
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 : dom0_mem=1024M loglvl=all guest_loglvl=all
cc_compiler : gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)
cc_compile_by : root
cc_compile_domain : (none)
cc_compile_date : Mon Nov 29 10:24:07 MSK 2010
xend_config_format : 4





********************************************************
Option 2. Installation with no hackery at all.
********************************************************

# rpmbuild -bb --with firmware kernel.spec

# cd ../RPMS/x86_64
yum install \
kernel-2.6.32.26-174.xendom0.el6.x86_64.rpm \
kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64.rpm \
kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64.rpm \
kernel-devel-2.6.32.26-174.xendom0.el6.x86_64.rpm \
kernel-firmware-2.6.32.26-174.xendom0.el6.x86_64.rpm \
kernel-headers-2.6.32.26-174.xendom0.el6.x86_64.rpm

. . . . . .
Setting up Install Process
Examining kernel-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-2.6.32.26-174.xendom0.el6.x86_64.rpm as an update to kernel-2.6.32-71.el6.x86_64
Marking kernel-2.6.32.26-174.xendom0.el6.x86_64.rpm as an update to kernel-2.6.32-71.7.1.el6.x86_64
Examining kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64.rpm to be installed
Examining kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64.rpm to be installed
Examining kernel-devel-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-devel-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-devel-2.6.32.26-174.xendom0.el6.x86_64.rpm as an update to kernel-devel-2.6.32-71.el6.x86_64
Marking kernel-devel-2.6.32.26-174.xendom0.el6.x86_64.rpm as an update to kernel-devel-2.6.32-71.7.1.el6.x86_64
Examining kernel-firmware-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-firmware-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-firmware-2.6.32.26-174.xendom0.el6.x86_64.rpm to be installed
Examining kernel-headers-2.6.32.26-174.xendom0.el6.x86_64.rpm: kernel-headers-2.6.32.26-174.xendom0.el6.x86_64
Marking kernel-headers-2.6.32.26-174.xendom0.el6.x86_64.rpm as an update to kernel-headers-2.6.32-71.7.1.el6.x86_64
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32.26-174.xendom0.el6 set to be installed
---> Package kernel-debuginfo.x86_64 0:2.6.32.26-174.xendom0.el6 set to be updated
---> Package kernel-debuginfo-common-x86_64.x86_64 0:2.6.32.26-174.xendom0.el6 set to be updated
---> Package kernel-devel.x86_64 0:2.6.32.26-174.xendom0.el6 set to be installed
---> Package kernel-firmware.x86_64 0:2.6.32.26-174.xendom0.el6 set to be updated
---> Package kernel-headers.x86_64 0:2.6.32.26-174.xendom0.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================
Package Arch Version Repository Size
=================================================================================================================
Installing:
kernel x86_64 2.6.32.26-174.xendom0.el6 /kernel-2.6.32.26-174.xendom0.el6.x86_64 91 M
kernel-debuginfo x86_64 2.6.32.26-174.xendom0.el6 /kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64 1.1 G
kernel-debuginfo-common-x86_64
x86_64 2.6.32.26-174.xendom0.el6 /kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64
151 M
kernel-devel x86_64 2.6.32.26-174.xendom0.el6 /kernel-devel-2.6.32.26-174.xendom0.el6.x86_64 22 M
kernel-firmware x86_64 2.6.32.26-174.xendom0.el6 /kernel-firmware-2.6.32.26-174.xendom0.el6.x86_64 2.2 M
Updating:
kernel-headers x86_64 2.6.32.26-174.xendom0.el6 /kernel-headers-2.6.32.26-174.xendom0.el6.x86_64 2.3 M

Transaction Summary
=================================================================================================================
Install 5 Package(s)
Upgrade 1 Package(s)

Total size: 1.4 G
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-debuginfo-common-x86_64-2.6.32.26-174.xendom0.el6.x86_64 1/7
Installing : kernel-firmware-2.6.32.26-174.xendom0.el6.x86_64 2/7
Installing : kernel-debuginfo-2.6.32.26-174.xendom0.el6.x86_64 3/7
Updating : kernel-headers-2.6.32.26-174.xendom0.el6.x86_64 4/7
Installing : kernel-devel-2.6.32.26-174.xendom0.el6.x86_64 5/7
Installing : kernel-2.6.32.26-174.xendom0.el6.x86_64 6/7
Cleanup : kernel-headers-2.6.32-71.7.1.el6.x86_64 7/7

Installed:
kernel.x86_64 0:2.6.32.26-174.xendom0.el6
kernel-debuginfo.x86_64 0:2.6.32.26-174.xendom0.el6
kernel-debuginfo-common-x86_64.x86_64 0:2.6.32.26-174.xendom0.el6
kernel-devel.x86_64 0:2.6.32.26-174.xendom0.el6
kernel-firmware.x86_64 0:2.6.32.26-174.xendom0.el6
Updated:
kernel-headers.x86_64 0:2.6.32.26-174.xendom0.el6
Complete!






References
1. http://wiki.xen.org/xenwiki/RHEL6Xen4Tutorial


Set up Solaris 11 Express PV Guest at Xen 4.0.1 (2.6.32.26 pvops) Dom0 on top of F14

November 26, 2010

Following bellow is brief instruction of Solaris 11 Express PV Guest install via virsh and XML profiling at Xen 4.0.1 Dom0 on top of Fedora 14. Pvops kernel 2.6.32.26 has been built via Jeremy Fitzhardinge Git Repos. It also may be installed per Michael Young . View http://repos.fedorapeople.org/repos/myoung/dom0-kernel/fedora-12/SRPMS/
Kernel rpms may be built via kernel-2.6.32.26-174.xendom0.fc12.src.rpm rebuild on F14.
First copy off the disk to Dom0 required files.

mount -o loop,ro sol-11-exp-201011-live-x86.iso /mnt
cd /mnt
cp ./platform/i86pc/amd64/boot_archive /home/boris/solaris11
cp ./platform/i86xpv/kernel/amd64/unix /home/boris/solaris11

Solaris 11 installation profile

[root@fedora14sdb solaris11]# cat installSolaris.xml
<domain type='xen' >
<name>Solaris11</name>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>2</vcpu>
<bootloader></bootloader>
<os>
<type>linux</type>
<kernel>/home/boris/solaris11/unix</kernel>
<initrd>/home/boris/solaris11/boot_archive</initrd>
<cmdline>/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text</cmdline>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/Downloads/sol-11-exp-201011-live-x86.iso'/>
<target dev='xvdc' bus='xen'/>
<readonly/>
</disk>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/sdb6'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:6b:b2:b6'/>
<source bridge='eth0'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<target dev='vif8.0'/>
</interface>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target type='xen' port='0'/>
</console>
</devices>
</domain>

# virsh create installSolaris.xml
# virsh console Solaris11

[root@fedora14 solaris11]# virsh create installSolaris.xml
Domain Solaris11 created from installSolaris.xml

[root@fedora14 solaris11]# virsh console Solaris11
Connected to domain Solaris11
Escape character is ^]
v4.0.1 chgset 'unavailable'
SunOS Release 5.11 Version snv_151a 64-bit
Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved.
Hostname: solaris
Remounting root read/write
Probing for device nodes ...
Preparing live image for use
Done mounting Live image
USB keyboard
1. Albanian 25. Latin-American
2. Arabic 26. Lithuanian
3. Belarusian 27. Latvian
4. Belgian 28. Macedonian
5. Brazilian 29. Malta_UK
6. Bulgarian 30. Malta_US
7. Canadian-Bilingual 31. Norwegian
8. Croatian 32. Polish
9. Czech 33. Portuguese
10. Danish 34. Romanian
11. Dutch 35. Russian
12. Dvorak 36. Serbia-And-Montenegro
13. Estonian 37. Slovak
14. Finnish 38. Slovenian
15. French 39. Spanish
16. French-Canadian 40. Swedish
17. Hungarian 41. Swiss-French
18. German 42. Swiss-German
19. Greek 43. Traditional-Chinese
20. Icelandic 44. TurkishF
21. Italian 45. TurkishQ
22. Japanese-type6 46. UK-English
23. Japanese 47. US-English
24. Korean
To select the keyboard layout, enter a number [default 47]:
1. Arabic 12. Hungarian
2. Catalan 13. Indonesian
3. Chinese - Simplified 14. Italian
4. Chinese - Traditional 15. Japanese
5. Czech 16. Korean
6. Dutch 17. Polish
7. English 18. Portuguese - Brazil
8. French 19. Russian
9. German 20. Slovak
10. Greek 21. Spanish
11. Hebrew 22. Swedish
To select the language you wish to use, enter a number [default is 7]:
User selected: English
Configuring devices.
solaris console login: jack
Password:
Oracle Corporation SunOS 5.11 snv_151a November 2010
jack@solaris:~$ cp .Xclients .vnc/xstartup
jack@solaris:~$ vncserver

Open another terminal session and connect via vncviewer to DomU to proceed with install :-



Runtime XML profile

<domain type='xen'>
<name>Solaris11</name>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader></bootloader>
<os>
<type>linux</type>
<kernel>/home/boris/solaris11/unix</kernel>
<initrd>/home/boris/solaris11/boot_archive</initrd>
<cmdline>/platform/i86xpv/kernel/amd64/unix -B zfs-bootfs=rpool/ROOT/solaris,bootpath=/xpvd/xdf@51712:a</cmdline>
</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/sdb6'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:16:da:3d'/>
<source bridge='eth0'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<target dev='vif15.0'/>
</interface>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target type='xen' port='0'/>
</console>
</devices>
</domain>

[root@fedora14sdb solaris11]# virsh define Solaris11.xml
Domain Solaris11 defined from Solaris11.xml

[root@fedora14sdb solaris11]# virsh start Solaris11
Domain Solaris11 started

[root@fedora14sdb solaris11]# virsh console Solaris11
Connected to domain Solaris11
Escape character is ^]
v4.0.1 chgset ‘unavailable’
SunOS Release 5.11 Version snv_151a 64-bit
Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved.
Hostname: solaris
solaris console login:

Serial console has been activated for virt-manager entry Solaris11 :-





VNC Setup

cat /etc/gdm/custom.conf
# GDM Custom Configuration file.
# overrides: /usr/share/gdm/defaults.conf
[daemon]
RemoteGreeter=/usr/lib/gdm-simple-greeter
[security]
DisallowTCP=false
# AllowRoot=true
# AllowRemoteRoot=true
[xdmcp]
Enable=true
[gui]
[greeter]
[chooser]
[debug]
[servers]

Services restart:-
svcadm disable xvnc-inetd gdm
svcadm enable xvnc-inetd gdm

[root@fedora14sdb solaris11]# cat ./vnc-gnome.sh
domid=`virsh domid Solaris11`
ip=`/usr/bin/xenstore-read /local/domain/$domid/guest/ipv4/0/address`
echo $ip
vncviewer $ip:0
[root@fedora14sdb solaris11]# ./vnc-gnome.sh






Maintain kernel-2.6.37-0.(x).rc(x).git(y).xendom0.fc14.src.rpm in sync with tip of mainline development tree 2.6.37

November 7, 2010

Download from http://koji.fedoraproject.org/koji/taskinfo?taskID=2581021
file kernel-6.37-0.1.rc1.git0.xendom0.fc15.src.rpm been built by Michael Young and install it.
In mean time following patches :-
patch-2.6.37-rc1.bz2
patch-2.6.37-rc1-git5.bz2
should be downloaded from http://kernel.org and copied to /root/rpmbuild/SOURCES folder
Update /root/rpmbuild/SPECS/kernel.spec correspondently

--- kernel.spec.orig	2010-11-07 18:22:25.965480016 +0300
+++ kernel.spec	2010-11-07 17:23:50.546673325 +0300
@@ -85,7 +85,7 @@
 # The rc snapshot level
 %define rcrev 1
 # The git snapshot level
-%define gitrev 0
+%define gitrev 5
 # Set rpm version accordingly
 %define rpmversion 2.6.%{upstream_sublevel}
 %endif

At this point you should be able to build new kernel RPMS

# rpmbuild -bb ./kernel.spec
. . . . .
Wrote: /root/rpmbuild/RPMS/x86_64/kernel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/kernel-headers-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/kernel-debuginfo-common-x86_64-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/perf-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/kernel-devel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/kernel-debuginfo-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.vzYwPP
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd kernel-2.6.36.fc14
+ rm -rf /root/rpmbuild/BUILDROOT/kernel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64
+ exit 0

Install new kernel :-

yum install kernel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm \
kernel-debuginfo-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm \
kernel-debuginfo-common-x86_64-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm \
kernel-devel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm \
kernel-headers-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm \
perf-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.rpm

Dependencies Resolved

====================================================================================
Package Arch Version Repository Size
====================================================================================
Installing:
kernel x86_64 2.6.37-0.1.rc1.git5.xendom0.fc14 /kernel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 107 M
kernel-devel x86_64 2.6.37-0.1.rc1.git5.xendom0.fc14 /kerneldevel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 24 M
Updating:
kernel-debuginfo x86_64 2.6.37-0.1.rc1.git5.xendom0.fc14 /kernel-debuginfo-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 1.5 G
kernel-debuginfo-common x86_64 x86_64 2.6.37-0.1.rc1.git5.xendom0.fc14 /kernel-debuginfo-common-x86_64-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 196 M
kernel-headers x86_64 2.6.37-0.1.rc1.git5.xendom0.fc14 /kernel-headers-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 2.4 M
perf x86_64 2.6.37-0.1.rc1.git5.xendom0.fc14 /perf-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 747 k

Removing:
kernel x86_64 2.6.37-0.1.rc0.git13.xendom0.fc14 @/kernel-2.6.37-0.1.rc0.git13.xendom0.fc14.x86_64 100 M

kernel-devel x86_64 2.6.37-0.1.rc0.git13.xendom0.fc14 @/kernel- devel-2.6.37-0.1.rc0.git13.xendom0.fc14.x86_64 24 M

Transaction Summary
===================================================================================
Install 2 Package(s)
Upgrade 4 Package(s)
Remove 2 Package(s)
Total size: 1.8 G
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : kernel-debuginfo-common-x86_64-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 1/12
Updating : perf-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 2/12
Installing : kernel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 3/12
Updating : kernel-debuginfo-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 4/12
Installing : kernel-devel-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 5/12
Updating : kernel-headers-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 6/12
Cleanup : kernel-debuginfo-2.6.37-0.1.rc1.git0.xendom0.fc14.x86_64 7/12
Cleanup : perf-2.6.37-0.1.rc1.git0.xendom0.fc14.x86_64 8/12
Cleanup : kernel-debuginfo-common-x86_64-2.6.37-0.1.rc1.git0.xendom0.fc14.x86_64 9/12
Cleanup : kernel-devel-2.6.37-0.1.rc0.git13.xendom0.fc14.x86_64 10/12
Cleanup : kernel-headers-2.6.37-0.1.rc1.git0.xendom0.fc14.x86_64 11/12
Cleanup : kernel-2.6.37-0.1.rc0.git13.xendom0.fc14.x86_64 12/12
Removed:
kernel.x86_64 0:2.6.37-0.1.rc0.git13.xendom0.fc14 kernel-devel.x86_64 0:2.6.37-0.1.rc0.git13.xendom0.fc14
Installed:
kernel.x86_64 0:2.6.37-0.1.rc1.git5.xendom0.fc14 kernel-devel.x86_64 0:2.6.37-0.1.rc1.git5.xendom0.fc14
Updated:
kernel-debuginfo.x86_640:2.6.37-0.1.rc1.git5.xendom0.fc14
kernel-debuginfo-common-x86_64.x86_64 0:2.6.37-0.1.rc1.git5.xendom0.fc14
kernel-headers.x86_64 0:2.6.37-0.1.rc1.git5.xendom0.fc14
perf.x86_64 0:2.6.37-0.1.rc1.git5.xendom0.fc14
Complete!

Create grub entry

title Xen 4.0.1 Fedora 14 (vmlinuz-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64)
root (hd0,8)
kernel /xen.gz dom0_mem=1024M
module /vmlinuz-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64 ro root=/dev/mapper/vg_fedora14-lv_root LANG=US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us
module /initramfs-2.6.37-0.1.rc1.git5.xendom0.fc14.x86_64.img

Set initdefault to 3 via /etc/inittab and boot system into new kernel under Xen 4.0.1 :-





****************************
UPDATE on 11/11/2010
****************************
I have to notice that for rc1 git revision 7 and 8 patch linux-2.6-crash-driver.patch should be disabled
like this:-
# ApplyPatch linux-2.6-crash-driver.patch
in kernel.spec.
****************************
UPDATE on 11/14/2010
****************************
To build fedora kernel via the most recent MY’s http://koji.fedoraproject.org/koji/taskinfo?taskID=2598434 src.rpm for rcrev=1 and gitrev=11 without applying upstream patch i had to patch the kernel.spec as follows

--- kernel.spec.orig	2010-11-13 01:19:22.000000000 +0300
+++ kernel.spec	2010-11-14 19:46:45.613917250 +0300
@@ -85,7 +85,7 @@
 # The rc snapshot level
 %define rcrev 1
 # The git snapshot level
-%define gitrev 8
+%define gitrev 11
 # Set rpm version accordingly
 %define rpmversion 2.6.%{upstream_sublevel}
 %endif
@@ -378,6 +378,9 @@
 
 # Should make listnewconfig fail if there's config options
 # printed out?
+
+%define nopatches 1
+
 %if %{nopatches}%{using_upstream_branch}
 %define listnewconfig_fail 0
 %else
@@ -1301,7 +1304,7 @@
 ApplyPatch dmar-disable-when-ricoh-multifunction.patch
 
 # Xen patches
-ApplyPatch xen.next-2.6.37.patch
+# ApplyPatch xen.next-2.6.37.patch
 #ApplyPatch xen.upstream.core.patch
 #ApplyPatch xen.pcifront.fixes.patch
 #ApplyPatch xen.pvhvm.fixes.patch

Attempt to load 2.6.37-rc1 under Xen 4.0.1 on top of Ubuntu 10.04.1 Server

November 2, 2010

Xen Core Dom0 support features started to merge mainline Linux during 2.6.37 merge window. In particular, kernel may be loaded under Xen, daemon xend starts in Dom0. However, xen backend devices are not yet in the vanilla kernel. It’s impossible to create and start guests. Please, view for details Re: [PATCH v4 00/10] xen: initial domain support
Kernel tuning to be loaded under Xen 4.0.1




# apt-get install libcurl4-openssl-dev \
xserver-xorg-dev \
mercurial gitk \
build-essential \
libncurses5-dev \
uuid-dev gawk \
gettext texinfo bcc \
libncurses5-dev dpkg-dev debhelper \
iasl texinfo bridge-utils bison flex
# aptitude install kernel-package fakeroot
# cd ./linux-2.6.37-rc1
# make-kpkg clean
# fakeroot make-kpkg --initrd kernel-image kernel-headers
# dpkg -i ../linux-image-2.6.37-rc1_2.6.37-rc1-10.00.Custom_amd64.deb

Grub Entry for Xen

menuentry "Xen 4.0.1 / Ubuntu 10.04 kernel 2.6.37-rc1" {
insmod ext2
set root='(hd1,1)'
multiboot (hd1,1)/boot/xen.gz dummy=dummy dom0_mem=1024M
module (hd1,1)/boot/vmlinuz-2.6.37-rc1 dummy=dummy root=/dev/sdb1 ro text
module (hd1,1)/boot/initrd.img-2.6.37-rc1
}

Snapshot done via VNC connection :-



Dmesg log :-

Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 2.6.37-rc1 (root@ServerLLX) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #2 SMP Tue Nov 2 12:11:23 MSK 2010
Command line: dummy=dummy root=/dev/sdb1 ro text
released 0 pages of unused memory
BIOS-provided physical RAM map:
Xen: 0000000000000000 - 000000000009ec00 (usable)
Xen: 000000000009ec00 - 0000000000100000 (reserved)
Xen: 0000000000100000 - 0000000040000000 (usable)
Xen: 00000000cfe70000 - 00000000cfe7e000 (ACPI data)
Xen: 00000000cfe7e000 - 00000000cfed0000 (ACPI NVS)
Xen: 00000000cfed0000 - 00000000d0000000 (reserved)
Xen: 00000000fec00000 - 00000000fec01000 (reserved)
Xen: 00000000fee00000 - 00000000fee01000 (reserved)
Xen: 00000000fff00000 - 0000000100000000 (reserved)
NX (Execute Disable) protection: active
DMI present.
DMI: P5Q3/System Product Name, BIOS 0804 08/10/2009
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
No AGP bridge found
last_pfn = 0x40000 max_arch_pfn = 0x400000000
found SMP MP-table at [ffff8800000ff780] ff780
initial memory mapped : 0 - 0f7ff000
init_memory_mapping: 0000000000000000-0000000040000000
0000000000 - 0040000000 page 4k
kernel direct mapping tables up to 40000000 @ f5fd000-f7ff000
RAMDISK: 01e98000 - 0e9f9000
ACPI: RSDP 00000000000fb1e0 00024 (v02 ACPIAM)
ACPI: XSDT 00000000cfe70100 0005C (v01 A_M_I_ OEMXSDT 08000910 MSFT 00000097)
ACPI: FACP 00000000cfe70290 000F4 (v03 A_M_I_ OEMFACP 08000910 MSFT 00000097)
ACPI: DSDT 00000000cfe70440 0A990 (v01 A1098 A1098001 00000001 INTL 20051117)
ACPI: FACS 00000000cfe7e000 00040
ACPI: APIC 00000000cfe70390 0006C (v01 A_M_I_ OEMAPIC 08000910 MSFT 00000097)
ACPI: MCFG 00000000cfe70400 0003C (v01 A_M_I_ OEMMCFG 08000910 MSFT 00000097)
ACPI: OEMB 00000000cfe7e040 00081 (v01 A_M_I_ AMI_OEM 08000910 MSFT 00000097)
ACPI: HPET 00000000cfe7add0 00038 (v01 A_M_I_ OEMHPET 08000910 MSFT 00000097)
ACPI: OSFR 00000000cfe7ae10 000B0 (v01 A_M_I_ OEMOSFR 08000910 MSFT 00000097)
ACPI: SSDT 00000000cfe7e9d0 00A7C (v01 DpgPmm CpuPm 00000012 INTL 20051117)
ACPI: Local APIC address 0xfee00000
No NUMA configuration found
Faking a node at 0000000000000000-0000000040000000
Initmem setup node 0 0000000000000000-0000000040000000
NODE_DATA [000000003ffec000 - 000000003fffffff]
Zone PFN ranges:
DMA 0x00000010 -> 0x00001000
DMA32 0x00001000 -> 0x00100000
Normal empty
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
0: 0x00000010 -> 0x0000009e
0: 0x00000100 -> 0x00040000
On node 0 totalpages: 262030
DMA zone: 56 pages used for memmap
DMA zone: 6 pages reserved
DMA zone: 3920 pages, LIFO batch:0
DMA32 zone: 3528 pages used for memmap
DMA32 zone: 254520 pages, LIFO batch:31
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
BIOS bug, APIC version is 0 for CPU#0! fixing up to 0x10. (tell your hw vendor)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x02] enabled)
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] enabled)
ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 4, version 255, address 0xfec00000, GSI 0-255
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Using ACPI (MADT) for SMP configuration information
ACPI: HPET id: 0x8086a301 base: 0xfed00000
SMP: Allowing 4 CPUs, 0 hotplug CPUs
nr_irqs_gsi: 272
PM: Registered nosave memory: 000000000009e000 - 000000000009f000
PM: Registered nosave memory: 000000000009f000 - 0000000000100000
Allocating PCI resources starting at 40000000 (gap: 40000000:8fe70000)
Booting paravirtualized kernel on Xen
Xen version: 4.0.1 (preserve-AD)
setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:4 nr_node_ids:1
PERCPU: Embedded 28 pages/cpu @ffff88003ff6f000 s82752 r8192 d23744 u114688
pcpu-alloc: s82752 r8192 d23744 u114688 alloc=28*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists in Node order, mobility grouping on. Total pages: 258440
Policy zone: DMA32
Kernel command line: dummy=dummy root=/dev/sdb1 ro text
PID hash table entries: 4096 (order: 3, 32768 bytes)
Placing 64MB software IO TLB between ffff88003a600000 - ffff88003e600000
software IO TLB at phys 0x3a600000 - 0x3e600000
Memory: 741008k/1048576k available (4462k kernel code, 456k absent, 307112k reserved, 6442k data, 1564k init)
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
NR_IRQS:16640 nr_irqs:1024 16
xen: sci override: global_irq=9 trigger=0 polarity=0
xen: registering gsi 9 triggering 0 polarity 0
xen: --> irq=9
xen: acpi sci 9
xen: --> irq=1
xen: --> irq=2
xen: --> irq=3
xen: --> irq=4
xen: --> irq=5
xen: --> irq=6
xen: --> irq=7
xen: --> irq=8
xen_map_pirq_gsi: returning irq 9 for gsi 9
xen: --> irq=9
xen: --> irq=10
xen: --> irq=11
xen: --> irq=12
xen: --> irq=13
xen: --> irq=14
xen: --> irq=15
Console: colour dummy device 80x25
console [tty0] enabled
allocated 10485760 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Xen: using vcpuop timer interface
installing Xen timer for CPU 0
Detected 2833.068 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 5666.13 BogoMIPS (lpj=2833068)
pid_max: default: 32768 minimum: 301
Security Framework initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Mount-cache hash table entries: 256
Initializing cgroup subsys debug
Initializing cgroup subsys ns
ns_cgroup deprecated: consider using the 'clone_children' flag without the ns_cgroup.
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
Performance Events: unsupported p6 CPU model 23 no PMU driver, software events only.
ACPI: Core revision 20101013
cpu 0 spinlock event irq 1022
installing Xen timer for CPU 1
cpu 1 spinlock event irq 1016
installing Xen timer for CPU 2
cpu 2 spinlock event irq 1010
installing Xen timer for CPU 3
cpu 3 spinlock event irq 1004
Brought up 4 CPUs
Grant table initialized
regulator: core version 0.5
regulator: dummy:
Time: 9:47:17 Date: 11/02/10
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
PCI: not using MMCONFIG
PCI: Using configuration type 1 for base access
bio: create slab at 0
ACPI: EC: Look up EC in DSDT
ACPI: Executed 1 blocks of module-level executable AML code
ACPI: SSDT 00000000cfe7e0d0 00235 (v01 DpgPmm P001Ist 00000011 INTL 20051117)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT (null) 00235 (v01 DpgPmm P001Ist 00000011 INTL 20051117)
ACPI: SSDT 00000000cfe7e310 00235 (v01 DpgPmm P002Ist 00000012 INTL 20051117)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT (null) 00235 (v01 DpgPmm P002Ist 00000012 INTL 20051117)
ACPI: SSDT 00000000cfe7e550 00235 (v01 DpgPmm P003Ist 00000012 INTL 20051117)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT (null) 00235 (v01 DpgPmm P003Ist 00000012 INTL 20051117)
ACPI: SSDT 00000000cfe7e790 00235 (v01 DpgPmm P004Ist 00000012 INTL 20051117)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT (null) 00235 (v01 DpgPmm P004Ist 00000012 INTL 20051117)
ACPI: Interpreter enabled
ACPI: (supports S0 S1 S3 S4 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in ACPI motherboard resources
ACPI: No dock devices found.
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
pci_root PNP0A08:00: host bridge window [io 0x0000-0x0cf7]
pci_root PNP0A08:00: host bridge window [io 0x0d00-0xffff]
pci_root PNP0A08:00: host bridge window [mem 0x000a0000-0x000bffff]
pci_root PNP0A08:00: host bridge window [mem 0x000d0000-0x000dffff]
pci_root PNP0A08:00: host bridge window [mem 0xcff00000-0xffffffff]
pci 0000:00:00.0: [8086:2e20] type 0 class 0x000600
pci 0000:00:01.0: [8086:2e21] type 1 class 0x000604
pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
pci 0000:00:01.0: PME# disabled
pci 0000:00:1a.0: [8086:3a37] type 0 class 0x000c03
pci 0000:00:1a.0: reg 20: [io 0xa800-0xa81f]
pci 0000:00:1a.1: [8086:3a38] type 0 class 0x000c03
pci 0000:00:1a.1: reg 20: [io 0xa880-0xa89f]
pci 0000:00:1a.2: [8086:3a39] type 0 class 0x000c03
pci 0000:00:1a.2: reg 20: [io 0xac00-0xac1f]
pci 0000:00:1a.7: [8086:3a3c] type 0 class 0x000c03
pci 0000:00:1a.7: reg 10: [mem 0xfe7ffc00-0xfe7fffff]
pci 0000:00:1a.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1a.7: PME# disabled
pci 0000:00:1b.0: [8086:3a3e] type 0 class 0x000403
pci 0000:00:1b.0: reg 10: [mem 0xfe7f8000-0xfe7fbfff 64bit]
pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
pci 0000:00:1b.0: PME# disabled
pci 0000:00:1c.0: [8086:3a40] type 1 class 0x000604
pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
pci 0000:00:1c.0: PME# disabled
pci 0000:00:1c.4: [8086:3a48] type 1 class 0x000604
pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
pci 0000:00:1c.4: PME# disabled
pci 0000:00:1c.5: [8086:3a4a] type 1 class 0x000604
pci 0000:00:1c.5: PME# supported from D0 D3hot D3cold
pci 0000:00:1c.5: PME# disabled
pci 0000:00:1d.0: [8086:3a34] type 0 class 0x000c03
pci 0000:00:1d.0: reg 20: [io 0xa080-0xa09f]
pci 0000:00:1d.1: [8086:3a35] type 0 class 0x000c03
pci 0000:00:1d.1: reg 20: [io 0xa400-0xa41f]
pci 0000:00:1d.2: [8086:3a36] type 0 class 0x000c03
pci 0000:00:1d.2: reg 20: [io 0xa480-0xa49f]
pci 0000:00:1d.7: [8086:3a3a] type 0 class 0x000c03
pci 0000:00:1d.7: reg 10: [mem 0xfe7ff800-0xfe7ffbff]
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1e.0: [8086:244e] type 1 class 0x000604
pci 0000:00:1f.0: [8086:3a16] type 0 class 0x000601
pci 0000:00:1f.0: quirk: [io 0x0800-0x087f] claimed by ICH6 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: [io 0x0500-0x053f] claimed by ICH6 GPIO
pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0294 (mask 0003)
pci 0000:00:1f.0: ICH7 LPC Generic IO decode 3 PIO at 4700 (mask 001f)
pci 0000:00:1f.2: [8086:3a22] type 0 class 0x000106
pci 0000:00:1f.2: reg 10: [io 0x9c00-0x9c07]
pci 0000:00:1f.2: reg 14: [io 0x9880-0x9883]
pci 0000:00:1f.2: reg 18: [io 0x9800-0x9807]
pci 0000:00:1f.2: reg 1c: [io 0x9480-0x9483]
pci 0000:00:1f.2: reg 20: [io 0x9400-0x941f]
pci 0000:00:1f.2: reg 24: [mem 0xfe7fe800-0xfe7fefff]
pci 0000:00:1f.2: PME# supported from D3hot
pci 0000:00:1f.2: PME# disabled
pci 0000:00:1f.3: [8086:3a30] type 0 class 0x000c05
pci 0000:00:1f.3: reg 10: [mem 0xfe7ff400-0xfe7ff4ff 64bit]
pci 0000:00:1f.3: reg 20: [io 0x0400-0x041f]
pci 0000:01:00.0: [1002:9498] type 0 class 0x000300
pci 0000:01:00.0: reg 10: [mem 0xd0000000-0xdfffffff 64bit pref]
pci 0000:01:00.0: reg 18: [mem 0xfe8e0000-0xfe8effff 64bit]
pci 0000:01:00.0: reg 20: [io 0xb000-0xb0ff]
pci 0000:01:00.0: reg 30: [mem 0xfe8c0000-0xfe8dffff pref]
pci 0000:01:00.0: supports D1 D2
pci 0000:01:00.1: [1002:aa38] type 0 class 0x000403
pci 0000:01:00.1: reg 10: [mem 0xfe8fc000-0xfe8fffff 64bit]
pci 0000:01:00.1: supports D1 D2
pci 0000:00:01.0: PCI bridge to [bus 01-01]
pci 0000:00:01.0: bridge window [io 0xb000-0xbfff]
pci 0000:00:01.0: bridge window [mem 0xfe800000-0xfe8fffff]
pci 0000:00:01.0: bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
pci 0000:00:1c.0: PCI bridge to [bus 04-04]
pci 0000:00:1c.0: bridge window [io 0xf000-0x0000] (disabled)
pci 0000:00:1c.0: bridge window [mem 0xfff00000-0x000fffff] (disabled)
pci 0000:00:1c.0: bridge window [mem 0xfdf00000-0xfdffffff 64bit pref]
pci 0000:03:00.0: [197b:2363] type 0 class 0x000101
pci 0000:03:00.0: reg 24: [mem 0xfeafe000-0xfeafffff]
pci 0000:03:00.0: reg 30: [mem 0xfeae0000-0xfeaeffff pref]
pci 0000:03:00.0: PME# supported from D3hot
pci 0000:03:00.0: PME# disabled
pci 0000:03:00.1: [197b:2363] type 0 class 0x000101
pci 0000:03:00.1: reg 10: [io 0xdc00-0xdc07]
pci 0000:03:00.1: reg 14: [io 0xd880-0xd883]
pci 0000:03:00.1: reg 18: [io 0xd800-0xd807]
pci 0000:03:00.1: reg 1c: [io 0xd480-0xd483]
pci 0000:03:00.1: reg 20: [io 0xd400-0xd40f]
pci 0000:03:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'
pci 0000:00:1c.4: PCI bridge to [bus 03-03]
pci 0000:00:1c.4: bridge window [io 0xd000-0xdfff]
pci 0000:00:1c.4: bridge window [mem 0xfea00000-0xfeafffff]
pci 0000:00:1c.4: bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
pci 0000:02:00.0: [10ec:8168] type 0 class 0x000200
pci 0000:02:00.0: reg 10: [io 0xc800-0xc8ff]
pci 0000:02:00.0: reg 18: [mem 0xfe9ff000-0xfe9fffff 64bit]
pci 0000:02:00.0: reg 20: [mem 0xfdef0000-0xfdefffff 64bit pref]
pci 0000:02:00.0: reg 30: [mem 0xfe9c0000-0xfe9dffff pref]
pci 0000:02:00.0: supports D1 D2
pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:02:00.0: PME# disabled
pci 0000:00:1c.5: PCI bridge to [bus 02-02]
pci 0000:00:1c.5: bridge window [io 0xc000-0xcfff]
pci 0000:00:1c.5: bridge window [mem 0xfe900000-0xfe9fffff]
pci 0000:00:1c.5: bridge window [mem 0xfde00000-0xfdefffff 64bit pref]
pci 0000:05:03.0: [1106:3044] type 0 class 0x000c00
pci 0000:05:03.0: reg 10: [mem 0xfebff800-0xfebfffff]
pci 0000:05:03.0: reg 14: [io 0xec00-0xec7f]
pci 0000:05:03.0: supports D2
pci 0000:05:03.0: PME# supported from D2 D3hot D3cold
pci 0000:05:03.0: PME# disabled
pci 0000:00:1e.0: PCI bridge to [bus 05-05] (subtractive decode)
pci 0000:00:1e.0: bridge window [io 0xe000-0xefff]
pci 0000:00:1e.0: bridge window [mem 0xfeb00000-0xfebfffff]
pci 0000:00:1e.0: bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
pci 0000:00:1e.0: bridge window [io 0x0000-0x0cf7] (subtractive decode)
pci 0000:00:1e.0: bridge window [io 0x0d00-0xffff] (subtractive decode)
pci 0000:00:1e.0: bridge window [mem 0x000a0000-0x000bffff] (subtractive decode)
pci 0000:00:1e.0: bridge window [mem 0x000d0000-0x000dffff] (subtractive decode)
pci 0000:00:1e.0: bridge window [mem 0xcff00000-0xffffffff] (subtractive decode)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P2._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P8._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P9._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 11 12 14 *15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 *14 15)
ACPI: PCI Interrupt Link [LNKG] (IRQs *3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 *7 10 11 12 14 15)
xen_balloon: Initialising balloon driver.
vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
PCI: pci_cache_line_size set to 64 bytes
Expanded resource reserved due to conflict with PCI Bus 0000:00
reserve RAM buffer: 000000000009ec00 - 000000000009ffff
NetLabel: Initializing
NetLabel: domain hash size = 128
NetLabel: protocols = UNLABELED CIPSOv4
NetLabel: unlabeled traffic allowed by default
Switching to clocksource xen
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp 00:00: [bus 00-ff]
pnp 00:00: [io 0x0cf8-0x0cff]
pnp 00:00: [io 0x0000-0x0cf7 window]
pnp 00:00: [io 0x0d00-0xffff window]
pnp 00:00: [mem 0x000a0000-0x000bffff window]
pnp 00:00: [mem 0x000d0000-0x000dffff window]
pnp 00:00: [mem 0xcff00000-0xffffffff window]
pnp 00:00: Plug and Play ACPI device, IDs PNP0a08 PNP0a03 (active)
pnp 00:01: [mem 0xfed14000-0xfed19fff]
pnp 00:01: Plug and Play ACPI device, IDs PNP0c01 (active)
pnp 00:02: [dma 4]
pnp 00:02: [io 0x0000-0x000f]
pnp 00:02: [io 0x0081-0x0083]
pnp 00:02: [io 0x0087]
pnp 00:02: [io 0x0089-0x008b]
pnp 00:02: [io 0x008f]
pnp 00:02: [io 0x00c0-0x00df]
pnp 00:02: Plug and Play ACPI device, IDs PNP0200 (active)
pnp 00:03: [io 0x0070-0x0071]
xen: registering gsi 8 triggering 1 polarity 0
xen_map_pirq_gsi: returning irq 8 for gsi 8
xen: --> irq=8
pnp 00:03: [irq 8]
pnp 00:03: Plug and Play ACPI device, IDs PNP0b00 (active)
pnp 00:04: [io 0x0061]
pnp 00:04: Plug and Play ACPI device, IDs PNP0800 (active)
pnp 00:05: [io 0x00f0-0x00ff]
xen: registering gsi 13 triggering 1 polarity 0
xen_map_pirq_gsi: returning irq 13 for gsi 13
xen: --> irq=13
pnp 00:05: [irq 13]
pnp 00:05: Plug and Play ACPI device, IDs PNP0c04 (active)
pnp 00:06: [io 0x03f0-0x03f5]
pnp 00:06: [io 0x03f7]
xen: registering gsi 6 triggering 1 polarity 0
xen_map_pirq_gsi: returning irq 6 for gsi 6
xen: --> irq=6
pnp 00:06: [irq 6]
pnp 00:06: [dma 2]
pnp 00:06: Plug and Play ACPI device, IDs PNP0700 (active)
pnp 00:07: [io 0x0000-0xffffffffffffffff disabled]
pnp 00:07: [io 0x0000-0xffffffffffffffff disabled]
pnp 00:07: [io 0x0290-0x029f]
pnp 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:08: [io 0x0010-0x001f]
pnp 00:08: [io 0x0022-0x003f]
pnp 00:08: [io 0x0044-0x004d]
pnp 00:08: [io 0x0050-0x005f]
pnp 00:08: [io 0x0062-0x0063]
pnp 00:08: [io 0x0065-0x006f]
pnp 00:08: [io 0x0072-0x007f]
pnp 00:08: [io 0x0080]
pnp 00:08: [io 0x0084-0x0086]
pnp 00:08: [io 0x0088]
pnp 00:08: [io 0x008c-0x008e]
pnp 00:08: [io 0x0090-0x009f]
pnp 00:08: [io 0x00a2-0x00bf]
pnp 00:08: [io 0x00e0-0x00ef]
pnp 00:08: [io 0x04d0-0x04d1]
pnp 00:08: [io 0x0800-0x087f]
pnp 00:08: [io 0x0400-0x03ff disabled]
pnp 00:08: [io 0x0500-0x057f]
pnp 00:08: [mem 0xfed08000-0xfed08fff]
pnp 00:08: [mem 0xfed1c000-0xfed1ffff]
pnp 00:08: [mem 0xfed20000-0xfed3ffff]
pnp 00:08: [mem 0xfed50000-0xfed8ffff]
pnp 00:08: [mem 0xcff00000-0xcfffffff]
pnp 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:09: [mem 0xfed00000-0xfed003ff]
pnp 00:09: Plug and Play ACPI device, IDs PNP0103 (active)
pnp 00:0a: [mem 0xffb00000-0xffbfffff]
pnp 00:0a: [mem 0xfff00000-0xffffffff]
pnp 00:0a: Plug and Play ACPI device, IDs INT0800 (active)
pnp 00:0b: [mem 0xffc00000-0xffefffff]
pnp 00:0b: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:0c: [io 0x03f8-0x03ff]
xen: registering gsi 4 triggering 1 polarity 0
xen_map_pirq_gsi: returning irq 4 for gsi 4
xen: --> irq=4
pnp 00:0c: [irq 4]
pnp 00:0c: [dma 0 disabled]
pnp 00:0c: Plug and Play ACPI device, IDs PNP0501 (active)
pnp 00:0d: [io 0x0000-0xffffffffffffffff disabled]
pnp 00:0d: [io 0x0000-0xffffffffffffffff disabled]
pnp 00:0d: [mem 0xfec00000-0xfec00fff]
pnp 00:0d: [mem 0xfee00000-0xfee00fff]
pnp 00:0d: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:0e: [io 0x0060]
pnp 00:0e: [io 0x0064]
xen: registering gsi 1 triggering 1 polarity 0
xen_map_pirq_gsi: returning irq 1 for gsi 1
xen: --> irq=1
pnp 00:0e: [irq 1]
pnp 00:0e: Plug and Play ACPI device, IDs PNP0303 PNP030b (active)
pnp 00:0f: [mem 0xe0000000-0xefffffff]
pnp 00:0f: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:10: [mem 0x00000000-0x0009ffff]
pnp 00:10: [mem 0x000c0000-0x000cffff]
pnp 00:10: [mem 0x000e0000-0x000fffff]
pnp 00:10: [mem 0x00100000-0xcfefffff]
pnp 00:10: [mem 0x00000000-0xffffffffffffffff disabled]
pnp 00:10: Plug and Play ACPI device, IDs PNP0c01 (active)
pnp: PnP ACPI: found 17 devices
ACPI: ACPI bus type pnp unregistered
system 00:01: [mem 0xfed14000-0xfed19fff] has been reserved
system 00:07: [io 0x0290-0x029f] has been reserved
system 00:08: [io 0x04d0-0x04d1] has been reserved
system 00:08: [io 0x0800-0x087f] has been reserved
system 00:08: [io 0x0500-0x057f] could not be reserved
system 00:08: [mem 0xfed08000-0xfed08fff] has been reserved
system 00:08: [mem 0xfed1c000-0xfed1ffff] has been reserved
system 00:08: [mem 0xfed20000-0xfed3ffff] has been reserved
system 00:08: [mem 0xfed50000-0xfed8ffff] has been reserved
system 00:08: [mem 0xcff00000-0xcfffffff] has been reserved
system 00:0b: [mem 0xffc00000-0xffefffff] has been reserved
system 00:0d: [mem 0xfec00000-0xfec00fff] could not be reserved
system 00:0d: [mem 0xfee00000-0xfee00fff] has been reserved
system 00:0f: [mem 0xe0000000-0xefffffff] has been reserved
system 00:10: [mem 0x00000000-0x0009ffff] could not be reserved
system 00:10: [mem 0x000c0000-0x000cffff] could not be reserved
system 00:10: [mem 0x000e0000-0x000fffff] could not be reserved
system 00:10: [mem 0x00100000-0xcfefffff] could not be reserved
PM-Timer failed consistency check (0x0xffffff) - aborting.
pci 0000:00:1c.0: BAR 14: assigned [mem 0xff800000-0xffbfffff]
pci 0000:00:1c.4: BAR 15: assigned [mem 0xff600000-0xff7fffff 64bit pref]
pci 0000:00:1c.0: BAR 13: assigned [io 0xf000-0xffff]
pci 0000:00:01.0: PCI bridge to [bus 01-01]
pci 0000:00:01.0: bridge window [io 0xb000-0xbfff]
pci 0000:00:01.0: bridge window [mem 0xfe800000-0xfe8fffff]
pci 0000:00:01.0: bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
pci 0000:00:1c.0: PCI bridge to [bus 04-04]
pci 0000:00:1c.0: bridge window [io 0xf000-0xffff]
pci 0000:00:1c.0: bridge window [mem 0xff800000-0xffbfffff]
pci 0000:00:1c.0: bridge window [mem 0xfdf00000-0xfdffffff 64bit pref]
pci 0000:00:1c.4: PCI bridge to [bus 03-03]
pci 0000:00:1c.4: bridge window [io 0xd000-0xdfff]
pci 0000:00:1c.4: bridge window [mem 0xfea00000-0xfeafffff]
pci 0000:00:1c.4: bridge window [mem 0xff600000-0xff7fffff 64bit pref]
pci 0000:00:1c.5: PCI bridge to [bus 02-02]
pci 0000:00:1c.5: bridge window [io 0xc000-0xcfff]
pci 0000:00:1c.5: bridge window [mem 0xfe900000-0xfe9fffff]
pci 0000:00:1c.5: bridge window [mem 0xfde00000-0xfdefffff 64bit pref]
pci 0000:00:1e.0: PCI bridge to [bus 05-05]
pci 0000:00:1e.0: bridge window [io 0xe000-0xefff]
pci 0000:00:1e.0: bridge window [mem 0xfeb00000-0xfebfffff]
pci 0000:00:1e.0: bridge window [mem pref disabled]
xen: registering gsi 16 triggering 0 polarity 1
xen: --> irq=16
pci 0000:00:01.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
pci 0000:00:01.0: setting latency timer to 64
pci 0000:00:1c.0: enabling device (0106 -> 0107)
xen: registering gsi 17 triggering 0 polarity 1
xen: --> irq=17
pci 0000:00:1c.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
pci 0000:00:1c.0: setting latency timer to 64
xen: registering gsi 17 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 17 for gsi 17
xen: --> irq=17
Already setup the GSI :17
pci 0000:00:1c.4: PCI INT A -> GSI 17 (level, low) -> IRQ 17
pci 0000:00:1c.4: setting latency timer to 64
xen: registering gsi 16 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 16 for gsi 16
xen: --> irq=16
Already setup the GSI :16
pci 0000:00:1c.5: PCI INT B -> GSI 16 (level, low) -> IRQ 16
pci 0000:00:1c.5: setting latency timer to 64
pci 0000:00:1e.0: setting latency timer to 64
pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7]
pci_bus 0000:00: resource 5 [io 0x0d00-0xffff]
pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000dffff]
pci_bus 0000:00: resource 8 [mem 0xcff00000-0xffffffff]
pci_bus 0000:01: resource 0 [io 0xb000-0xbfff]
pci_bus 0000:01: resource 1 [mem 0xfe800000-0xfe8fffff]
pci_bus 0000:01: resource 2 [mem 0xd0000000-0xdfffffff 64bit pref]
pci_bus 0000:04: resource 0 [io 0xf000-0xffff]
pci_bus 0000:04: resource 1 [mem 0xff800000-0xffbfffff]
pci_bus 0000:04: resource 2 [mem 0xfdf00000-0xfdffffff 64bit pref]
pci_bus 0000:03: resource 0 [io 0xd000-0xdfff]
pci_bus 0000:03: resource 1 [mem 0xfea00000-0xfeafffff]
pci_bus 0000:03: resource 2 [mem 0xff600000-0xff7fffff 64bit pref]
pci_bus 0000:02: resource 0 [io 0xc000-0xcfff]
pci_bus 0000:02: resource 1 [mem 0xfe900000-0xfe9fffff]
pci_bus 0000:02: resource 2 [mem 0xfde00000-0xfdefffff 64bit pref]
pci_bus 0000:05: resource 0 [io 0xe000-0xefff]
pci_bus 0000:05: resource 1 [mem 0xfeb00000-0xfebfffff]
pci_bus 0000:05: resource 4 [io 0x0000-0x0cf7]
pci_bus 0000:05: resource 5 [io 0x0d00-0xffff]
pci_bus 0000:05: resource 6 [mem 0x000a0000-0x000bffff]
pci_bus 0000:05: resource 7 [mem 0x000d0000-0x000dffff]
pci_bus 0000:05: resource 8 [mem 0xcff00000-0xffffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 6, 262144 bytes)
TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
pci 0000:01:00.0: Boot video device
PCI: CLS 32 bytes, default 64
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 208260k freed
audit: initializing netlink socket (disabled)
type=2000 audit(1288691238.775:1): initialized
HugeTLB registered 2 MB page size, pre-allocated 0 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
msgmni has been set to 1854
SELinux: Registering netfilter hooks
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
pciehp: PCI Express Hot Plug Controller Driver version: 0.4
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
pci-stub: invalid id string ""
input: Power Button as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
ACPI: Power Button [PWRB]
input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
ACPI: Power Button [PWRF]
ACPI: acpi_idle registered with cpuidle
Event-channel device installed.
hpet_acpi_add: no address or irqs in _CRS
Non-volatile memory driver v1.3
Linux agpgart interface v0.103
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
brd: module loaded
loop: module loaded
ahci 0000:00:1f.2: version 3.0
xen: registering gsi 19 triggering 0 polarity 1
xen: --> irq=19
ahci 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19
ahci: SSS flag set, parallel bus scan disabled
ahci 0000:00:1f.2: AHCI 0001.0200 32 slots 6 ports 3 Gbps 0x3f impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pmp pio slum part ccc ems sxs
ahci 0000:00:1f.2: setting latency timer to 64
scsi0 : ahci
scsi1 : ahci
scsi2 : ahci
scsi3 : ahci
scsi4 : ahci
scsi5 : ahci
ata1: SATA max UDMA/133 abar m2048@0xfe7fe800 port 0xfe7fe900 irq 997
ata2: SATA max UDMA/133 abar m2048@0xfe7fe800 port 0xfe7fe980 irq 997
ata3: SATA max UDMA/133 abar m2048@0xfe7fe800 port 0xfe7fea00 irq 997
ata4: SATA max UDMA/133 irq_stat 0x00400040, connection status changed irq 997
ata5: SATA max UDMA/133 irq_stat 0x00400040, connection status changed irq 997
ata6: SATA max UDMA/133 abar m2048@0xfe7fe800 port 0xfe7feb80 irq 997
xen: registering gsi 16 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 16 for gsi 16
xen: --> irq=16
Already setup the GSI :16
ahci 0000:03:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
ahci 0000:03:00.0: AHCI 0001.0000 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
ahci 0000:03:00.0: flags: 64bit ncq pm led clo pmp pio slum part
ahci 0000:03:00.0: setting latency timer to 64
scsi6 : ahci
scsi7 : ahci
ata7: SATA max UDMA/133 abar m8192@0xfeafe000 port 0xfeafe100 irq 16
ata8: SATA max UDMA/133 abar m8192@0xfeafe000 port 0xfeafe180 irq 16
Fixed MDIO Bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
xen: registering gsi 18 triggering 0 polarity 1
xen: --> irq=18
ehci_hcd 0000:00:1a.7: PCI INT C -> GSI 18 (level, low) -> IRQ 18
ehci_hcd 0000:00:1a.7: setting latency timer to 64
ehci_hcd 0000:00:1a.7: EHCI Host Controller
ehci_hcd 0000:00:1a.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1a.7: debug port 1
ehci_hcd 0000:00:1a.7: cache line size of 32 is not supported
ehci_hcd 0000:00:1a.7: irq 18, io mem 0xfe7ffc00
ehci_hcd 0000:00:1a.7: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.37-rc1 ehci_hcd
usb usb1: SerialNumber: 0000:00:1a.7
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 6 ports detected
xen: registering gsi 23 triggering 0 polarity 1
xen: --> irq=23
ehci_hcd 0000:00:1d.7: PCI INT A -> GSI 23 (level, low) -> IRQ 23
ehci_hcd 0000:00:1d.7: setting latency timer to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 2
ehci_hcd 0000:00:1d.7: debug port 1
ehci_hcd 0000:00:1d.7: cache line size of 32 is not supported
ehci_hcd 0000:00:1d.7: irq 23, io mem 0xfe7ff800
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: EHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.37-rc1 ehci_hcd
usb usb2: SerialNumber: 0000:00:1d.7
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 6 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
xen: registering gsi 16 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 16 for gsi 16
xen: --> irq=16
Already setup the GSI :16
uhci_hcd 0000:00:1a.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
uhci_hcd 0000:00:1a.0: setting latency timer to 64
uhci_hcd 0000:00:1a.0: UHCI Host Controller
uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1a.0: irq 16, io base 0x0000a800
usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.37-rc1 uhci_hcd
usb usb3: SerialNumber: 0000:00:1a.0
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
xen: registering gsi 21 triggering 0 polarity 1
xen: --> irq=21
uhci_hcd 0000:00:1a.1: PCI INT B -> GSI 21 (level, low) -> IRQ 21
uhci_hcd 0000:00:1a.1: setting latency timer to 64
uhci_hcd 0000:00:1a.1: UHCI Host Controller
uhci_hcd 0000:00:1a.1: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1a.1: irq 21, io base 0x0000a880
usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: UHCI Host Controller
usb usb4: Manufacturer: Linux 2.6.37-rc1 uhci_hcd
usb usb4: SerialNumber: 0000:00:1a.1
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
xen: registering gsi 18 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 18 for gsi 18
xen: --> irq=18
Already setup the GSI :18
uhci_hcd 0000:00:1a.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
uhci_hcd 0000:00:1a.2: setting latency timer to 64
uhci_hcd 0000:00:1a.2: UHCI Host Controller
uhci_hcd 0000:00:1a.2: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:1a.2: irq 18, io base 0x0000ac00
usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb5: Product: UHCI Host Controller
usb usb5: Manufacturer: Linux 2.6.37-rc1 uhci_hcd
usb usb5: SerialNumber: 0000:00:1a.2
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
xen: registering gsi 23 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 23 for gsi 23
xen: --> irq=23
Already setup the GSI :23
uhci_hcd 0000:00:1d.0: PCI INT A -> GSI 23 (level, low) -> IRQ 23
uhci_hcd 0000:00:1d.0: setting latency timer to 64
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 6
uhci_hcd 0000:00:1d.0: irq 23, io base 0x0000a080
usb usb6: New USB device found, idVendor=1d6b, idProduct=0001
usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb6: Product: UHCI Host Controller
usb usb6: Manufacturer: Linux 2.6.37-rc1 uhci_hcd
usb usb6: SerialNumber: 0000:00:1d.0
hub 6-0:1.0: USB hub found
hub 6-0:1.0: 2 ports detected
xen: registering gsi 19 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 19 for gsi 19
xen: --> irq=19
Already setup the GSI :19
uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
uhci_hcd 0000:00:1d.1: setting latency timer to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 7
uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000a400
usb usb7: New USB device found, idVendor=1d6b, idProduct=0001
usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb7: Product: UHCI Host Controller
usb usb7: Manufacturer: Linux 2.6.37-rc1 uhci_hcd
usb usb7: SerialNumber: 0000:00:1d.1
hub 7-0:1.0: USB hub found
hub 7-0:1.0: 2 ports detected
xen: registering gsi 18 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 18 for gsi 18
xen: --> irq=18
Already setup the GSI :18
uhci_hcd 0000:00:1d.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
uhci_hcd 0000:00:1d.2: setting latency timer to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 8
uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000a480
usb usb8: New USB device found, idVendor=1d6b, idProduct=0001
usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb8: Product: UHCI Host Controller
usb usb8: Manufacturer: Linux 2.6.37-rc1 uhci_hcd
usb usb8: SerialNumber: 0000:00:1d.2
hub 8-0:1.0: USB hub found
hub 8-0:1.0: 2 ports detected
PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
serio: i8042 KBD port at 0x60,0x64 irq 1
mice: PS/2 mouse device common for all mice
rtc_cmos 00:03: RTC can wake from S4
rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
rtc0: alarms up to one month, y3k, 114 bytes nvram
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.18.0-ioctl (2010-06-29) initialised: dm-devel@redhat.com
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
nf_conntrack version 0.5.0 (7416 buckets, 29664 max)
IPVS: Registered protocols (TCP, UDP, AH, ESP)
IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
IPVS: ipvs loaded.
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
Bridge firewalling registered
Ebtables v2.0 registered
Registering the dns_resolver key type
PM: Hibernation image not present or could not be loaded.
registered taskstats version 1
IMA: No TPM chip found, activating TPM-bypass!
Magic number: 2:369:777
rtc_cmos 00:03: setting system clock to 2010-11-02 09:47:18 UTC (1288691238)
Initalizing network drop monitor service
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
ata1: SATA link down (SStatus 0 SControl 300)
ata8: SATA link down (SStatus 0 SControl 300)
ata7: SATA link down (SStatus 0 SControl 300)
usb 8-1: new low speed USB device using uhci_hcd and address 2
ata2: SATA link down (SStatus 0 SControl 300)
usb 8-1: New USB device found, idVendor=046d, idProduct=c018
usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 8-1: Product: USB Optical Mouse
usb 8-1: Manufacturer: Logitech
input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.2/usb8/8-1/8-1:1.0/input/input3
generic-usb 0003:046D:C018.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1d.2-1/input0
ata3: SATA link down (SStatus 0 SControl 300)
ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata4.00: HPA detected: current 488395055, native 488397168
ata4.00: ATA-7: ST3250410AS, 3.AAC, max UDMA/133
ata4.00: 488395055 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 3:0:0:0: Direct-Access ATA ST3250410AS 3.AA PQ: 0 ANSI: 5
sd 3:0:0:0: Attached scsi generic sg0 type 0
sd 3:0:0:0: [sda] 488395055 512-byte logical blocks: (250 GB/232 GiB)
sd 3:0:0:0: [sda] Write Protect is off
sd 3:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 3:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 sda4
sd 3:0:0:0: [sda] Attached SCSI disk
ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata5.00: ATA-7: ST3250410AS, 3.AAC, max UDMA/133
ata5.00: 488397168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata5.00: configured for UDMA/133
scsi 4:0:0:0: Direct-Access ATA ST3250410AS 3.AA PQ: 0 ANSI: 5
sd 4:0:0:0: [sdb] 488397168 512-byte logical blocks: (250 GB/232 GiB)
sd 4:0:0:0: Attached scsi generic sg1 type 0
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: sdb1 sdb2 sdb3 sdb4
sd 4:0:0:0: [sdb] Attached SCSI disk
ata6: SATA link down (SStatus 0 SControl 300)
Freeing unused kernel memory: 1564k freed
Write protecting the kernel read-only data: 10240k
Freeing unused kernel memory: 1664k freed
Freeing unused kernel memory: 1904k freed
udevd (93): /proc/93/oom_adj is deprecated, please use /proc/93/oom_score_adj instead.
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
pata_jmicron 0000:03:00.1: enabling device (0000 -> 0001)
xen: registering gsi 17 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 17 for gsi 17
xen: --> irq=17
Already setup the GSI :17
pata_jmicron 0000:03:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
pata_jmicron 0000:03:00.1: setting latency timer to 64
scsi8 : pata_jmicron
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
xen: registering gsi 17 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 17 for gsi 17
xen: --> irq=17
Already setup the GSI :17
r8169 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
r8169 0000:02:00.0: setting latency timer to 64
r8169 0000:02:00.0: eth0: RTL8168c/8111c at 0xffffc90010554000, 90:e6:ba:2d:11:eb, XID 1c4000c0 IRQ 996
scsi9 : pata_jmicron
ata9: PATA max UDMA/100 cmd 0xdc00 ctl 0xd880 bmdma 0xd400 irq 17
ata10: PATA max UDMA/100 cmd 0xd800 ctl 0xd480 bmdma 0xd408 irq 17
ata9.00: ATAPI: Optiarc DVD RW AD-5200A, 1.03, max UDMA/66
ata9.00: configured for UDMA/66
scsi 8:0:0:0: CD-ROM Optiarc DVD RW AD-5200A 1.03 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
cdrom: Uniform CD-ROM driver Revision: 3.20
sr 8:0:0:0: Attached scsi CD-ROM sr0
sr 8:0:0:0: Attached scsi generic sg2 type 5
EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
Adding 3906556k swap on /dev/sdb2. Priority:-1 extents:1 across:3906556k
Adding 4095996k swap on /dev/mapper/vg_fedora13-LogVol02. Priority:-2 extents:1 across:4095996k
udev: starting version 151
shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
device eth0 entered promiscuous mode
r8169 0000:02:00.0: eth0: link up
r8169 0000:02:00.0: eth0: link up
br0: port 1(eth0) entering listening state
br0: port 1(eth0) entering listening state
lp: driver loaded but no devices found
xen: registering gsi 22 triggering 0 polarity 1
xen: --> irq=22
HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
HDA Intel 0000:00:1b.0: setting latency timer to 64
hda_codec: ALC1200: BIOS auto-probing.
ALSA sound/pci/hda/patch_realtek.c:1524: SKU: Nid=0x1d sku_cfg=0x4015e601
ALSA sound/pci/hda/patch_realtek.c:1526: SKU: port_connectivity=0x1
ALSA sound/pci/hda/patch_realtek.c:1527: SKU: enable_pcbeep=0x1
ALSA sound/pci/hda/patch_realtek.c:1528: SKU: check_sum=0x00000005
ALSA sound/pci/hda/patch_realtek.c:1529: SKU: customization=0x000000e6
ALSA sound/pci/hda/patch_realtek.c:1530: SKU: external_amp=0x0
ALSA sound/pci/hda/patch_realtek.c:1531: SKU: platform_type=0x0
ALSA sound/pci/hda/patch_realtek.c:1532: SKU: swap=0x0
ALSA sound/pci/hda/patch_realtek.c:1533: SKU: override=0x1
ALSA sound/pci/hda/hda_codec.c:4619: autoconfig: line_outs=4 (0x14/0x15/0x16/0x17/0x0)
ALSA sound/pci/hda/hda_codec.c:4623: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
ALSA sound/pci/hda/hda_codec.c:4627: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
ALSA sound/pci/hda/hda_codec.c:4628: mono: mono_out=0x0
ALSA sound/pci/hda/hda_codec.c:4631: dig-out=0x11/0x1e
ALSA sound/pci/hda/hda_codec.c:4632: inputs:
ALSA sound/pci/hda/hda_codec.c:4638:
ALSA sound/pci/hda/patch_realtek.c:1581: realtek: No valid SSID, checking pincfg 0x4015e601 for NID 0x1d
ALSA sound/pci/hda/patch_realtek.c:1597: realtek: Enabling init ASM_ID=0xe601 CODEC_ID=10ec0888
input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/input/input4
input: HDA Intel Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input5
xen: registering gsi 17 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 17 for gsi 17
xen: --> irq=17
Already setup the GSI :17
HDA Intel 0000:01:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
HDA Intel 0000:01:00.1: setting latency timer to 64
[drm] Initialized drm 1.1.0 20060810
[drm] radeon defaulting to kernel modesetting.
[drm] radeon kernel modesetting enabled.
xen: registering gsi 16 triggering 0 polarity 1
xen_map_pirq_gsi: returning irq 16 for gsi 16
xen: --> irq=16
Already setup the GSI :16
radeon 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
radeon 0000:01:00.0: setting latency timer to 64
[drm] initializing kernel modesetting (RV730 0x1002:0x9498).
[drm] register mmio base: 0xFE8E0000
[drm] register mmio size: 65536
ATOM BIOS: 11X
radeon 0000:01:00.0: VRAM: 512M 0x00000000 - 0x1FFFFFFF (512M used)
radeon 0000:01:00.0: GTT: 512M 0x20000000 - 0x3FFFFFFF
[drm] Detected VRAM RAM=512M, BAR=256M
[drm] RAM width 128bits DDR
[TTM] Zone kernel: Available graphics memory: 477200 kiB.
[TTM] Initializing pool allocator.
[drm] radeon: 512M of VRAM memory ready
[drm] radeon: 512M of GTT memory ready.
radeon 0000:01:00.0: radeon: using MSI.
[drm] radeon: irq initialized.
[drm] GART: num cpu pages 131072, num gpu pages 131072
[drm] Loading RV730 Microcode
radeon 0000:01:00.0: WB enabled
[drm] ring test succeeded in 1 usecs
[drm] radeon: ib pool ready.
[drm] ib test succeeded in 0 usecs
[drm] Enabling audio support
failed to evaluate ATIF got AE_BAD_PARAMETER
[drm] Radeon Display Connectors
[drm] Connector 0:
[drm] HDMI-A
[drm] HPD2
[drm] DDC: 0x7f10 0x7f10 0x7f14 0x7f14 0x7f18 0x7f18 0x7f1c 0x7f1c
[drm] Encoders:
[drm] DFP2: INTERNAL_UNIPHY1
[drm] Connector 1:
[drm] VGA
[drm] DDC: 0x7e20 0x7e20 0x7e24 0x7e24 0x7e28 0x7e28 0x7e2c 0x7e2c
[drm] Encoders:
[drm] CRT2: INTERNAL_KLDSCP_DAC2
[drm] Connector 2:
[drm] DVI-I
[drm] HPD1
[drm] DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 0x7e4c
[drm] Encoders:
[drm] CRT1: INTERNAL_KLDSCP_DAC1
[drm] DFP1: INTERNAL_UNIPHY
[drm] Internal thermal controller with fan control
[drm] radeon: power management initialized
[drm] fb mappable at 0xD0142000
[drm] vram apper at 0xD0000000
[drm] size 5242880
[drm] fb depth is 24
[drm] pitch is 5120
fbcon: radeondrmfb (fb0) is primary device
Console: switching to colour frame buffer device 160x64
fb0: radeondrmfb frame buffer device
drm: registered panic notifier
[drm] Initialized radeon 2.7.0 20080528 for 0000:01:00.0 on minor 0
EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
irqbalance[3491]: segfault at 4 ip 00007f33beb11116 sp 00007fffd40430c0 error 6 in libc-2.11.1.so[7f33bea6b000+17a000]
XENBUS: Unable to read cpu state
XENBUS: Unable to read cpu state
XENBUS: Unable to read cpu state
XENBUS: Unable to read cpu state
ppdev: user-space parallel port driver
br0: port 1(eth0) entering learning state
eth0: no IPv6 routers present
br0: no IPv6 routers present
virbr0: no IPv6 routers present
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
ip6_tables: (C) 2000-2006 Netfilter Core Team
lo: Disabled Privacy Extensions


Xen environment

host : ServerLLX
release : 2.6.37-rc1
version : #2 SMP Tue Nov 2 12:11:23 MSK 2010
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:0408e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8190
free_memory : 7070
node_to_cpu : node0:0-3
node_to_memory : node0:7070
node_to_dma32_mem : node0:3259
max_node_id : 0
xen_major : 4
xen_minor : 0
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 : dummy=dummy dom0_mem=1024M
cc_compiler : gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Tue Oct 5 12:06:55 MSD 2010
xend_config_format : 4


# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.90e6ba2d11eb yes eth0
virbr0 8000.000000000000 yes

# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 1024 4 r----- 14.7


Set up XenLinux kernel 2.6.34.7 aka Suse under Xen 4.0.1 on top of F14

October 25, 2010

Straight forward attempt to load 2.6.34.7 kernel xenified aka Suse under Fedora’s 14 Xen 4.0.1 generates following output to console :-

Starting udev: udevd-work[591]: kernel-provided name 'pci_iomul' and NAME= 'xen/pci_iomul' disagree, please use SYMLINK+= or change the kernel to provide the proper name

udevd-work[539]: kernel-provided name 'evtchn' and NAME= 'xen/evtchn' disagree, please use SYMLINK+= or change the kernel to provide the proper name

Situation described in [1] for pvops kernel on May 26 2010 now occurs for XenLinux kernel. In case [1],[2] all pvops xen backend devices have been renamed like xen_*. To get rid of messages above it’s also possible via patch xen-backend.rules keeping kernel’s names for xen backend devices the same

--- a/tools/hotplug/Linux/xen-backend.rules	2010-10-25 00:50:07.812223772 +0400
+++ b/tools/hotplug/Linux/xen-backend.rules	2010-10-24 23:58:22.000000000 +0400
@@ -6,6 +6,8 @@
 SUBSYSTEM=="xen-backend", KERNEL=="vif-*", ACTION=="offline", RUN+="$env{script} offline"
 SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="/etc/xen/scripts/vscsi $env{ACTION}"
 SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/etc/xen/scripts/xen-hotplug-cleanup"
-KERNEL=="evtchn", NAME="xen/%k"
+KERNEL=="evtchn", SYMLINK+="xen/%k"
 KERNEL=="blktap[0-9]*", NAME="xen/%k"
-KERNEL=="pci_iomul", NAME="xen/%k"
+KERNEL=="pci_iomul", SYMLINK+="xen/%k"
+KERNEL=="gntdev", SYMLINK+="xen/%k"
+KERNELS=="xen", KERNEL=="xvd*", SUBSYSTEM=="block", OPTIONS+="last_rule"

Download from the Net xen-4.0.1-6.fc14.src.rpm and install it. Add patch above as udev-rules.patch to /root/rpmbuild/SOURCES
folder and update /root/rpmbuild/SPECS/xen.spec correspondently to process this patch. Install ( or update) Xen 4.0.1 on F14 via

yum install xen-4.0.1-7.fc14.x86_64.rpm \
xen-debuginfo-4.0.1-7.fc14.x86_64.rpm \
xen-devel-4.0.1-7.fc14.x86_64.rpm \
xen-doc-4.0.1-7.fc14.x86_64.rpm \
xen-hypervisor-4.0.1-7.fc14.x86_64.rpm \
xen-libs-4.0.1-7.fc14.x86_64.rpm \
xen-licenses-4.0.1-7.fc14.x86_64.rpm \
xen-runtime-4.0.1-7.fc14.x86_64.rpm

Build 2.6.34.7 xenified aka Suse kernel. Download Andrew Lyon’s rebased patches set V.5 (2.6.34)

# cd /usr/src/xenLinux/
# wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.34-5.tar.bz2

Untar linux-2.6.34.7.tar.bz2 and apply patches.

# cd /usr/src/xenLinux/
# bzcat linux-2.6.34.7.tar.bz2 | tar xf -
# mkdir -p xen-patches-2.6.34-5
# cd xen-patches-2.6.34-5
# bzcat ../xen-patches-2.6.34-5.tar.bz2 | tar xf -
# cd ../linux-2.6.34.7

Run script

#!/bin/bash
for P in `ls ../xen-patches-2.6.34-5/6*.patch1 | sort `
do
patch -p1 -s -i $P
if [ $? = 0 ]; then
echo $P applied
else
echo "Error processing "$P
exit 1
fi
done

Build kernel :-

# make menuconfig
# make -j(x)(number_of_cores)
# make modules_install install
# dracut -f /boot/initramfs-2.6.34.7-0.5-xen.img 2.6.34.7-0.5-xen







Get .config file for x86_64

Modify /etc/rc.local as follows

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

if (uname -r |grep 2.6.34.7-0.5-xen) ; then
modprobe evtchn
modprobe blktap
modprobe blkbk
modprobe xenblk
modprobe netbk
modprobe gntdev
modprobe usbbk
fi
touch /var/lock/subsys/local

Setup Libvirt 0.8.3 :-

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

Reboot into Xen Environment :-

title Xen 4.0.1 Fedora (2.6.34.7-0.5-xen) (/dev/sda9)
root (hd0,8)
kernel /xen.gz dom0_mem=1024M
module /vmlinuz-2.6.34.7-0.5-xen ro root=/dev/mapper/vg_fedora14-lv_root LANG=US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us
module /initramfs-2.6.34.7-0.5-xen.img

Verify environment :-

[root@fedora14 ~]# ls -l /dev/xen
total 0
lrwxrwxrwx 1 root root 9 Oct 25 17:48 evtchn -> ../evtchn
lrwxrwxrwx 1 root root 9 Oct 25 17:48 gntdev -> ../gntdev
lrwxrwxrwx 1 root root 12 Oct 25 17:48 pci_iomul -> ../pci_iomul

[root@fedora14 ~]# xm info
host : fedora14
release : 2.6.34.7-0.5-xen
version : #3 SMP Mon Oct 25 13:29:54 MSD 2010
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 : 7083
node_to_cpu : node0:0-3
node_to_memory : node0:7083
node_to_dma32_mem : node0:3259
max_node_id : 0
xen_major : 4
xen_minor : 0
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 : dom0_mem=1024M
cc_compiler : gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Mon Oct 25 12:12:09 MSD 2010
xend_config_format : 4

[root@fedora14 ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.90e6ba2d11eb no eth0
virbr0 8000.000000000000 yes




References
1.http://lists.xensource.com/archives/html/xen-devel/2010-05/msg01310.html
2.http://lists.xensource.com/archives/html/xen-devel/2010-05/msg01379.html


XenLinux kernel 2.6.34.7 aka Suse under Xen 4.0.1 on top of Ubuntu 10.10 Desktop

October 17, 2010

Following post is a brief instruction of port 2.6.34.7 xenified aka Suse kernel to Ubuntu 10.10 desktop , to support Dom0 under Xen 4.0.1. Vanilla 2.6.34.7 gets patched via Andrew Lyon’s rebased patch set xen-patches-2.6.34-5.tar.bz2.
Kernel configuration is similar kernel-xen config on Suse’s 11.3 . Xen back-end,evtchn,gntdev divices get loaded via /etc/init.d/xend at startup. Xen 4.0.1 and Libvirt 0.8.3 installations are just the same as in [1].

# cd /usr/src/xenLinux/
# wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.34-5.tar.bz2

Untar linux-2.6.34.7.tar.bz2 and apply patches.

# cd /usr/src/xenLinux/
# bzcat linux-2.6.34.7.tar.bz2 | tar xf -
# mkdir -p xen-patches-2.6.34-5
# cd xen-patches-2.6.34-5
# bzcat ../xen-patches-2.6.34-5.tar.bz2 | tar xf -
# cd ../linux-2.6.34.7

Run script

#!/bin/bash
for P in `ls ../xen-patches-2.6.34-5/6*.patch1 | sort `
do
patch -p1 -s -i $P
if [ $? = 0 ]; then
echo $P applied
else
echo "Error processing "$P
exit 1
fi
done

Build kernel :-

# make menuconfig
# make -j(x)(number_of_cores)
# make modules_install install
# mkinitramfs -o /boot/initrd.img-2.6.34.7-0.3-xen 2.6.34.7-0.3-xen





Link to .config file

Update /etc/init.d/xend correspondently

case "$1" in
start)
mkdir -p /var/lock/subsys
touch /var/lock/subsys/xend
test -z "$XENSTORED_ROOTDIR" || export XENSTORED_ROOTDIR
test -z "$XENCONSOLED_TRACE" || export XENCONSOLED_TRACE
[[ "$XENSTORED_TRACE" == @(yes|on|1) ]] && export XENSTORED_TRACE
[[ "$XENBACKENDD_DEBUG" == @(yes|on|1) ]] && export XENBACKENDD_DEBUG
if (uname -r |grep 2.6.34.7-0.3-xen) ; then
modprobe evtchn
modprobe blktap
modprobe blkbk
modprobe xenblk
modprobe netbk
modprobe gntdev
modprobe usbbk
fi
xend start
await_daemons_up
;;

Build in Debian way is possible after applying hack from [2].
kernel.patch


root@boris-System-P5Q3:/usr/src3/linux-2.6.34.7# patch -p0 < kernel.patch
patching file arch/x86/Makefile
Hunk #1 succeeded at 154 (offset -1 lines).
Hunk #2 succeeded at 179 (offset 2 lines).

Now build and install linux-image

aptitude install kernel-package fakeroot
export CONCURRENCY_LEVEL=(number_of_cores) +1
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-0.4-xen kernel-image kernel-headers
dpkg -i ../linux-image-2.6.34.7-0.4-xen_2.6.34.7-0.4-xen-10.00.Custom_amd64.deb

At this point we are done with kernel . Next : disable Network manager

# chkconfig network-manager off
# gedit /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Restart netwoking :-

# /etc/init.d/networking restart

Install required packages

apt-get install libcurl4-openssl-dev \
xserver-xorg-dev \
mercurial gitk \
build-essential \
libncurses5-dev \
uuid-dev gawk \
gettext texinfo bcc \
libncurses5-dev dpkg-dev debhelper \
iasl texinfo bridge-utils bison flex
apt-get build-dep xen-3.3

Extract Xen 4.0.1 archive :-

cd /usr/src
gunzip xen-4.0.1.tar.gz
tar -xvf xen-4.0.1.tar
cd xen-4.0.1

Apply following patch to xen-4.0.1 folder

--- .orig/tools/hotplug/Linux/xen-backend.rules 2010-10-05 14:08:56.436012895 +0400
+++ /tools/hotplug/Linux/xen-backend.rules 2010-10-05 11:48:38.694087211 +0400
@@ -9,3 +9,5 @@
KERNEL=="evtchn", NAME="xen/%k"
KERNEL=="blktap[0-9]*", NAME="xen/%k"
KERNEL=="pci_iomul", NAME="xen/%k"
+KERNEL=="gntdev", NAME="xen/%k"
+KERNELS=="xen", KERNEL=="xvd*", SUBSYSTEM=="block", OPTIONS+="last_rule"

At this point create grub2-fix.patch1 as raw content of http://xenbits.xensource.com/xen-unstable.hg?rev/6eaab8297681 Changeset 22238 pygrub: support grub2 “(hdX,msdosY)” partition syntax

patch -p1 -s -i ../grub2-fix.patch1
make xen
make tools
make install-xen
make install-tools PYTHON_PREFIX_ARG=

Set up xend,xendomains to run as services

update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20

Create new Grub Entry and reboot into Xen environment :-

menuentry "Xen 4.0.1 / Ubuntu 10.10 kernel 2.6.34.7-0.3-xen" {
insmod ext2
set root='(hd1,9)'
multiboot (hd1,9)/xen.gz dummy=dummy dom0_mem=1024M
module (hd1,9)/vmlinuz-2.6.34.7-0.3-xen dummy=dummy root=/dev/sdb10 ro console=tty0
module (hd1,9)/initrd.img-2.6.34.7-0.3-xen
}



root@boris-System-P5Q3:~# xm info
host : boris-System-P5Q3
release : 2.6.34.7-0.3-xen
version : #1 SMP Sun Oct 17 16:22:51 MSD 2010
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:0408e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8190
free_memory : 7083
node_to_cpu : node0:0-3
node_to_memory : node0:7083
node_to_dma32_mem : node0:3259
max_node_id : 0
xen_major : 4
xen_minor : 0
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 : dummy=dummy dom0_mem=1024M
cc_compiler : gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Fri Oct 15 10:17:36 MSD 2010
xend_config_format : 4

root@boris-System-P5Q3:~# virsh version
Compiled against library: libvir 0.8.3
Using library: libvir 0.8.3
Using API: Xen 3.0.1
Running hypervisor: Xen 4.0.0



References
1. Set up Xen 4.0.1 & Libvirt 0.8.3 on top of Ubuntu 10.10 Desktop
2. http://lists.xensource.com/archives/html/xen-users/2010-09/msg00394.html


Set up Xen 4.0.1 & Libvirt 0.8.3 on top of Ubuntu 10.10 Desktop

October 15, 2010

Following bellow is brief instruction of mentioned set up loading xen back-end, evtchn, gntdev devices separately from pvops kernel 2.6.32.24 under Xen 4.0.1 on top Ubuntu Maverick Meerkat Desktop. Due to Desktop environment we have first to disable Network Manager and restart networking manually updating /etc/network/interfaces. This step is not required on the Ubuntu 10.10 Server. Libvirt 0.8.3 is available via Maverick Meerkat repositories. Two patches have been applied to official 4.0.1 tar’s ball. First one updates xen back-end rules, second one allows to load Ubuntu 10.10 PV Guest via standard trick with install same HVM first and using a ready image to load PV DomU via pygrub.

Disable Network manager

# chkconfig network-manager off
# gedit /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Restart netwoking :-

# /etc/init.d/networking restart

Install required packages

apt-get install libcurl4-openssl-dev \
xserver-xorg-dev \
mercurial gitk \
build-essential \
libncurses5-dev \
uuid-dev gawk \
gettext texinfo bcc \
libncurses5-dev dpkg-dev debhelper \
iasl texinfo bridge-utils bison flex
apt-get build-dep xen-3.3

Now git clone and checkout branch xen/stable

cd /usr/src
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
cd linux-2.6-xen
git checkout -b xen/stable-2.6.32.x origin/xen/stable-2.6.32.x

Build kernel in Debian way



Get .config file

aptitude install kernel-package fakeroot
export CONCURRENCY_LEVEL=(number_of_cores) +1
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-pv kernel-image kernel-headers
dpkg -i ../linux-image-2.6.32.24-pv_2.6.32.24-pv-10.00.Custom_amd64.deb

Edit /etc/modules

root@boris-System-P5Q3:~# cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
lp
rtc
xen-evtchn
xen-gntdev
xen-netback
xen-blkback
xenfs
blktap

Extract Xen 4.0.1 archive :-

cd /usr/src
gunzip xen-4.0.1.tar.gz
tar -xvf xen-4.0.1.tar
cd xen-4.0.1

Apply following patch to xen-4.0.1 folder

--- .orig/tools/hotplug/Linux/xen-backend.rules 2010-10-05 14:08:56.436012895 +0400
+++ /tools/hotplug/Linux/xen-backend.rules 2010-10-05 11:48:38.694087211 +0400
@@ -9,3 +9,5 @@
KERNEL=="evtchn", NAME="xen/%k"
KERNEL=="blktap[0-9]*", NAME="xen/%k"
KERNEL=="pci_iomul", NAME="xen/%k"
+KERNEL=="gntdev", NAME="xen/%k"
+KERNELS=="xen", KERNEL=="xvd*", SUBSYSTEM=="block", OPTIONS+="last_rule"

At this point create grub2-fix.patch1 as raw content of http://xenbits.xensource.com/xen-unstable.hg?rev/6eaab8297681 Changeset 22238 pygrub: support grub2 “(hdX,msdosY)” partition syntax

patch -p1 -s -i ../grub2-fix.patch1
make xen
make tools
make install-xen
make install-tools PYTHON_PREFIX_ARG=

Set up xend,xendomains to run as services

update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20

Reboot in Xen with grub entry

menuentry "Xen 4.0.1 / Ubuntu 10.10 kernel 2.6.32.24" {
insmod ext2
set root='(hd1,5)'
multiboot (hd1,5)/boot/xen.gz dummy=dummy dom0_mem=1024M
module (hd1,5)/boot/vmlinuz-2.6.32.24-pv dummy=dummy root=/dev/sdb5 ro console=tty0
module (hd1,5)/boot/initrd.img-2.6.32.24-pv
}

Verify Xen environment :-

root@boris-System-P5Q3:~# xm info
host : boris-System-P5Q3
release : 2.6.32.24-pv
version : #1 SMP Thu Oct 14 20:47:56 MSD 2010
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:0408e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8190
free_memory : 7070
node_to_cpu : node0:0-3
node_to_memory : node0:7070
node_to_dma32_mem : node0:3259
max_node_id : 0
xen_major : 4
xen_minor : 0
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 : dummy=dummy dom0_mem=1024M
cc_compiler : gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Fri Oct 15 10:17:36 MSD 2010
xend_config_format : 4

root@boris-System-P5Q3:~# brctl show
bridge name bridge id STP enabled interfaces
eth0 8000.90e6ba2d11eb no peth0
virbr0 8000.000000000000 yes

Install libvirt 0.8.3 :-

# apt-get install virtinst python-libvirt \
virt-viewer virt-manager

Comment out (xend-unix-server yes) in /etc/xen/xend-config.sxp and export variable VIRSH_DEFAULT_CONNECT_URI via root’s .bashrc

export VIRSH_DEFAULT_CONNECT_URI="xen:///"

Then reboot Xen Host.

root@boris-System-P5Q3:~# virsh version

Compiled against library: libvir 0.8.3
Using library: libvir 0.8.3
Using API: Xen 3.0.1
Running hypervisor: Xen 4.0.0





References
1.http://wiki.xen.org/xenwiki/Xen4.0
Tutorials to install Xen 4.0
* Xen 4.0 on Ubuntu 10.04: http://bderzhavets.wordpress.com/2010/04/24/set-up-ubuntu-10-04-server-pv-domu-at-xen-4-0-dom0-pvops-2-6-32-10-kernel-dom0-on-top-of-ubuntu-10-04-server/


Follow

Get every new post delivered to your Inbox.

Join 25 other followers