Sunday, August 28, 2016

networking - KVM bridged network like in virtualbox



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!


Answer



Some time ago I found out what I was doing wrong. I was creating the network in bridge in YAST, the configuration tool for OpenSUSE. However you should (of course..) create the network bridge in the virt-manager tool:




enter image description here



Inside this window I can configure everything I want. You can also configure the network interfaces themself



enter image description here


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...