Virsh list --all not working from cli

I have libvirt kvm installed and working to the point that I can open up the GUI for libvirt and create a new VM and run it without issue.

However, if libvirt is not running and I want to list and start a VM, I have to use sudo. Meaning:

virsh list --all
virsh start LMDE6

do not work, but

sudo virsh list --all
sudo virsh start LMDE6

do work.

Another way to have this work is:

$ virsh -c qemu:///system
Welcome to virsh, the virtualization interactive terminal.

virsh list --all
 Id   Name    State
 -    LMDE6   shut off

virsh start LMDE6
Domain 'LMDE6' started

I know on *buntu and Debian systems I don’t need sudo. BTW, my user is a member of the groups libvirt and kvm

Any ideas?

Ist bei mir auch so. Propier mal vorher in der user shell:

export LIBVIRT_DEFAULT_URI=qemu:///system

Das funktioniert bei mir

Thanks to you and google translate. The export worked for me as well. Where is a good place to put the export statement? .bashrc ?

Maybe /etc/profile is better?

Thanks for the suggestion. I added the following to my /etc/profile file
export LIBVIRT_DEFAULT_URI=qemu:///system

And that works.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.