我有两个节点和两个虚拟机
kvm01
-nic1 123.123.123.1
VM1
-vnet1 123.123.123.2 (public) -vnet2 10.0.0.1 (private)
kvm02
-nic1 123.123.123.2
VM2
-vnet1 123.123.123.4 (public) -vnet2 10.0.0.2 (private)
Run Code Online (Sandbox Code Playgroud)
如何设置 openvswitch 网络,以便 VM1 和 VM2 位于专用网络上,但主机位于两个不同的位置?
编辑:
运行此命令:
# ovs-vsctl add-port br-private vxlan1 -- \
set Interface vxlan1 type=vxlan options:remote_ip=123.123.123.2
Run Code Online (Sandbox Code Playgroud)
导致此 OVS 配置:
root@backup01:~# ovs-vsctl show
6276bd0a-920b-469d-a4e0-90d990dd8f94
Bridge "br-private1"
Port "vxlan1"
Interface "vxlan1"
type: vxlan
options: {remote_host="107.150.29.72"}
Port "br-private1"
Interface "br-private1"
type: internal
ovs_version: "2.3.0"
root@kvmssd01:~# ovs-vsctl show
da6399d4-1435-437d-90d7-3e75c443389b
Bridge br-private
Port "vxlan1"
Interface "vxlan1"
type: vxlan
options: …Run Code Online (Sandbox Code Playgroud)