Closed larsks closed 8 years ago
https://review.gerrithub.io/#/c/265256/ is sort of step 1 of this process. That change makes it so that we no longer care about the physical location of the libvirt storage pool, which means we don't care if it is in /var/lib/libvirt/image
or $HOME/myimages
or whatever.
I've been playing with this a bit over the weekend. Here are some more thoughts:
We need root privileges anyway for certain tasks, specifically:
So as long as we need root anyway, I think the easiest solution is just set up some bridges on the host and whitelist them in /etc/qemu/bridge.conf
so that they can be used by an unprivileged user. This removes all the annoying complexity that would be introduced by the tunnel networks.
What we need to do is to clear separate "tasks that absolutely require privileges" from "tasks that can actually be run as anybody". I think we can start by moving the libvirt/setup/install
role up one level, to libvirt/install
, and isolate all the root-requiring tasks in that role. People who already have a virt-capable machine can then skip that part and run everything else as an unprivileged user.
+1 to this approach. Having all of the privileged steps in a single place makes it easier for someone to audit what steps are need privileges as well.
I've opened a gerrit topic to explore this issue. So far it's mostly prep work, some of which I'm not entirely happy with it. Comments welcome.
This was resolved by https://review.gerrithub.io/#/c/265712/
Currently, the quickstart requires root privileges on the target host and makes a number of system configuration changes. This makes some folks (understandably) nervous and may inhibit the adoption of the tool.
Most of the privileged access is required to configure networking.
We ought to be able to complete just about everything through the use of qemu user mode networking. There are a few options:
qemu-bridge-helper
tool. With the packages shipped in RHEL/CentOS/Fedora/etc, this will Just Work with thevirbr0
bridge created by the libvirtdefault
network. We can take advantage of this to create inbound access into the virtual environment.ip set multicast on dev lo
) and (b) to add the necessary routes so that the multicast traffic uses thelo
interface.I kind of like the tcp model.