homebrew-virt-manager
homebrew-virt-manager copied to clipboard
libvirt connection URI ?socket string
I was having the "libvirtError: An error occurred, but the cause is unknown" problem and some searching lead me to the solution at https://github.com/jeffreywildman/homebrew-virt-manager/issues/37. Adding the ?socket argument to the connection URI string solved the problem for me in the case of a simple virsh command or a virt-manager connection to a single remote libvirtd.
Does anyone know how to then get virt-manager to use such strings in connections? I'm not talking about the case where one runs virt-manager with a connection URI on the command line, but rather the case where one wants to create multiple remote libvirt connections from one virt-manager connection using the virt-manager File, Add connection dialog. The Generated URI will be of the form qemu+ssh://Username@Hostname/system, but we need this to have the ?socket string appended.
I also know that on a linux system virt-manager uses dconf to store connection URIs at path [org/virt-manager/virt-manager/connections] in the file typically found in ~/.config/dconf/user.
Does virt-manager on MacOS use dconf? If not, where does it store connection URIs? Once I know that I can try to enter them manually with the ?socket string appended.
Alternatively, is there another solution to this problem that doesn't require the ?socket string?
Connecting to it using the -c
command line flag appears to make the connection persist in the GUI, even after restarts without said argument.
You can probably use this to add all of your servers by connecting to each of them once, and then start virt-manager as normal. The connections should still work.
for macosx:
well, connections are stored in "defaults read python3" ie, ~/Library/Preferences/python3.plist.
To manipulate with this, you should use "defaults" command, examples:
defaults write python3 "/org/virt-manager/virt-manager/connections/uris" -array-add "qemu+ssh://user@server/system?socket=/var/run/libvirt/libvirt-sock"
if you are using different version of python, it might be in different domain, ie python2 or something simmilar