[Pkg-libvirt-maintainers] Bug#647606: [libvirt-bin] virsh screenshot domain not working (cannot get screenshot of domain using virsh)

David Pravec david.pravec at nethost.cz
Fri Nov 4 13:23:52 UTC 2011


Package: libvirt-bin
Version: 0.9.6-2
Severity: normal

--- Please enter the report below this line. ---
when i am trying to get screenshot using libvirt,
my code blocks forever, waiting for image data.... which are not coming.

This happens when i do use libvirt from python as a library, and also 
when i use command
'virsh screenshot domain', which should fetch domain screenshot and save 
it into file.

Some people on #virsh irc channel told me that its working on other 
systems,
one of them confirmed that his sid machine also doesnt work well. This 
might mean its a packaging issue...

I was not able to fully identify reason for this failure, as the python 
code is waiting forever for some C library...
When i was testing following code, the problem occurs in last line: 
stream.recvAll(handler, fd)

(it never calls the handler, just waiting forever)

-----------------------------

#!/usr/bin/python -u

import libvirt, os

def handler(stream, buf, opaque):

fd = opaque

os.write(fd, buf)

uri = "qemu:///system"

vmname = "test1"

filename = "screenshot.dat"

connection = libvirt.open(uri)

domain = connection.lookupByName(vmname)

stream = connection.newStream(0)

mimetype = domain.screenshot(stream, 0, 0)

print "mimetype:", mimetype

fd = os.open(filename, os.O_WRONLY | os.O_TRUNC | os.O_CREAT, 0644)

stream.recvAll(handler, fd)


-----------------------------


--- System information. ---
Architecture: amd64
Kernel: Linux 3.0.0-2-amd64

Debian Release: wheezy/sid
550 unstable ftp.cz.debian.org
500 testing security.debian.org
500 testing ftp.cz.debian.org

--- Package information. ---
Depends (Version) | Installed
======================================-+-================
libavahi-client3 (>= 0.6.16) | 0.6.30-5
libavahi-common3 (>= 0.6.16) | 0.6.30-5
libblkid1 (>= 2.17.2) | 2.19.1-5
libc6 (>= 2.11) | 2.13-21
libcap-ng0 | 0.6.6-1
libdevmapper1.02.1 (>= 2:1.02.20) | 2:1.02.67-1
libgcrypt11 (>= 1.4.5) | 1.5.0-3
libgnutls26 (>= 2.12.6.1-0) | 2.12.12-1
libnl1 (>= 1.1) | 1.1-7
libparted0debian1 (>= 2.2-1) | 2.3-8
libpcap0.8 (>= 0.9.8) | 1.1.1-10
libpciaccess0 | 0.12.1-2
libreadline6 (>= 6.0) | 6.2-7
libsasl2-2 | 2.1.25.dfsg1-2
libudev0 (>= 0.140) | 172-1
libvirt0 (= 0.9.6-2) | 0.9.6-2
libxenstore3.0 (>= 3.2.0) | 4.1.1-3
libxml2 (>= 2.7.4) | 2.7.8.dfsg-5
libyajl1 (>= 1.0.5) | 1.0.12-1
adduser | 3.113
logrotate | 3.7.8-6
gettext-base | 0.18.1.1-5


Recommends (Version) | Installed
==============================-+-============
netcat-openbsd | 1.89-4
bridge-utils | 1.5-2
dnsmasq-base (>= 2.46-1) | 2.59-2
iptables (>= 1.4.10) | 1.4.12-1
qemu-kvm | 0.15.1+dfsg-1
OR qemu (>= 0.9.1) | 0.15.0+dfsg-1
libxml2-utils | 2.7.8.dfsg-5
gawk | 1:3.1.8+dfsg-0.1
ebtables | 2.0.9.2-2
dmidecode | 2.11-4
iproute | 20110629-1
parted | 2.3-8


Suggests (Version) | Installed
==========================-+-===========
policykit-1 | 0.102-1
radvd |




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-libvirt-maintainers/attachments/20111104/7aaeccb7/attachment.html>


More information about the Pkg-libvirt-maintainers mailing list