On Sat, Apr 10, 2021 at 03:12:24PM +0000, Ed B wrote:
> Hi libvirt users,
> 
> I have been using libvirt on Debian Linux for a few months. (Mostly with 
> virt-manager. I haven't yet learned all of the command line commands.)
> 
> I'm currently confused by bridge mode networking, which I think is what I 
> require to address the particular use case, which I will describe:
> 
> My use case:
> 
> Prior to this I have been using routed mode to organize my VMs. Most of the 
> VMs I deploy are for services (web servers, mail servers, etc) so I require 
> them to have static IP addresses on my local network.
> 
> ==== An aside / comment: I *can* set those static IPs using the command line 
> virsh net-edit (from memory) command and then change the settings in the xml 
> files. However, since this seems like something that many users would require 
> regularly it would be nice to be able to set static IP in the GUI when 
> configuring with virt-manager. I assume that the same people who maintain 
> libvirt also maintain virt-manager? If I'm wrong please re-direct me.
> 
> Returning to the main discussion: It would be more convenient for me 
> personally if I were able to set the IP addresses of these VMs using static 
> addresses configured via an external DHCP server. I believe I can do this if 
> my network is in "bridge" mode instead of NAT or Routed. I know this should 
> be possible from reading information online but there doesn't seem to be any 
> option for this in the virt-manager GUI.
> 
> ==== To give more details on my setup: My network has a pfsense instance 
> which is able to provide IP addresses to local machines. I would like to use 
> the same pfsense machine to provide IP addresses to virtual machines. If I am 
> not mistaken, the only way to do this would be to bridge the network on which 
> the VMs reside to the network on which the pfsense machine resides.
> 
> I will provide some screenshots to illustrate my confusion. When creating a 
> new virtual network, I assume that I do not want to enable DHCPv4, because I 
> want the pfsense system to allocate IP addresses. I do not know whether I 
> should leave "Enable ipv4 network address space definition" or what the value 
> should be. See image below.
> 
> [cid:4e926d97-7a58-4350-93cc-0db7c401c075]
> 
> 
> Further in the setup (step 4), I assume I need to choose "Forward to physical 
> network" rather than "Isolated virtual network".
> 
> For the destination option, I do not know what should be chosen. I don't 
> fully understand how this option works.
> 
> For "Mode" there are three options: NAT, Routed and finally "Open". I cannot 
> find any documentation which indicates what "Open" means. NAT and Routed are 
> clearly not the correct options here - by a process of elimination that would 
> imply that "Open" means "bridged" but I have a feeling that this is incorrect 
> and I don't understand something else. Again, see screengrab below.
> 
> [cid:f2ea4e34-c418-48d3-86b2-d7ff1002990a]
> 
> I am quite keen to contribute something to documentation. At the moment I 
> don't understand enough about how libvirt works to be able to do this.
> 
> Apologies if my questions have been directed to the wrong people. If this is 
> the case could you please re-direct me to the right place to ask such 
> questions?
> 
> Best regards

Hi,

what you are looking for is no longer available using virt-manager. The
functionality to create host network interfaces like bridge was removed
in virt-manager 2.0.0. Looking at Debian packages the current stable
release uses virt-manager 2.0.0.

In order to create a bridge interface on your host you need to use other
means. For example Debian has its own wiki [1] that describes the
process. You will need to edit /etc/network/interfaces to create a
permanent bridge configuration.

Once you have the bridge created, you would be able to see it in
virt-manager when installing new VMs or editing network interface for
existing VMs where you simply pick your bridge. More details in
`Debian/Ubuntu Bridging` here [2].

Pavel

[1] <https://wiki.debian.org/BridgeNetworkConnections>
[2] <https://wiki.libvirt.org/page/Networking#Debian.2FUbuntu_Bridging>

Attachment: signature.asc
Description: PGP signature

Reply via email to