|
How to install a KVM host and configure KVM with libvirt and Open vSwitch on Ubuntu 14.04 Trusty Tahr. The following steps have been tested on freshly installed server installation. Let’s start from scratch by installing all required packages.
Install required packages# apt-get install openvswitch-switch qemu-kvm libvirt-binAnd wait until all packages are downloaded and installed.
Afterwards, let’s continue by destroying the default bridge and creating the new ovs bridge.
Setup networking# ovs-vsctl add-br ovsbr0# virsh net-destroy defaultEdit the config from the default bridge with this command.
# virsh net-edit defaultAnd make sure, you change the file to this:
<network><name>ovsbr0</name><forward mode='bridge'/><bridge name='ovsbr0'/><virtualport type='openvswitch'/></network>Remove the old bridge completely and make sure the new bridge is autostarted.
# virsh net-undefine default# virsh net-autostart ovsbr0I’d like to keep my networking configuration in /etc/network/interfaces. That’s why I added the following section to that file.
auto ovsbr0iface ovsbr0 inet static address 172.16.11.1 network 172.16.11.0 netmask 255.255.255.0 broadcast 172.16.11.255iface ovsbr0 inet6 static address 2001:xxxx:xxxx:1::1 netmask 64
Test new installed KVM hostNow reboot your machine and check with following commands if you’re network is properly configured.
# virsh net-list# ip addr# ovs-vsctl showCongratulations! You’ve installed a KVM host. Now you can proceed and install virtual machines on this new host. The network interfaces will be added to the freshly created Open vSwitch bridge.
Edit on 2014/05/14 : changed the ovsbr0 XML file
Edit in 2014/05/28 : only tested on a Server installation of Ubuntu 14.04
|
|