Unable to vagrant up with virtualbox installed on Ubuntu 20.04

I’ve been unable to startup my virtual machine and I have both vagrant 2.2.6 and virtualbox 6.0.24 installed. Bash displays this error:

sudo vagrant up
Bringing machine ‘default’ up with ‘libvirt’ provider…
Error while connecting to libvirt: Error making a connection to libvirt URI qemu:///system?no_verify=1&keyfile=/root/.ssh/id_rsa:
Call to virConnectOpen failed: Failed to connect socket to ‘/var/run/libvirt/libvirt-sock’: No such file or directory.

I’m new to Linux (dumped WIndows cos of this same problem) so this documentation TLSSetup - Libvirt Wiki which is apparently the solution, seems a bit complex.

Libvirt is a service that can manage VMs using a lot of different virtualization systems. It looks like Vagrant uses libvirt, but it isn’t running on your system. Try installing the libvirt-daemon-system package, and then add your user to the libvirt group. :slightly_smiling_face:

You generally don’t need to set up TLS to access a local libvirt instance, that’s for when you want to use a libvirt instance over the network.

1 Like

Ok, I’ll try that out. Thanks.

when trying to add user to libvirt group, it displays

$ uid=1000(millenialcapitalist) gid=135(libvirt) groups=135(libvirt),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare),1000(millenialcapitalist)
bash: syntax error near unexpected token `('

what to do?

That looks like you’re trying to run the (modified?) output of the id command as a command? :open_mouth:

The command to add a user to a group on Debian-ish systems (including Ubuntu) is:

adduser user group
1 Like

Yes. Apparently I just found that out a second ago too haha. Thanks.

1 Like