[virt-tools-list] [virt-viewer] Don't connect to localhost when using --direct

Daniel P. Berrange berrange at redhat.com
Tue Jun 10 09:31:33 UTC 2014


On Thu, Apr 03, 2014 at 02:48:10PM +0200, Christophe Fergeau wrote:
> Trying to connect to a remote virtual machine using
> virt-viewer -c qemu+ssh://example.com/system --direct $vm_name
> will currently fail with an error message saying it's not possible to
> localhost. This happens with VMs which listen on a wildcard address (eg
> '0.0.0.0').
> This was introduced by commit 74b1b62 which changes the host to connect to
> to 'localhost' when trying to connect through ssh to a VM listening on a
> wildcard address. This is only valid when using a ssh tunnel, and should
> not be done with --direct. The fallback code which uses the hostname from
> the libvirt URI is what makes the most sense in this situation (wildcard
> listen address + --direct).
> This commit introduces a virt_viewer_app_get_direct() so that this can be
> implemented.
> 
> Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1079211
> ---
>  src/virt-viewer-app.c | 7 +++++++
>  src/virt-viewer-app.h | 1 +
>  src/virt-viewer.c     | 3 ++-
>  3 files changed, 10 insertions(+), 1 deletion(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list