virt-manager creates wrong defaults on first boot if libvirt is not running

Bug #586115 reported by desrt on 2010-05-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)

Bug Description

Binary package hint: virt-manager

it's difficult to get virt-manager to connect to the root-owned libvirtd instance (ie: the one started from the init scripts with its socket in /var/run).

when i try to add machines via the UI i have 4 options. the "local" one seems to be activating (dbus?) a libvirt instance for my user that stores its stuff in ~/.libvirt/. the other 3 require me to setup some sort of authentication (like ssh, etc).

i have access to the socket in /var/run (i'm in the group for it).

virsh and the other tools communicate with the system daemon just fine.

i was able to get it to work by going into gconf and manually setting up the url of qemu:///system, but it really should be easier than this. some sort of "connect to system socket" option in the interface would be sweet.

Hm... We used to carry a patch that would automatically add
qemu:///system to the list if you had access to the UNIX socket. I
wonder what happened to that.

What version of virt-manager, and what version of Ubuntu are you using?

Could you please post a screenshot of your main virt-manager window?

desrt (desrt) wrote :

This is a stock Lucid system.

virt-manager is working nicely now.

I guess it would be best if there was an explicit option to add the system socket. I don't exactly remember, but maybe the problem was caused by me starting virt-manager first, then running the libvirtd service and then trying to add a local connection (ie: the socket didn't exist at startup -> no connection added).

Marc Deslauriers (mdeslaur) wrote :

Right, you need to restart virt-manager after starting libvirtd.

Closing bug as per your last comment.

Changed in virt-manager (Ubuntu):
status: New → Invalid
desrt (desrt) wrote :

This isn't really sufficient...

If you've *ever* started virt-manager without libvirt running then it will have created the qemu:///session connection. This means that on future restarts the connection list won't be empty and it won't scan for the qemu:///system socket being available.

The only workaround for this is to start the libvirtd-bin service, start virt-manager, delete all connections from virt-manager, close virt-manager then restart virt-manager. That's a bit much to ask.

Changed in virt-manager (Ubuntu):
status: Invalid → New
summary: - virt-manager has a hard time connecting to root-owned libvirtd
+ virt-manager creates wrong defaults on first boot if libvirt is not
+ running
Changed in virt-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Marc Deslauriers (mdeslaur) wrote :

This works correctly in virt-manager that is in Ubuntu 12.04. When connecting without libvirt running, it now gives a proper error dialog.

Changed in virt-manager (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers