Deploy KVM + Open vSwitch + iSCSI + Ubuntu 12.04 x64

  • Hardware: HP Proliant ML115 G5 (1 AMD Opteron + 4GB RAM + 80GB SATA + 2 eth)
  • Install Ubuntu server 12.04 x64 from CD ROM + LVM + OpenSSH server + Virtualization host
  • Use eth1 as mangement interface and configure with static IP
  • Login by SSH client after reboot
  • Verify KVM CPU support
# kvm-ok 
INFO: /dev/kvm exists
KVM acceleration can be used
  • Upgrade packages to last version and add myuser to libvirtd group
# apt-get update
# apt-get upgrade
# adduser myuser libvirtd
# reboot
  • Verify KVM is up
$ virsh -c qemu:///system list
 Id Name                 State
  • Install Open vSwitch
# aptitude purge ebtables
# virsh net-destroy default
# virsh net-autostart --disable default
# service libvirt-bin stop
# service qemu-kvm stop

NOTE: If install Ubuntu from 12.04.3 LTS server (linux 3.8) you need to manually install “apt-get install openvswitch-datapath-lts-raring-dkms” before next step.

# aptitude install openvswitch-switch openvswitch-controller openvswitch-brcompat
# nano -w /etc/default/openvswitch-switch
# service openvswitch-switch restart
# service openvswitch-controller restart
# reboot
  • Verify modules and service:
$ lsmod | grep br
     brcompat_mod           13512  0 
     openvswitch_mod        83993  2 brcompat_mod

$ service openvswitch-switch status
     ovsdb-server is running with pid 1349
     ovs-vswitchd is running with pid 1358
     ovs-brcompatd is running with pid 1393
  • Configure Open vSwitch

Add bridge “br0” (libvirt compatibility) and connect to eth0 (untagged + VLANs tagged)

# ovs-vsctl add-br br0
# ovs-vsctl add-port br0 eth0

Add virtual bridges br2 (VLAN tag 2) and br3 (VLAN tag 3)

# ovs-vsctl add-br br2 br0 2
# ovs-vsctl add-br br3 br0 3

Add dummy entries in /etc/network/interfaces then reboot

# 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

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

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

Edit libvirt upstart script to wait for bridge:

# nano -w /etc/init/libvirt-bin.conf

     - start on runlevel [2345]
     + start on (runlevel [2345] and net-device-up IFACE=br0)

# reboot

Verify configuration

# ovs-vsctl show

    Bridge "br0"
        Port "eth0"
            Interface "eth0"
        Port "br3"
            tag: 3
            Interface "br3"
                type: internal
        Port "br2"
            tag: 2
            Interface "br2"
                type: internal
        Port "br0"
            Interface "br0"
                type: internal
    ovs_version: "1.4.0+build0"
  • Install and configure iSCSI initiator
# apt-get install open-iscsi
# nano -w /etc/iscsi/iscsid.conf
     node.startup = automatic
# /etc/init.d/open-iscsi restart

Discover targets

# iscsiadm -m discovery -t st -p iSCSIServerIP

Remove unwanted nodes

# rm -R /etc/iscsi/nodes/iqnxxxx

Configure auth for node

# nano -w /etc/iscsi/nodes/iqnyyyy/1234/default
     node.session.auth.authmethod = CHAP
     node.session.auth.username = user
     node.session.auth.password = password

# /etc/init.d/open-iscsi restart
  • HW monitor tools
# wget
# chmod +x
# ./ -v -r stable ProLiantSupportPack
# gpg --keyserver --recv-key 527BC53A2689B887 && gpg --export --armor 527BC53A2689B887 | sudo apt-key add -
# apt-get update
# apt-get install hp-health

# wget
# apt-get install alien
# alien --scripts -d hpacucli-9.10-22.0.x86_64.rpm
# dpkg -i hpacucli_9.10-23_amd64.deb
  • HW monitor tools UPDATE

Change apt source from

deb stable/current non-free


deb precise current/non-free


# apt-get update

# apt-get --only-upgrade install hp-health
# apt-get --only-upgrade install hpacucli

hypervisor/deploy.txt · Last modified: 2013/12/10 15:56 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ and Anna Perin (anna.perin _@_
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