KVM: How to make VM get IP from same DHCP as host?
by browny_amiga from LinuxQuestions.org on (#5KHTA)
Hi,
I have several VMs on KVM with virtual machine manager that I don't want to use NAT with, I want them to get a IP from the same source as the host machine, from the external DHCP. For this purpose, I want to do level 2 bridging, so the virsh networking "switch" or interface is directly bridged with the physical NIC of the host OS. This has so far not worked, when setting up the bridge, it keeps asking me for an IP and range, but Level 2 bridging has no IP, level 2 is below IP and just lets all traffic through.
I think that people today confuse what a bridge is and lump together other technologies to join virtual NICs.
I have noticed that this is super simple when you use Microsoft HyperV or VirtualBox, but pretty difficult with KVM and virtual machine manager. There is hardly any documentation and nobody seems to use KVM much at all.
Right now, when I use KVM to run my VMs, they get a IP from the internal virsh DHCP and are not reachable from external machines, which is a problem.
I have several VMs on KVM with virtual machine manager that I don't want to use NAT with, I want them to get a IP from the same source as the host machine, from the external DHCP. For this purpose, I want to do level 2 bridging, so the virsh networking "switch" or interface is directly bridged with the physical NIC of the host OS. This has so far not worked, when setting up the bridge, it keeps asking me for an IP and range, but Level 2 bridging has no IP, level 2 is below IP and just lets all traffic through.
I think that people today confuse what a bridge is and lump together other technologies to join virtual NICs.
I have noticed that this is super simple when you use Microsoft HyperV or VirtualBox, but pretty difficult with KVM and virtual machine manager. There is hardly any documentation and nobody seems to use KVM much at all.
Right now, when I use KVM to run my VMs, they get a IP from the internal virsh DHCP and are not reachable from external machines, which is a problem.