We're setting up KVM-based virtual machines on centos8 host which is setup as VM on Oracle VirtualBox. The VM has promiscuos mode allowed for all.
The goal is to enable the Virtual machines on same network as host node via network bridge.
So far, We've setup a network bridge on the host node using nmcli utility. The bridge name is 'br0' whose slave is physical network interface enp0s3 which is connected to public switch. The br0 is configured with public IP(192.168.10.200/24) and host node connectivity with internet is working fine via br0.
Now to setup virtual machine. We created bridge network using virsh command whose content is as follows:
Code: Select all
[root@kvm ~]# cat bridge.xml
<network>
<name>bridged-network</name>
<forward mode="bridge" />
<bridge name="br0" />
</network>
Code: Select all
virt-install --virt-type=kvm --name master01 --vcpus 2 --ram 2048 --os-variant=rhel8.0 --cdrom=/var/lib/libvirt/images/Rocky-8.5-x86_64-dvd1.iso --network bridge=bridged-network --graphics vnc --disk size=16
Now when i ping to VirtualMachine ip from any machine on the network, it responds back. But the problem is, although virtual machine is able to ping to host node ip(192.168.10.200) but neither it can ping the gateway(192.168.10.1) nor the internet address(1.1.1.1).
Here are few command outputs for better understanding:
Code: Select all
[root@kvm ~]# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.080027404555 no enp0s3
vnet0
Code: Select all
[root@kvm ~]# ip link show master br0
3: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:40:45:55 brd ff:ff:ff:ff:ff:ff
5: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UNKNOWN mode DEFAULT group default qlen 1000
link/ether fe:54:00:af:e7:29 brd ff:ff:ff:ff:ff:ff
Thanks in advance!