0

# virsh -c qemu:///session list --all lists only VMs created in QEMU/KVM connection (system !), but misses VM I've created in QEMU/KVM User session in GUI of Virt-Manager. Why? From below I unserstand I'm using correct syntax of the command:

Migrate a QEMU/KVM VM from qemu:///system to qemu:///session:

when try to list the VMs with virsh list --all, My VM is not listed? And, if I specify the system URI with by running virsh -c qemu:///system list --all, I see my VM listed.

Using virsh -c qemu:///system list --all and virsh list --all produced same list.

virt-manager doesn't show list of local KVMs but virsh does

Check the output of virsh uri. If it returns qemu:///session

Looks to me virsh can work with user session. Does it need some config for that?

Virsh can't detect my new vm talks about missing VM listed when running virsh w/out sudo, but I just get:

$ virsh uri
error: failed to connect to the hypervisor

1 Answers1

0

I understood (recalled) why virsh as ordinary user fails. I started virt-manager via newgrp libvirt trick from https://askubuntu.com/a/1119779/796396. Using it again in host console produces "correct" result:

$ newgrp libvirt
$ virsh --connect qemu:///session list --all
 Id   Name      State
------------------------
 1    LM_21_1   paused

So the issue of not listing VMs from User session was due to running virsh as root.

Why it listed qemu:///system ones instead? I guess for root qemu:///session = qemu:///system, correct?