Re: Set up networking so the VM Guest uses LAN DHCP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 2/25/24 10:34, Jeffrey Walton wrote:
> Hi Everyone,
> I'm having trouble understanding what I need to do so my VM guests use
> the DHCP server on my LAN. I've read
> <>,
> but I don't see the use case covered. There is a section on dns-dhcp,
> but it looks like some sort of libvirt-internal setup so guests get
> their networking params from libvirt, and not my DHCP server.
> (I am looking for something similar to VirtualBox and Bridged
> networking. VBox does what I want when I select a bridged adapter).
> How do I set up networking so the VM Guest uses LAN DHCP?

You have basically two options:

1) create a linux bridge (brctl addbr ...) or an OpenVSwitch bridge,
plug your eth0 into it and then configure VMs to have their vNICs
plugged into the bridge (<interface type='bridge'> <source
bridge='...'/> ..).

2) Use macvtap (<interface type='direct'> <source dev='eth0'/> ...).

There is a caveat though. While 2) is less labor intensive, it won't
allow VMs to talk to each other. For that you'd need a switch with so
called hairpin turned on.

Users mailing list -- users@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxx

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux