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

Management Network should allow use user networking #1780

Open
HillBright opened this issue Sep 27, 2023 · 1 comment
Open

Management Network should allow use user networking #1780

HillBright opened this issue Sep 27, 2023 · 1 comment

Comments

@HillBright
Copy link

Is your feature request related to a problem? Please describe.
In general, it's good to use libvirt user session with vagrant. Currently, this requires extra effort that we need to manually create the used networks with root beforehand. For public network and private network, this can be avoided by specifying type to user . No way for management network to specify the similar option AFAIK.

Describe the solution you'd like
Allow use user networking for management network. This can be a configurable feature. I think no root access would ever be required for vagrant-libvirt to work for starting VM in user session.

@abbbi
Copy link
Contributor

abbbi commented Oct 14, 2023

hi,

i think this may have been discussed already (#626). The Problem here is that setting up a libvirt network with
dhcp enabled (like it is required for the management network) requires root on libvirt side, to setup the required
bridge interfaces. A workaorund might be to use an external dhcp service and boxes that support the quemu
guest agent, see:

https://vagrant-libvirt.github.io/vagrant-libvirt/configuration.html#management-network

[..]
It is also possible to use the Qemu Agent to extract the management interface configuration from the booted virtual machine. This is helpful in libvirt environments where no local dnsmasq is used for automatic address assignment, but external dhcp services via bridged libvirt networks.

Prerequisite is to enable the qemu agent channel via (Libvirt communication channels) and the virtual machine image must have the agent pre-installed before deploy. The agent will start automatically if it detects an attached channel during boot.

qemu_use_agent - false by default, if set to true, attempt to extract configured ip address via qemu agent.
[..]

Another option was to setup qemu-bridge-helper (may be limited to fedora) with setuid by your OS distro, and privileged libvirtd has created a network (eg the default virbr0 network) then it is possible for unprivileged libvirtd to use this setuid helper to connect to this 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

2 participants