Saturday, October 05, 2013

Neutron basic RDO setup (havana 2013.2) to have original LAN as external on Fedora 19

*************************************
Update on 10/27/2013.  View also
*************************************

Neutron basic RDO setup (havana 2013.2) to have original LAN as external on Fedora 19 with native Ethernet interfaces names


 http://bderzhavets.blogspot.ru/2013/10/neutron-basic-rdo-setup-havana-20132-to_26.html

************************************

  Follow as normal   http://openstack.redhat.com/Quickstart, just after  

$ sudo yum install -y openstack-packstack run  $ sudo yum -y update  one more time to upgrade python-backports to 1.0.4 

Post install fix (as of 10/31/2013) :

Also set  ALLOWED_HOSTS = ['*']  in /etc/openstack-dashboard/local_settings and restart  httpd

When done switch to eth0 per
http://unix.stackexchange.com/questions/81834/how-can-i-change-the-default-ens33-network-device-to-old-eth0-on-fedora-19

    Remove biosdevname if it is installed. (yum remove biosdevname)
    Disable the udev rule:
      ln  -s /dev/null    /etc/udev/rules.d/80-net-name-slot.rules
    Reboot

and  create under /etc/sysconfig/network-scripts

[root@localhost network-scripts]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="static"
IPADDR="192.168.1.125"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
ONBOOT="yes"
TYPE="OVSBridge"
DEVICETYPE="ovs"


[root@localhost network-scripts]# cat ifcfg-eth0
NAME="eth0"
HWADDR=90:E6:BA:2D:11:EB
ONBOOT="yes"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

Enable network service, turn off interface eth0

********************************
UPDATE on 12/17/2013
********************************

It's working again



  

 

[root@openstack1 ~(keystone_admin)]# ovs-vsctl show
5e1fc460-3882-4210-b185-310e00af8a47
    Bridge br-int
        Port br-int
            Interface br-int
                type: internal
        Port "tapf7dd77e3-50"
            tag: 1
            Interface "tapf7dd77e3-50"
                type: internal
        Port "qr-33f43f85-da"
            tag: 1
            Interface "qr-33f43f85-da"
                type: internal
    Bridge br-ex
        Port "qg-161a8f7c-01"
            Interface "qg-161a8f7c-01"
                type: internal
        Port br-ex
            Interface br-ex
                type: internal
        Port "eth0\nbr-ex"
            Interface "eth0\nbr-ex"
        Port "eth0"
            Interface "eth0"
    ovs_version: "1.11.0"


**************************************************************************

Due to known bugs

Bug 981583 - Openstack firewall rules are not enabled after reboot
  https://bugzilla.redhat.com/show_bug.cgi?id=981583

Bug 981652 - firewalld does not cover openstack/packstack use case.    
  https://bugzilla.redhat.com/show_bug.cgi?id=981652

Run:-

# yum -y install iptables-services
# systemctl disable firewalld
# systemctl enable iptables

then  reboot

In dashboard environment delete router1 and public network.

# source keystonerc_admin
# nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
# nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
# neutron net-create public --router:external=True
# neutron subnet-create public 192.168.1.0/24 --name vlan --enable_dhcp False \
   --allocation_pool start=192.168.1.57,end=192.168.1.92  \
   --gateway 192.168.1.1
# neutron floatingip-create public

# EXTERNAL_NETWORK_ID=`neutron net-list | grep public | awk '{ print $2 }'`
# INT_SUBNET_ID=`neutron subnet-list | grep private_subnet | awk '{ print $2}'`
# SERVICE_TENANT_ID=`keystone tenant-list | grep service | awk '{ print $2}'`
# neutron router-create --name router2 --tenant-id $SERVICE_TENANT_ID router2
# neutron router-gateway-set router2  $EXTERNAL_NETWORK_ID
# neutron router-interface-add router2  $INT_SUBNET_ID
# neutron subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# neutron subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1

Create images via command line :-

# glance image-create --name 'Fedora19image' --disk-format qcow2 --container-format bare --is-public true \
--copy-from http://cloud.fedoraproject.org/fedora-19.x86_64.qcow2

# glance image-create --name 'UbuntuServer13.10image' \
  --disk-format qcow2 \
 --container-format bare --is-public true \
 --copy-from http://cloud-images.ubuntu.com/saucy/current/saucy-server-cloudimg-amd64-disk1.img

You can also fix the issue per

http://openstack.redhat.com/forum/discussion/554/havana-horizon-no-formats-available-for-images

Creating volumes on Havana release


By default (not to follow [1]) cinder-volumes VG gets created under
/var/lib/cinder as loop mounted empty file due to :-

[root@localhost ~(keystone_admin)]# cd /var/lib/cinder

[root@localhost cinder(keystone_admin)]# ls -l
total 16777236
-rw-r--r--. 1 root   root   22118662144 Oct  7 16:04 cinder-volumes
drwxr-xr-x. 2 cinder cinder        4096 Oct  7 15:48 tmp

[root@localhost cinder(keystone_admin)]# losetup -a

/dev/loop0: [64768]:6034065 (/srv/loopback-device/device1)
/dev/loop1: [64768]:918092 (/var/lib/cinder/cinder-volumes)


[root@localhost ~(keystone_admin)]# nova image-list
+--------------------------------------+------------------------+--------+--------+
| ID                                   | Name                   | Status | Server |
+--------------------------------------+------------------------+--------+--------+
| 73ddfddf-833d-4eda-869f-e26321c20a2e | Fedora19image  | ACTIVE |        |
| 2d5f5596-c5f5-401a-ae16-388b5dae78f2 | UbuntuServer13.10image | ACTIVE           
| 0415ec26-d202-4fb7-b6a0-3e7923547e98 | cirros                 | ACTIVE |        |
+--------------------------------------+------------------------+--------+--------+

[root@localhost ~(keystone_admin)]# cinder create --image-id 2d5f5596-c5f5-401a-ae16-388b5dae78f2  --display_name SalamanderVG 7

+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova             |
|       bootable      |                False                 |
|      created_at     |      2013-10-07T11:39:32.001108      |
| display_description |                 None         |
|     display_name    |        SlamanderVG       |
|          id         | 624f7b78-bb1e-411a-afc6-e3190187af38 |
|       image_id      | 2d5f5596-c5f5-401a-ae16-388b5dae78f2 |
|       metadata      |                  {}                  |
|         size        |                  7                          |
|     snapshot_id     |                 None             |
|     source_volid    |                 None             |
|        status       |               creating               |
|     volume_type     |                 None            |
+---------------------+--------------------------------------+

[root@localhost ~(keystone_admin)]# nova volume-list
+--------------------------------------+-------------+--------------+------+-------------+-------------+
| ID                                   | Status      | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-------------+--------------+------+-------------+-------------+
| 624f7b78-bb1e-411a-afc6-e3190187af38 | downloading | SalamanderVG | 7    | None        |             |
+--------------------------------------+-------------+--------------+------+-------------+-------------+

[root@localhost ~(keystone_admin)]# cinder create --image-id 73ddfddf-833d-4eda-869f-e26321c20a2e  --display_name Fedora19VG 7

+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova             |
|       bootable      |                False                 |
|      created_at     |      2013-10-07T11:42:32.708633      |
| display_description |                 None         |
|     display_name    |              Fedora19VG   |
|          id         | d2745ee6-9166-4ace-9fb6-826999eddcd0 |
|       image_id      | 73ddfddf-833d-4eda-869f-e26321c20a2e |
|       metadata      |                  {}                  |
|         size        |                  7                         |
|     snapshot_id     |                 None             |
|     source_volid    |                 None             |
|        status       |               creating               |
|     volume_type     |                 None             |
+---------------------+--------------------------------------+

[root@localhost ~(keystone_admin)]# nova volume-list

+--------------------------------------+-------------+--------------+------+-------------+-------------+
| ID                                   | Status      | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-------------+--------------+------+-------------+-------------+
| d2745ee6-9166-4ace-9fb6-826999eddcd0 | downloading | Fedora19VG   | 7    | None        |             |
| 624f7b78-bb1e-411a-afc6-e3190187af38  | available   | SalamanderVG     | 7   | None        |             |
+--------------------------------------+-------------+--------------+------+-------------+-------------+

[root@localhost ~(keystone_admin)]# nova volume-list

+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
| ID                                   | Status | Display Name | Size | Volume Type | Attached to                          |
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
| d2745ee6-9166-4ace-9fb6-826999eddcd0 | in-use | Fedora19VG   | 7    | None        | 5dc6569f-42d8-49fb-a3d5-7f3089249952 |
| 624f7b78-bb1e-411a-afc6-e3190187af38 | in-use | SalamanderVG | 7    | None        | 3e0a32b4-1045-4d30-9921-b1c2c5140639 |
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+

[root@localhost ~(keystone_admin)]# pvscan | grep cinder-volumes
  PV /dev/loop1   VG cinder-volumes   lvm2 [20.60 GiB / 6.60 GiB free]





   Status of  RDO Havana 6 services


  





Cloud instance of Ubuntu 13.10 Server running Gnome 3.8.4 installed via  PPA    ppa:gnome3-team/gnome3 :
  1. $ sudo add-apt-repository ppa:gnome3-team/gnome3
  2. $ sudo apt-get update
  3. $sudo apt-get install gnome-shell ubuntu-gnome-desktop
View http://www.techrepublic.com/blog/linux-and-open-source/how-to-install-gnome-38-on-ubuntu/ regarding setup Gnome 3.8 on Ubuntu 13.04 (10)



REFERENCES

1. http://funwithlinux.net/2013/08/install-openstack-grizzly-on-fedora-19-using-packstack-with-quantum-networking/

 2. http://www.blog.sandro-mathys.ch/2013/08/install-rdo-havana-2-on-fedora-19-and.html

Monday, September 16, 2013

Quantum basic RDO setup (grizzly) to have original LAN as external on Fedora 19

Follow as normal http://openstack.redhat.com/Neutron-Quickstart
When done switch to eth0 per
http://unix.stackexchange.com/questions/81834/how-can-i-change-the-default-ens33-network-device-to-old-eth0-on-fedora-19

  1. Remove biosdevname if it is installed. (yum remove biosdevname)
  2. Disable the udev rule: ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
  3. Reboot
and  create under /etc/sysconfig/network-scripts
[root@localhost network-scripts]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="static"
IPADDR="192.168.1.52"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
ONBOOT="yes"
TYPE="OVSBridge"
DEVICETYPE="ovs"

[root@localhost network-scripts]# cat ifcfg-eth0
NAME="eth0"
HWADDR=90:E6:BA:2D:11:EB
ONBOOT="no"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

Enable network service
REBOOT

Turn off interface eth0 , update ONBOOT="no" to ONBOOT="yes"
in ifcfg-eth0, then  restart network service





In dashboard environment delete router1 and public network.
Create router2 and internal interface to private network.

#   source keystonerc_admin
#   nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#   nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
#   quantum net-create public --router:external=True
#   quantum subnet-create public 192.168.1.0/24 --name vlan \
     --enable_dhcp False --allocation_pool  \
     start=192.168.1.57, end=192.168.1.62  \
     --gateway 192.168.1.1
#  quantum floatingip-create public


Next step
# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# quantum router-gateway-set router2  $EXTERNAL_NETWORK_ID
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1

 Router2 and internal interface to private network may be also created via CLI:

# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# SERVICE_TENANT_ID=`keystone tenant-list | grep service | awk '{ print $2}'`
# quantum router-create --name router2 --tenant-id $SERVICE_TENANT_ID router2
# quantum router-gateway-set router2  $EXTERNAL_NETWORK_ID
# quantum router-interface-add router2  $INT_SUBNET_ID
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1

View  http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup/p1



To make configuration persistent between reboots due to known bugs

Bug 981583 - Openstack firewall rules are not enabled after reboot
  https://bugzilla.redhat.com/show_bug.cgi?id=981583

Bug 981652 - firewalld does not cover openstack/packstack use case.     
  https://bugzilla.redhat.com/show_bug.cgi?id=981652

Run:-
 
# yum -y install iptables-services
# systemctl disable firewalld
# systemctl enable iptables








Cloud instance of Ubuntu 13.10 Server running Gnome 3.8.1 installed via  PPA    ppa:gnome3-team/gnome3 :
  1. $ sudo add-apt-repository ppa:gnome3-team/gnome3
  2. $ sudo apt-get update
  3. $sudo apt-get install gnome-shell ubuntu-gnome-desktop
View http://www.techrepublic.com/blog/linux-and-open-source/how-to-install-gnome-38-on-ubuntu/ regarding setup Gnome 3.8 on Ubuntu 13.04 (10)





Setup Windows Server 2012 evaluation cloud instance

# gunzip -cd windows_server_2012_standard_eval_kvm_20130510.qcow2.gz |
 glance image-create --property hypervisor_type=kvm --name "Windos Server2012 Std Eval"  --container-format bare --disk-format vhd


+--------------------------------------------+----------------------------------------+
| Property                              | Value                                |
+--------------------------------------------+----------------------------------------+
| Property 'hypervisor_type' | kvm                                  |
| checksum                            | 801d232ea89f74810284c88b1512a32a   
| container_format                | bare                                 |
| created_at                           | 2013-09-23T13:05:44       |
| deleted                                | False                                |
| deleted_at                           | None                                |
| disk_format                         | vhd                                   |
| id                                          | 32ae031d-3bc0-4a38-a355-f9a8fa8be6e6
| is_public                              | False                                |
| min_disk                              | 0                                       |
| min_ram                              | 0                                       |
| name                                   |  Windos Server 2012 Std Eval       

|owner                                   | f0001a9a94f741dfa1545f2682d01fde  
| protected                            | False                                 |
| size                                      | 16337731584                    |
| status                                  | active                                |
| updated_at                         | 2013-09-23T13:10:29        |
+-------------------------------------------+-----------------------------------------+

Getting password for Admin :

# nova list
+--------------------------------------+----------------+-----------+--------------------------------------------+
| ID                                    | Name      | Status  | Networks                            |
+--------------------------------------+----------------+-----------+--------------------------------------------+
| c0b65e09-7195-4c10-bce3-2c4c7aca7cea | UbuntuSRV13.10 | SUSPENDED | InternalNetwork=192.168.12.2, 192.168.1.62 |
| 019ce45c-5586-4e46-8db0-68cfc9777049 | VF19BD         | SUSPENDED | private=10.0.0.3, 192.168.1.58             |
| 59070632-c37d-4a60-8ee7-9bc4db3960ed | WinSRV2012     | SUSPENDED | private=10.0.0.4, 192.168.1.59             |
+--------------------------------------+----------------+-----------+--------------------------------------------+

# nova get-password   WinSRV2012 /home/boris/Downloads/key2.pem



Remote noVNC access to cloud instances

[root@localhost ~(keystone_admin)]# nova list
+--------------------------------------+------------+-----------+--------------------------------+
| ID                                   | Name       | Status    | Networks                       |
+--------------------------------------+------------+-----------+--------------------------------+
| 27616e5c-a08d-4c18-8366-038a03dec77c | Ubuntu1310 | ACTIVE    | private=10.0.0.6, 192.168.1.63 |
| ca57df26-ae59-4ea0-a9c3-b21b1e862947 | VF19BD     | SUSPENDED | private=10.0.0.3, 192.168.1.59 |
| d37ccd48-0ba4-4e28-aa0b-eb43deb8b948 | WinSRV2012 | ACTIVE    | private=10.0.0.5, 192.168.1.61 |
+--------------------------------------+------------+-----------+--------------------------------+
[root@localhost ~(keystone_admin)]# nova get-vnc-console 27616e5c-a08d-4c18-8366-038a03dec77c novnc
+-------+------------------------------------------------------------------------------------+
| Type  | Url                                                                                |
+-------+------------------------------------------------------------------------------------+
| novnc | http://192.168.1.145:6080/vnc_auto.html?token=8a6dbade-e4f0-4c6d-8ee7-dab8bb34fa32 |
+-------+------------------------------------------------------------------------------------+
[root@localhost ~(keystone_admin)]# nova get-vnc-console d37ccd48-0ba4-4e28-aa0b-eb43deb8b948 novnc
+-------+------------------------------------------------------------------------------------+
| Type  | Url                                                                                |
+-------+------------------------------------------------------------------------------------+
| novnc | http://192.168.1.145:6080/vnc_auto.html?token=796ef47d-ecb7-40c2-be0f-032f85afe445 |
+-------+------------------------------------------------------------------------------------+







Sunday, September 15, 2013

Quantum basic RDO setup (grizzly) to have original LAN as external on CentOS 6.4

Attempting to follow http://allthingsopen.com/2013/08/23/openstack-packstack-installation-with-external-connectivity/I've got an error after starting :-
# packstack --allinone --quantum-l3-ext-bridge=eth0
It reports that ovs port eth0 already exists. Approach bellow in general follows RDO's  discussion
at http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup/p1
Follow as normal http://openstack.redhat.com/Neutron-Quickstart
When done create under /etc/sysconfig/network-scripts


[root@Server64 network-scripts]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="none"
IPADDR="192.168.1.42"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
ONBOOT="yes"
TYPE="OVSBridge"
DEVICETYPE="ovs"

[root@Server64 network-scripts]# cat ifcfg-eth0
DEVICE="eth0"
ONBOOT="yes"
# HWADDR="1C:C1:DE:76:19:70"
HWADDR="00:22:15:63:E4:E2"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

Run script as root :-

for i in /etc/quantum/*.ini
do
    sed -i "s/^[# ]*ovs_use_veth.*$/ovs_use_veth = True/g" $i
done

sed -i \
    -e "s/^[# ]*enable_isolated_metadata.*$/enable_isolated_metadata = True/g" \
    -e "s/^[# ]*enable_metadata_network.*$/enable_metadata_network = True/g"  \
    /etc/quantum/dhcp_agent.ini


# chkconfig network on

REBOOT
Disable autoconnect eth0.
REBOOT

Remove old puplic (external network) and create new one as required.
Recreate router in dashboard environment and add internal interface to
private network

#   source keystonerc_admin
#   nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#   nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
#   quantum net-create public --router:external=True
#   quantum subnet-create public 192.168.1.0/24 --name vlan --enable_dhcp False --allocation_pool start=192.168.1.57,end=192.168.1.62 \
    --  gateway 192.168.1.1
#   quantum floatingip-create public

#   quantum net-list
[root@Server64 ~(keystone_admin)]# quantum router-list
+--------------------------------------+---------+--------------------------------------------------------+
| id                                   | name    | external_gateway_info                   |
+--------------------------------------+---------+--------------------------------------------------------+
| c56c1cc1-a11b-454c-9ccb-17dc7e62f475 | router1 |
+--------------------------------------+---------+--------------------------------------------------------+

[root@Server64 ~(keystone_admin)]# quantum net-list
+--------------------------------------+---------+-----------------------------------------------------+
| id                                   | name    | subnets                                       |
+--------------------------------------+---------+-----------------------------------------------------+
| 6823b670-231c-4b31-9325-12dc098087b2 | private | 203320cc-cd60-486d-b092-eec99740c4cc 10.0.0.0/24    |
| c9615975-beb4-461a-9aad-b740a3350bf5 | public  | 40568df0-9bae-4578-8ae9-56d0ae7d4a2e 192.168.1.0/24 |
+--------------------------------------+---------+-----------------------------------------------------+

#   quantum router-gateway-set c56c1cc1-a11b-454c-9ccb-17dc7e62f475 c9615975-beb4-461a-9aad-b740a3350bf5

[root@Server64 ~(keystone_admin)]# quantum subnet-list
+--------------------------------------+----------------+----------------+--------------------------------------------------+
| id                                   | name           | cidr           | allocation_pools                                 |
+--------------------------------------+----------------+----------------+--------------------------------------------------+
| 203320cc-cd60-486d-b092-eec99740c4cc | private_subnet | 10.0.0.0/24    | {"start": "10.0.0.2", "end": "10.0.0.254"}       |
| 40568df0-9bae-4578-8ae9-56d0ae7d4a2e | vlan           | 192.168.1.0/24 | {"start": "192.168.1.57", "end": "192.168.1.62"} |
+--------------------------------------+----------------+----------------+--------------------------------------------------+

[root@Server64 ~(keystone_admin)]#  quantum subnet-update 203320cc-
cd60-486d-b092-eec99740c4cc  --dns_nameservers list=true 83.221.202.254
Updated subnet: 203320cc-cd60-486d-b092-eec99740c4cc

[root@RServer64 ~(keystone_admin)]#  quantum subnet-update 203320cc-cd60-486d-b092-eec99740c4cc  --gateway_ip 10.0.0.1
Updated subnet: 203320cc-cd60-486d-b092-eec99740c4cc


 In other way it may look like :-

# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# quantum router-gateway-set router1 $EXTERNAL_NETWORK_ID
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1














References
1.http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup

Saturday, March 17, 2012


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



Build requires spice-protocol 0.10.1 and the most recent usbredir 0.4.2
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

****************
Link to PPA
****************

$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir68
$ 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

Wednesday, January 18, 2012


Set up Spice-Gtk 0.8 (USB Redirection support) 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 Qemu-kvm 1.0 & Spice-protocol 0.10.1 & Spice-Gtk 0.8 USB Redirection on Ubuntu Precise
View also PPA Set up Spice-Gtk 0.8 on Ubuntu Precise
******************************************************************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir58
$ 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

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

Friday, January 13, 2012

Tuesday, December 06, 2011


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



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 git://git.libusb.org/libusb.git – 1.0.9-rc1
libusb-1.0.9-rc1 release candidate.

Qemu-kvm 1.0-rc2 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-usbredir38
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
spice-client 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
$ 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

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'>


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















Tuesday, November 15, 2011


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



*****************************************************************************************
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)
******************************************************************************************
Qemu-kvm 0.15.1 & Spice(0.10.0) & Libvirt 0.9.7-2 USB Redirection support for Ubuntu Oneiric Link for Oneiric PPA.
******************************************************************************************
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)

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

To start default network :-

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

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









Tuesday, October 18, 2011


Set up Qemu&Spice&Libvirt 0.9.6 USB Redirection on Ubuntu 11.10 (Oneiric Ocelot)



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.61 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.61 is built up on mentioned git repository via Debian's 0.7-3 schema. 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.

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





**************************************
To install packages from PPA
**************************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir19
$ 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

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

Upgrade libvirt up to 0.9.6

sudo apt-get install libvirt-bin libvirt-dev libvirt-doc \
libvirt0 libvirt0-dbg python-libvirt libxen-dev

To start default network :-

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

After libvirt upgrade virsh will support of Qemu&Spice USB Redirection.It allows 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′>

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.









Thursday, October 13, 2011


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



***************************************************************************************
UPDATE on 10/14/2011. Oops ! Works on final release Ubuntu 11.10 .
I forgot, that 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





***************************************************************************************
I have been working on it for the most recent two weeks debianizing stuff
from Hans de Goede blog entry at http://planet.spice-space.org/

View PPAs :

ppa:bderzhavets/lib-usbredir15
ppa:bderzhavets/lib-usbredir16
ppa:bderzhavets/lib-usbredir17
ppa:bderzhavets/lib-usbredir18

utilizing daily builds of Oneric.
Install :-
Qemu-kvm 0.15 with usbredir support has been built per http://planet.spice-space.org/
via Hans de Goede git repository:-

$ 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

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/

Spice-Gtk-0.7.6X follows Debian's 0.7-3 packaging schema

*****************************
To install packages from PPA
*****************************
$ sudo add-apt-repository ppa:bderzhavets/lib-usbredir18
$ 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

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



Shift + Left click to view the picture in details . It's important








USB pen plugged in and redirected to KVM locally :








In this case KVM Server with usb network redirection enabled and Spice-Gtk-0.7.60 are
running on the same instance on Oneiric . But network redirection also works fine . View :-


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


Qemu&Spice USB redirection does work on final release of Ubuntu 11.10.