Creating virtual networks in Virt Manager

Good evening friends,

I have been testing Fedora 30 Server edition in a virtual machine and now I would like to place the NIC in bridged mode so the VM appears on the same subnet as the rest of my physical devices.

So I go to my Virtual Networks in virt-manager and click the plus to add a new virtual network. I give it a name and the first odd thing I notice on step 2 is that the IP address is highlighted in red. No problem, I drop a 0 from the third octet and the highlight turns green.

On step 4 I select ā€˜Forwarding to physical networkā€™, set the destination to ā€˜Any physical deviceā€™ and the mode to ā€˜Routedā€™. Upon clicking finish, I get a message with the following error:

Error creating virtual network: The name is not activatable

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createnet.py", line 811, in _async_net_create
    net.install()
  File "/usr/share/virt-manager/virtinst/network.py", line 244, in install
    net.create()
  File "/usr/lib64/python3.7/site-packages/libvirt.py", line 3007, in create
    if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
libvirt.libvirtError: The name is not activatable

Iā€™ve done this a few times before and not experienced this error. Does anyone have experience with this sort of thing who can point me in the right direction?

Kind Regards,
Craig Walsh.

1 Like

This is for routed, isolated and NAT modes, you donā€™t need it for bridged mode.
Just create a bridge with NetworkManager or systemd-networkd.

Select the option ā€œSpecify shared device nameā€ in the virtual NIC settings and use the bridge interface name you created before.

Do you mean this?


I had bridge here by default.
Maybe you have to install some package?

That configuration window manages virtual networks which rely on virtual switches.
The bridged networking is a different mode that doesnā€™t involve virtual networking.

1 Like

Mmm, you are right.
Indeed I confused the ā€œbridgeā€ term.
What I usually select to assign IPs of my LAN to the VM is

b3a81ba4f8393a3b875f0875b44a8b352d2406b6.png

Without creating a bridge in the host machine. And actually the behavior could be different.

1 Like

Note, that macvtap is not the same as bridged networking:

1 Like

Yes. Indeed. :+1:
But, maybe, as for me, it is sufficient if the goal is to assign an IP of the LAN to the VM. Without having to tinker with network manager and so on in order to configure a bridge. :slight_smile:

1 Like

Thanks everyone for your replies. I have now configured my virtual NIC to specify the virtual bridge set up for me by the system:

dea2a733565316687a75938df9b390f0db4af226.png

But when I boot the VM, I donā€™t get an IP address:

Any idea what Iā€™m doing wrong?

It seems you missed this step:

And replace your current connection with the bridged one:

nmcli connection modify eth0 autoconnect no
nmcli connection down eth0
nmcli connection up br0

Then forget about virbr0 and use br0.

2 Likes

Is that not essentially what the system has done for me with the virbr0 device?

No, it may look similar, but it works in a different way.
There are iptables rules involved as well.

The method you described above has worked a treat, thank you @vgaetera

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.