KVM bridged network like in virtualbox

kvm-virtualizationnetworkingopensusevirtualization

I have a server with 3 NIC's with OpenSUSE 13.2 and KVM installed. I have installed Debian as guest.

My network is 192.168.88.0/24, DHCP server is at 192.168.88.1. Now I want my guest to also get a 192.168.88.x IP-address from the DHCP server. This behaviour is possible with VirtualBox using "Bridged networking".

I found this page about networking in KVM: http://www.linux-kvm.org/page/Networking. User Networking, private virtual bridge and public virtual bridge isn't what I want.

I instead used "Virtual network defualt: NAT". Now my VM is getting an IP, but 192.168.122.x.

How can I give the VM an IP in the same range as the host os, without loosing the IP of the host os?

Thanks!

Best Answer

You want the public bridge option. On your OpenSUSE KVM host the IP address moves from the physical NIC to the bridge interface and keeps it accessible on your 192.168.88.0/24 network and your Debian guest virtual NIC is connected through the bridge which also makes it attached to the same local network.

Using the NAT default means your Debian guest is effectively hidden behind the OpenSUSE KVM host and uses a private 192.168.122.0/24 network for any direct communication between each other but when communicating with other hosts on your network is NAT'd to whatever IP the OpenSUSE host has.