|
2014年1月6日
CloudStack kvm with OpenVSwitch
https://cwiki.apache.org/confluence/display/CLOUDSTACK/KVM+with+OpenVSwitch
CentOS 6.4
openvswitch v 1.9
Installation
yum groupinstall Virtualization "Virtualization Client" "Virtualization Platform" "Virtualization Tools"
Verify Installation. The following packages should be installed
hypervkvpd.x86_64 0:0-0.9.el6
libguestfs.x86_64 1:1.16.34-2.el6
libvirt.x86_64 0:0.10.2-18.el6_4.3
libvirt-client.x86_64 0:0.10.2-18.el6_4.3
python-virtinst.noarch 0:0.600.0-15.el6
qemu-kvm.x86_64 2:0.12.1.2-2.355.0.1.el6.centos.2
virt-manager.x86_64 0:0.9.0-18.el6
virt-top.x86_64 0:1.0.4-3.15.el6
virt-viewer.x86_64 0:0.5.2-18.el6_4.2
Modify libvirt configuration
Edit /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp = 1
tcp_port = "16059"
auth_tcp = "none"
mdns_adv = 0
Edit /etc/sysconfig/libvirtd
LIBVIRTD_ARGS="--listen"
Start libvirtd
/etc/init.d/libvirtd start
/etc/init.d/libvirtd status
Verify installation:
# virsh capabilities
Build and install openvswitch:
# yum install rpmdevtools openssl-devel kernel-devel gcc redhat-rpm-config
Build packages:
# mkdir -p ~/rpmbuild/SOURCES
# curl -O http://openvswitch.org/releases/openvswitch-1.9.0.tar.gz
# cp openvswitch-1.9.0.tar.gz ~/rpmbuild/SOURCES
# cp centos64-openvswitch.patch ~/rpmbuild/SOURCES
# tar -xzf openvswitch-1.9.0.tar.gz
# cd openvswitch-1.9.0
# patch -p1 < ~/rpmbuild/SOURCES/centos64-openvswitch.patch
# rpmbuild -bb rhel/openvswitch.spec
# rpmbuild -bb -D "kversion `uname -r`" rhel/openvswitch-kmod-rhel6.spec
Install openvswitch:
# yum install ~/rpmbuild/RPMS/x86_64/kmod-openvswitch-1.9.0-1.el6.x86_64.rpm ~/rpmbuild/RPMS/x86_64/openvswitch-1.9.0-1.x86_64.rpm
# echo 'blacklist bridge' >> /etc/modprobe.d/blacklist.conf
# reboot
Verify installation
# lsmod |grep openvswitch
# ovs-vsctl -V
Network design:
cloudbr0 (Management, Storage)
ip: 172.16.10.10/24
gateway: 172.16.10.1
eth0 (physical port, no vlans)
cloudbr1 (Guest, Public)
eth1 (physical port, vlan trunk)
ip: none
Configure network interfaces:
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
IPV6INIT=no
NM_CONTROLLED=no
ONBOOT=yes
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=cloudbr0
/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
IPV6INIT=no
NM_CONTROLLED=no
ONBOOT=yes
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=cloudbr1
/etc/sysconfig/network-scripts/ifcfg-cloudbr0
DEVICE=cloudbr0
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=172.16.10.10
GATEWAY=172.16.10.1
NETMASK=255.255.255.0
HOTPLUG=no
/etc/sysconfig/network-scripts/ifcfg-cloudbr1
DEVICE=cloudbr1
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=none
HOTPLUG=no
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=testkvm1
GATEWAY=172.10.10.1
Install cloudstack-agent
# yum install cloudstack-agent
Edit /etc/cloudstack/agent/agent.properties
network.bridge.type=openvswitch
libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.OvsVifDriver
Now add the host to cloudstack.
일단 정리만 ㅋㅋㅋ 나중에 꼭 해봐야지 ~ |
|
|
|
|
|
|