OVN - QOS
install vms
install two vms
rhel_version=rhel$(rpm -E %rhel)
# libvirt && kvm
yum -y install virt-install
yum -y install libvirt
yum install -y python3-lxml.x86_64
rpm -qa | grep qemu-kvm >/dev/null || yum -y install qemu-kvm
if (($rhel_version < 7)); then
service libvirtd restart
else
systemctl restart libvirtd
...
OVN - VLAN
可以设置localnet属于某个vlan,这样从localnet出去的报文都携带vlan id,
这样可以让连接到localnet所属交换机的VM属于某个vlan。
TOPO
outside outside
| |
|phy nic |phy nic
+--------------+------------+ +-------------+-------------+
|ovs bridge on hv0 | |ovs bridge on hv1 ...
OVN - TAG
如果虚拟机里面有容器,可以通过配置子接口的方式把container接入OVN网络,
就是创建容器的lsp的时候,把VM的VIF当作父接口。
当需要向容器发送报文时,先把报文发送到VM的VIF(进而找到HV),
然后再由HV上的ovs根据目的mac为报文打上vlan tag,发送到VM里面。
也就是说,这个tag只有ovs处理,外部看不到它。
而且假如vm1中的container1使用tag2,vm2中的container2使用tag3,他们之间也是可以通信的。
install vm
在两台机器上各安装两个虚拟机
rhel_version=rhel$(rpm -E %rhel)
# libvirt && kvm
yum -y install virt-instal...
OVN - NAT
OVN NAT只能配置到Gateway Router或Distributed Gateway Port上。
一个Router只能有一个Distributed Gateway Port.
install vm
在两台机器上各安装两个虚拟机
rhel_version=rhel$(rpm -E %rhel)
# libvirt && kvm
yum -y install virt-install
yum -y install libvirt
yum install -y python3-lxml.x86_64
rpm -qa | grep qemu-kvm >/dev/null || yum -y install qemu-kvm
if (($rhel_vers...
OVN - DNS
install vm
在两台机器上各安装两个虚拟机
rhel_version=rhel$(rpm -E %rhel)
# libvirt && kvm
yum -y install virt-install
yum -y install libvirt
yum install -y python3-lxml.x86_64
rpm -qa | grep qemu-kvm >/dev/null || yum -y install qemu-kvm
if (($rhel_version < 7)); then
service libvirtd restart
else
systemctl restart libvirtd
...
OVN - SSL
setup on central node
首先在central node生成CA
然后分别为nb、sb、switch创建private key和request
然后在centaral node(生成CA到机器)上对上一步生成的request进行签名,生成证书文件cert
然后把生成的pki/controllerca/cacert.pem and pki/switchca/cacert.pem 和private key和cert证书文件拷贝到其它computing node上
systemctl start ovn-northd
systemctl start ovn-controller
# 使用ovs-pki init --force生成controller CA和swit...
OVN - VM Migration
redhat doc
setup on central node
# stop firewalld selinux...
iptables -F
ip6tables -F
setenforce 0
systemctl --now disable firewalld
#systemctl stop NetworkManager
# start ovn
systemctl start openvswitch
systemctl start ovn-northd
ovn-sbctl set-connection ptcp:6642
ovn-nbctl set-connection ptcp:6641
ovs-vsctl set Open_vSwitch . external-ids:o...
VM Migration
redhat doc
shared storage setup
虚拟机迁移需要用到额外的共享存储。
迁移的过程中,源端把虚拟机内存和设备信息拷贝到共享存储上,目的端再从共享存储中获取。
可以搭建一个nfs服务器,让nfs服务器export /var/lib/libvirt/images,然后把迁移源端和目的端的/var/lib/libvirt/images目录都mount到nfs服务器。
这里面/var/lib/libvirt/images是创建虚拟机时指定的disk path,也可以使用其他路径。
因为机器有限,我这里把nfs服务放到源端。
# 启动nfs
[root@hp-dl388g8-22 ~]# echo "/var/lib/libvirt/images *.redhat...
共计 109 篇文章,14 页。