On Jun 27, Nicolas Quiniou-Briand wrote:
With the default configuration of roles, I'm able to start VMs
through
vagrant if I adjust sudo configuration for gitlab-runner user. I don't want
to use sudo and I saw that tests under DebOps don't use it.
I'm not yet very familiar with debops.libvirtd but I'm sure there is
something to tweak in order to use libvirt without sudo privileges.
To access the libvirt system instance your user needs to be in 'libvirt' and
IIRC 'kvm' UNIX system groups. The gitlab-runner UNIX account should be
automatically added to these by the 'debops.gitlab_runner' role. The
'vagrant-libvirt' plugin will then try and connect to the libvirt system
instance via the qemu:///system URI.
To check if you can access libvirt from your user account, you can run:
virsh -c qemu:///system sysinfo
If you get a dump of host information without errors, you should be OK. It
might be a good idea to set the qemu:///system connection as the default in
your user's libvirt configuration file.
Cheers,
Maciej