KVM bridge issue Oracle VirtualBox!

Discussions related to using VirtualBox on Windows hosts.
Post Reply
shahzaib
Posts: 2
Joined: 25. Nov 2021, 11:17

KVM bridge issue Oracle VirtualBox!

Post by shahzaib »

Hello,

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>
Once the network is created. We setup the virtual machine and connect this bridge network to it using following command:

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
Once the virtual machine is setup, we manually configured the IP from same subnet as per host node br0 (192.168.10.220/24).

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
Any help will be much appreciated.

Thanks in advance!
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: KVM bridge issue Oracle VirtualBox!

Post by scottgus1 »

Before we try to troubleshoot the setup you're trying to work with, could you please explain what your ultimate goal is? There may be an easier way to accomplish it than dual-hypervisor nested virtualization and non-Virtualbox bridges.

Are you trying to make all these VMs act as so that the host or LAN thinks all the traffic is coming from one single IP address?

Or do you only want the VMs to all be able to get on the LAN?

Or some other goal?
shahzaib
Posts: 2
Joined: 25. Nov 2021, 11:17

Re: KVM bridge issue Oracle VirtualBox!

Post by shahzaib »

Hello,

The Ultimate Goal:

We want to setup a KVM hypervisor which can host virtual machines and act on same LAN network using bridge mode instead of NAT.

Testing phase:

Currently, I'm getting my hands dirty on setting up KVM hypervisor and hosting virtual machines on it.

The Complication:

Since i don't have dedicated server where i can setup KVM hypervisor. So i have installed Oracle VirtualBox on my work laptop. This way it has become dual hypervisor.


>>Are you trying to make all these VMs act as so that the host or LAN thinks all the traffic is coming from one single IP address?
Well, what i want that lan should think that each VM is a physical server and has its IP range from LAN network(192.168.10.0/24). So that any client on LAN can access each VM webserver directly without running any NAT/forwarding rule on Host. I guess, that's the way bridge mode works. The question is, Can we achieve that on a dual Hypervisor?


Please let me know if any point still not clear?

Regards.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: KVM bridge issue Oracle VirtualBox!

Post by fth0 »

I'd suggest to ping the gateway and use Wireshark in all 3 OSes on the laptop (Windows Virtualbox host, Linux Virtualbox guest / KVM host, Linux KVM guest) to check which of the ARP request, ARP reply, ICMP request and ICMP reply packets gets stuck where.
Post Reply