3

I spun up a VM using virsh create, and I am able to see the VM in virsh list, however, when I run virt-manager, I am unable to see the VM in the GUI

I am trying to use virt-manager to access the VM console (virsh console does not work)

Does anybody have ideas how to troubleshoot this?

I found this: virt-manager doesn't show list of local KVMs but virsh does : but the question was never answered

EDIT: tried restarting libvirtd, still see the same thing. "grep libvirt /var/log/messages" does not show anything

EDIT2: spun up a second VM on second HV, the second VM shows up in virt-manager, but the first one doesn't. Very odd. Diffing the xml files dont show anything major, and the qemu commands look the same under ps

benhsu
  • 483

2 Answers2

2

I would start by checking the logs on the virtualization server (grep for libvirt in /var/log/messages) and see if any messages point you towards a problem.

I've encountered issues before where virsh worked fine, but virt-manager behaved weirdly. Restarting libvirt on the virtualization server has always solved the problem for me.

0

Even though this question is ancient it is still one of the top results for a search about this issue, so I want to post an answer which addresses a common and simple reason I found for this (which may not have applied back when the question was asked - but anyway...). Depending on your installation of libvirt you might have various hypervisors configured, and you need to explicitly specify the --connect method for virsh, virt-install, etc unless you want them to assume a default. In my case at the moment I have "LXC" (system containers - URI lxc:///), "QEMU/KVM" (full virtualisation - URI qemu:///system), and "QEMU/KVM User session" (URI qemu:///session). I also see available "Xen", "Bhyve", and "Virtuozzo". You can also setup connection-URIs over SSH to remote hypervisors. Your installation of virt-manager might have some or all of these preconfigured, and if you don't have one of those connections configured for display (by default or explicitly) while creating a VM for that connection (by default or explicitly) using virsh, then it won't display in virt-manager. The suggestions about running as your own system-user or as root probably work because the default for root is qemu:///system (where the VM's host-processes run with root privileges, irrespective of what users run within the VM) while the default for other users is qemu:///session (which runs VMs within non-host-root processes).