hbar
(hagay bar)
1
i have 1 dashboard + 2 kvm hosts
i have set br0 on each node.
cat << “EOT” > /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
STP=no
TYPE=Bridge
PROXY_METHOD=none
BROWSER_ONLY=no
IPADDR=10.5.108.193
NETMASK=255.255.252.0
GATEWAY=10.5.111.254
DNS1=10.5.104.2
DNS2=10.5.104.4
DNS3=10.5.104.40
ONBOOT=yes
BOOTPROTO=none
DELAY=0
DEFROUTE=yes
EOT
cat << “EOT” > /etc/sysconfig/network-scripts/ifcfg-ens192
DEVICE=ens192
TYPE=Ethernet
HWADDR=00:50:56:9c:65:fe
NM_CONTROLLED=“no”
BOOTPROTO=none
ONBOOT=yes
BRIDGE=br0
EOT
i created a virtual network on dashboard + vm
i have ping from host to vm and back but the VM cant ping 8.8.8.8
what am i missing?
I use openswitch for it on ubuntu
apt-get install openvswitch-switch
systemctl enable openvswitch-switch
systemctl start openvswitch-switch
systemctl status openvswitch-switch
ovs-vsctl add-br external
cat << “EOT” > /etc/network/interfaces
auto external
iface external inet static
address 192.168.x.73
netmask 255.255.255.0
broadcast 192.168.x.255
gateway 192.168.x.1
dns-nameservers 192.168.x.101 192.168.x.102
mtu 9000
allow-hotplug eth0
auto eth0
iface eth0 inet manual
mtu 9000
ovs-vsctl add-port external eth0 && systemctl restart networking
And add new network to opennebula:
BRIDGE = “external”
BRIDGE_TYPE = “openvswitch”
DNS = “192.168.x.101”
GATEWAY = “192.168.x.0”
GUEST_MTU = “9000”
NETWORK_ADDRESS = “192.168.x.0”
NETWORK_MASK = “255.255.255.0”
PHYDEV = “”
SECURITY_GROUPS = “0”
TEMPLATE_ID = “2”
VN_MAD = “ovswitch”