Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using macvtap interface #32

Open
vphan13 opened this issue Oct 31, 2024 · 0 comments
Open

using macvtap interface #32

vphan13 opened this issue Oct 31, 2024 · 0 comments

Comments

@vphan13
Copy link

vphan13 commented Oct 31, 2024

I'm attempting to use macvlans with virter. I've successfully added a macvlan bridge interface on my virter host using:

nmcli connection add type macvlan dev enp4s0 mode bridge tap yes ifname **_vmbridge0_**
nmcli connection modify macvlan-vmbridge0 ipv6.method "disabled"
nmcli connection modify macvlan-vmbridge0 ipv4.method "disabled"

I run

virter vm --memory 4GiB --vcpus 2 run rocky-9 --name node1 --id 133 --wait-ssh

In virtual-machine-manager I can edit the node1 vm by:

  1. adding a new virtual network interface, with a network source of Macvtap device
  2. Device name vmbridge0

Rebooting the VM it now comes up with a dhcp address on my local lan on the second newly added interface.
I would like to be able to associate my vmbridge0 device with a new virter network so that the above can all be done from the virter cli

virter network add internal -m bridge

This command works to add another network, but there is no interface associated with it under the Bridge column

virter network ls
DEBU[0000] Using config file: /home/user1/.config/virter/virter.toml
Name                      Forward-Type  IP-Range          Domain  DHCP                           Bridge  
internal                  bridge                                                                         
default (virter default)  nat           192.168.122.1/24          192.168.122.2-192.168.122.254  virbr0 

However, attempting to start a new VM with the internal network results in an error

virter vm run rocky-9 --id 131 --nic type=network,source=internal
Failed to start VM 131: could not create (start) domain: internal error: network 'internal' uses a direct mode, but has no forward dev and no interface pool

Looks like the internal network is not associated with a bridge device.

I don't see any obvious options in virter network add to associate a bridge device name with a newly created network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant