Comments (15)
There is simple solution ;). In my case, I had to run it from console and use debug.. so I could write and use password!! :X :d don't ask why, it just don't work from program menu.. OS X El Capitan, all installed from brew.
virt-manager -c "qemu+ssh://[email protected]:6666/system?socket=/var/run/libvirt/libvirt-sock" --debug
from homebrew-virt-manager.
I have the same error with virt-manager like you.
Same URI with virsh:
$ virsh -c qemu+ssh://user@host/system
error: failed to connect to the hypervisor
error: An error occurred, but the cause is unknown
using
$ virsh -c qemu+ssh://user@host/system?socket=/var/run/libvirt/libvirt-sock
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh #
according to the Readme works.
Same success with virt-manager:
virt-manager -c qemu+ssh://user@host/system?socket=/var/run/libvirt/libvirt-sock
(virt-manager@OSX 10.11 -> libvirtd@centos7)
from homebrew-virt-manager.
similar issue using virt-manager from mac. but works if i use sudo and connection string as above.
Solution for those interested is to modify /usr/local/etc/libvirt/libvirt.conf
add your connection string like above using the examples.
then sudo virt-manager -c hostname
I am able to get virsh working from the command line when using sudo
example: sudo virsh -c connect-string list seems to work for me also make sure root has ssh key copied over. maybe not the best solution but works for me till something better comes along.
from homebrew-virt-manager.
Hi, what is the command (with options, redacted if necessary) that you are running? This error message looks related to authentication issues. You may need to supply --no-fork or --debug to get SSH password prompts to display, or set up SSH keys.
from homebrew-virt-manager.
Thanks for the quick reply. I try to connect via the gui in virt-manager.
File>AddConnection
Hypervisor QEMU/KVM
Method SSH
user ****
hostname ****
have added sshkeys to the server ... still no luck
here the debug message
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (cli:256) Launched with command line: /usr/local/Cellar/virt-manager/1.3.1/libexec/share/virt-manager/virt-manager --debug
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (virt-manager:143) virt-manager version: 1.3.1
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (virt-manager:144) virtManager import: <module 'virtManager' from '/usr/local/Cellar/virt-manager/1.3.1/libexec/share/virt-manager/virtManager/init.pyc'>
(process:58669): Gtk-WARNING : Locale not supported by C library.
Using the fallback 'C' locale.
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (virt-manager:203) GTK version: 3.18.6
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (engine:496) libguestfs inspection support: False
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (systray:154) Showing systray: False
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (engine:1028) processing cli command uri= show_window= domain=
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (engine:1030) No cli action requested, launching default window
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (manager:203) Showing manager
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (engine:401) window counter incremented to 1
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (engine:158) No stored URIs found.
[Wed, 16 Dec 2015 21:10:11 virt-manager 58669] DEBUG (engine:140) Initial gtkapplication activated
[Wed, 16 Dec 2015 21:10:12 virt-manager 58669] DEBUG (engine:225) Determining default libvirt URI
[Wed, 16 Dec 2015 21:10:12 virt-manager 58669] DEBUG (packageutils:39) No PackageKit packages to search for.
[Wed, 16 Dec 2015 21:10:18 virt-manager 58669] DEBUG (connect:104) Couldn't contact avahi: g-io-error-quark: Could not connect: (1)
[Wed, 16 Dec 2015 21:10:18 virt-manager 58669] DEBUG (connect:145) Showing open connection
[Wed, 16 Dec 2015 21:10:27 virt-manager 58669] DEBUG (connect:437) Generate URI=qemu+ssh:///system, auto=False
[Wed, 16 Dec 2015 21:10:27 virt-manager 58669] DEBUG (connect:134) Closing open connection
[Wed, 16 Dec 2015 21:10:27 virt-manager 58669] DEBUG (connection:568) conn=qemu+ssh:///system changed to state=Connecting
[Wed, 16 Dec 2015 21:10:27 virt-manager 58669] DEBUG (connection:887) Scheduling background open thread for qemu+ssh://****_/system
[Wed, 16 Dec 2015 21:10:28 virt-manager 58669] DEBUG (connection:568) conn=qemu+ssh://_*/system changed to state=Disconnected
[Wed, 16 Dec 2015 21:10:28 virt-manager 58669] DEBUG (engine:638) connect_error: conn transport=ssh
[Wed, 16 Dec 2015 21:10:28 virt-manager 58669] DEBUG (error:99) error dialog message:
summary=Unable to connect to libvirt.
An error occurred, but the cause is unknown
Verify that the 'libvirtd' daemon is running
on the remote host.
Would you still like to remember this connection?
details=Unable to connect to libvirt.
An error occurred, but the cause is unknown
Verify that the 'libvirtd' daemon is running
on the remote host.
Libvirt URI is: qemu+ssh://*****
Traceback (most recent call last):
File "/usr/local/Cellar/virt-manager/1.3.1/libexec/share/virt-manager/virtManager/connection.py", line 903, in _do_open
self._backend.open(self._do_creds_password)
File "/usr/local/Cellar/virt-manager/1.3.1/libexec/share/virt-manager/virtinst/connection.py", line 148, in open
open_flags)
File "/usr/local/Cellar/virt-manager/1.3.1/libexec/vendor/lib/python2.7/site-packages/libvirt.py", line 105, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: An error occurred, but the cause is unknown
Thanks for helping!!!
from homebrew-virt-manager.
What is the form of the Libvirt URI you are using? Perhaps try connecting to the same Libvirt URI using the command virsh
? If you can't connect using virsh
, then the problem may be localized to the URI.
from homebrew-virt-manager.
the uri is just an ip address/system ok i'll try virsh thx :D
from homebrew-virt-manager.
Also see the Readme for notes on socket location overriding.
from homebrew-virt-manager.
now I get this with virsh and virt-manager -c ***:
error: authentication failed: unsupported authentication type 2
from homebrew-virt-manager.
ssh keys are copied and i can do a normal ssh login with both root and the user i want to use for virt-manager. the problem i have now encountered is that the user apparently does not have the rights to use libvirtd... and it doesnt help to be part of the group libvirtd... i need to configure polkit to access virsh from the normal user. here is a helpful link addressing this problem:
http://www2.linuxsysadmintutorials.com/configure-polkit-to-run-virsh-as-a-normal-user/
although there seems to be a problem with the if statement as the comments describe below.
I hope this helps! I have not configured it yet due to maintenance work on the server, but I will work on it asap. Merry christmas and happy celebrating!
from homebrew-virt-manager.
Thanks a lot worked for me too! Shall I close this? Or is it still considered an issue?
Greetings,
i7clock
from homebrew-virt-manager.
I think it should be repaired cause you can't use password in popup menu in program gui.
from homebrew-virt-manager.
On Ubuntu, openssh-askpass
provides the graphical prompt for SSH passwords when using virt-manager
. After a quick search, it does not appear that this dependency is readily available for OSX, possibly due to different keychain management (outside my area of knowledge). However, during installation, virt-manager
may be pointed to a suitable replacement with the --askpass-package-names=
option to setup.py
. Time permitting, this should be pushed upstream.
from homebrew-virt-manager.
I was having the "libvirtError: An error occurred, but the cause is unknown" problem and some searching lead me to the solution mentioned above - adding the ?socket argument to the connection URI string. That 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 in order to work around the problem discussed above.
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?
from homebrew-virt-manager.
Added an Alias
alias virt-manager="virt-manager -c qemu+ssh://usr@hostname:port/system?socket=/var/run/libvirt/libvirt-sock"
from homebrew-virt-manager.
Related Issues (20)
- vte3: macOS Mojave or newer is required for this software. HOT 3
- virt-manager installation error HOT 67
- Dependency Error on Install "intltool"
- not installed on OSX Monterey HOT 8
- What's the problem with this? [unsupported configuration: domain configuration does not support video model 'qxl'']
- Not installing macOS Monterey HOT 3
- libvirt-python install failure on Big Sur - "legacy-install-failure" HOT 3
- Automatic frequent password entry#自动频繁的输入密码
- No audio in guest VM
- Brew install error with python 3.10 HOT 3
- Package 'gobject-introspection-1.0', required by 'spice-client-glib-2.0', not found - Mac OS Monterey 12.5 (Apple M1) HOT 7
- Monterey install error for gobject-introspection (but it is installed) HOT 4
- Crashes when starting up Virtual Machine HOT 5
- M1 Macbook Pro with Monterey | Error with installing virt-viewer HOT 4
- Failed to download resource "virt-viewer" HOT 6
- Submit virt-viewer to homebrew-core HOT 4
- Consider Merging UPC Fork
- Compiled for mac os m1
- virt-manager crashing when trying to connect to remote VM
- Bails out when a clipboard copy is used? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-virt-manager.