[Pkg-libvirt-maintainers] Bug#701684: Crashes when connecting to VM
Lee Begg
lee at beggdigital.com
Thu Apr 25 22:35:39 UTC 2013
Hi
I can offer some observations about why virt-viewer crashes when connecting to
some VMs.
The crash appears to be related to the vncdisplay result returned from
libvirt.
For example:
$ virsh vncdisplay test-vm1
:1
$ virt-viewer test-vm1
Segmentation fault
$ virsh vncdisplay test-vm2
localhost:2
$ virt-viewer test-vm2
<virt-viewer window opened and shows VM>
The difference between test-vm1 and test-vm2 is the graphics element in the
domain XML.
test-vm1 has
<graphics type='vnc' port='-1' autoport='yes'/>
which listens on all available interfaces
test-vm2 has
<graphics type='vnc' port='-1' autoport='yes' listen='localhost'/>
which just listens on localhost (in the case).
So it appears that virt-viewer isn't correctly handling where the host name
for the vncdisplay is not given, and virt-viewer should use the address it
used for connecting to libvirt or localhost if an address wasn't specified.
The above also gives a work around, which is to set the listen attribute on
the graphics element in your domain XML.
Regards
Lee Begg
More information about the Pkg-libvirt-maintainers
mailing list