Upgrade LIBVIRT to 1.0.0 compiled (experimental)

Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-23-generic x86_64)
libvirt 0.9.8 (from package)
ovs_version: “1.4.0+build0” (from package)

  • Download souce code
# wget http://libvirt.org/sources/libvirt-1.0.0.tar.gz
# tar -xvzf libvirt-1.0.0.tar.gz
  • Install extra packages
# apt-get install libxml2-dev libgnutls-dev libyajl-dev libnl-dev pkg-config libdevmapper-dev python-dev
  • Compile
# ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-esx=no
# make
# make install
  • Edit libvirtd config
# diff /etc/libvirt/libvirtd.conf /etc/libvirt/libvirtd.conf.ORI

< unix_sock_group = "libvirtd"
> #unix_sock_group = "libvirt"

< unix_sock_rw_perms = "0770"
> #unix_sock_rw_perms = "0770"

< auth_unix_ro = "none"
> #auth_unix_ro = "none"

< auth_unix_rw = "none"
> #auth_unix_rw = "none"
  • Remove libvirt default network
# virsh net-destroy default
# virsh net-autostart --disable default
  • Edit OpenvSwitch conf
# nano -w /etc/default/openvswitch-switch
  • Edit OVS bridges

Leave only main bridge

# ovs-vsctl del-br br2
# ovs-vsctl del-br br3
  • Edit interfaces

Remove dummy entries in /etc/network/interfaces

# nano -w /etc/network/interfaces

auto eth0
iface eth0 inet manual
up ifconfig $IFACE up
down ifconfig $IFACE down

auto br0
iface br0 inet manual
up ifconfig $IFACE up
down ifconfig $IFACE down
  • Reboot
  • Configure KVM network
# nano -w mynet-ovs.xml
  <forward mode='bridge'/>
  <bridge name='br0'/>
  <virtualport type='openvswitch'/>
  <portgroup name='vmport0' default='yes'>
  <portgroup name='vmport2'>
    <vlan trunk='yes'>
      <tag id='0'/>
      <tag id='2'/>
      <tag id='3'/>
# virsh net-define mynet-ovs.xml
# virsh net-start 
  • VM network example
    <interface type='network'>
      <mac address='52:54:00:bd:6c:2a'/>
      <source network='ovs-network' portgroup='vmport0'/>
      <target dev='vnet0'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

x ⇒

hypervisor/exp1.txt · Last modified: 2012/11/15 13:37 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki