Bug 428743

Summary: Can't connect to remote virt-manager
Product: [Fedora] Fedora Reporter: Espen Stefansen <libbe>
Component: libvirtAssignee: Daniel Berrange <berrange>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: hbrock
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 0.4.0-4.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-22 10:53:29 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Output of the strace
Fix off-by-one in SSH argv processing none

Description Espen Stefansen 2008-01-14 16:27:18 EST
Description of problem:
Everytime I try to connect to a remote virt-manager, I get an error. I followed the intructions from here: 

All services are restarted but i still get this error from virt-manager.log:
[ma., 14 jan. 2008 21:56:37 virt-manager 7750] DEBUG (connection:292) Scheduling background 
open thread for qemu+ssh://root@
[ma., 14 jan. 2008 21:56:37 virt-manager 7750] DEBUG (connection:299) Background thread is 
[ma., 14 jan. 2008 21:56:37 virt-manager 7750] ERROR (connection:324) Unable to open connection 
to hypervisor URI 'qemu+ssh://root@':
<class 'libvirt.libvirtError'> virConnectOpenReadOnly() failed
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 306, in _open_thread
    self.vmm = libvirt.openReadOnly(self.uri)
  File "/usr/lib/python2.5/site-packages/libvirt.py", line 144, in openReadOnly
    if ret is None:raise libvirtError('virConnectOpenReadOnly() failed')
libvirtError: virConnectOpenReadOnly() failed

[ma., 14 jan. 2008 21:56:37 virt-manager 7750] DEBUG (connection:328) Background open thread 
complete, scheduling notify
[ma., 14 jan. 2008 21:56:37 virt-manager 7750] DEBUG (connection:337) Notifying open result

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:
Get an error and no connection

Expected results:
Should be able to connect to remote virt-manager

Additional info:
Comment 1 Daniel Berrange 2008-01-14 16:29:19 EST
Do you have the 'nc' RPM installed on the server, and is the 'libvirtd' service
running ?
Comment 2 Espen Stefansen 2008-01-14 18:25:20 EST
Yep. nc-1.84-13.fc8 is installed at both computers and libvirtd is running.
Comment 3 Daniel Berrange 2008-01-14 18:33:30 EST
From a 'gnome-terminal' window, you able to run

 ssh root@

And get a login shell, without being prompted for any kind of
password/passphrase/etc ?

What does running 'virsh --connect qemu+ssh://root@' show ? 
Comment 4 Espen Stefansen 2008-01-14 18:56:04 EST
I can connect without being asked for any password.

When i run the virsh-command, i get:
libvir: Remote error : Can't allocate memory
error: failed to connect to the hypervisor
Comment 5 Daniel Berrange 2008-01-14 19:03:10 EST
That is bizarre. Please run the following

 strace -s 10000 -f -o virsh.txt virsh --connect qemu+ssh://root@

And attach the resulting 'virsh.txt' trace file.
Comment 6 Espen Stefansen 2008-01-14 19:06:38 EST
Created attachment 291657 [details]
Output of the strace
Comment 7 Daniel Berrange 2008-01-14 19:27:40 EST
Created attachment 291658 [details]
Fix off-by-one in SSH argv processing
Comment 8 Daniel Berrange 2008-01-14 19:49:53 EST
Please try these test libvirt RPMs, on the client host where you run
virsh/virt-manager. Either x86_64:


Or i686:


They ought to fix the problem you see.
Comment 9 Espen Stefansen 2008-01-14 20:02:48 EST
You da man! :)

Those rpm's made it work. Thank you very much!
Comment 10 Espen Stefansen 2008-01-16 13:47:19 EST
Today the was an update of libvirt in yum (libvirt-0.4.0-3.fc8.i386.rpm) so I 
updated my other computer, which ran libvirtd yesterday. I the tried connecting 
the opposite way (the client yesterday, the server today), but that didn't 
work. I got the same error as yesterday. But when i updated libvirt from the 
koji-links above, everything worked. 

Aren't libvirt-0.4.0-3.fc8.i386.rpm and libvirt-0.4.0-3.fc8.1dan.i386.rpm from 
koji above, supposed to be the same?
Comment 11 Fedora Update System 2008-01-22 10:53:27 EST
libvirt-0.4.0-4.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.