设为首页收藏本站

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 385|回复: 0

Install a KVM host and configure KVM and Open vSwitch on Ubuntu 14.04

[复制链接]
发表于 2014-6-26 03:05:23 | 显示全部楼层 |阅读模式
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

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )  

GMT-8, 2025-8-26 11:16 , Processed in 0.014152 second(s), 18 queries .

Supported by Best Deal Online X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表