OxDEAD Unicornz

Have you ever seen so many?

Debian, Libvirt, Non-root

I’m playing with OpenStack and decided to bring up a testing environment on my home Debian computer.

I’m using KVM virtualization, launching VMs as non-root user and hit an issue not described in official documentation.

Despite my user was a member of kvm and libvirt groups, I was unable to check networks/VMs created by root.

The point is that if you don’t define exact connection uri:

1
$ virsh -c qemu:///system 'list --all'

you should have LIBVIRT_DEFAULT_URI environment variable set, or you won’t connect correctly using

1
$ virsh list --all

command, the only thing you’ll see is an empty list. Add the following line to your ~/.bash_profile:

1
export LIBVIRT_DEFAULT_URI=qemu:///system

to resolve this issue.