<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Package: libvirt-bin
    <br>
    Version: 0.9.6-2
    <br>
    Severity: normal
    <br>
    <br>
    --- Please enter the report below this line. ---
    <br>
    when i am trying to get screenshot using libvirt, <br>
    my code blocks forever, waiting for image data.... which are not
    coming.<br>
    <br>
    This happens when i do use libvirt from python as a library, and
    also when i use command<br>
    'virsh screenshot domain', which should fetch domain screenshot and
    save it into file.<br>
    <br>
    Some people on #virsh irc channel told me that its working on other
    systems, <br>
    one of them confirmed that his sid machine also doesnt work well.
    This might mean its a packaging issue...  <br>
    <br>
    I was not able to fully identify reason for this failure, as the
    python code is waiting forever for some C library...<br>
    <style type="text/css">p, li { white-space: pre-wrap; }</style>When
    i was testing following code, the problem occurs in last line:
    stream.recvAll(handler, fd)<br>
    <p style="margin: 0px; text-indent: 0px;">(it never calls the
      handler, just waiting forever)<br>
    </p>
    <p style="margin: 0px; text-indent: 0px;">-----------------------------<br>
    </p>
    <style type="text/css">p, li { white-space: pre-wrap; }</style>
    <p style="margin: 0px; text-indent: 0px;">#!/usr/bin/python -u</p>
    <p style="margin: 0px; text-indent: 0px;">import libvirt, os</p>
    <p style="margin: 0px; text-indent: 0px;"> </p>
    <p style="margin: 0px; text-indent: 0px;">def handler(stream, buf,
      opaque):</p>
    <p style="margin: 0px; text-indent: 0px;"> fd = opaque</p>
    <p style="margin: 0px; text-indent: 0px;"> os.write(fd, buf)</p>
    <p style="margin: 0px; text-indent: 0px;"> </p>
    <p style="margin: 0px; text-indent: 0px;">uri = "qemu:///system"</p>
    <p style="margin: 0px; text-indent: 0px;">vmname = "test1"</p>
    <p style="margin: 0px; text-indent: 0px;">filename =
      "screenshot.dat"</p>
    <p style="margin: 0px; text-indent: 0px;"> </p>
    <p style="margin: 0px; text-indent: 0px;">connection =
      libvirt.open(uri)</p>
    <p style="margin: 0px; text-indent: 0px;">domain =
      connection.lookupByName(vmname)</p>
    <p style="margin: 0px; text-indent: 0px;">stream =
      connection.newStream(0)</p>
    <p style="margin: 0px; text-indent: 0px;"> </p>
    <p style="margin: 0px; text-indent: 0px;">mimetype =
      domain.screenshot(stream, 0, 0)</p>
    <p style="margin: 0px; text-indent: 0px;">print "mimetype:",
      mimetype</p>
    <p style="margin: 0px; text-indent: 0px;"> </p>
    <p style="margin: 0px; text-indent: 0px;">fd = os.open(filename,
      os.O_WRONLY | os.O_TRUNC | os.O_CREAT, 0644)</p>
    <p style="margin: 0px; text-indent: 0px;">stream.recvAll(handler,
      fd)</p>
    <p style="margin: 0px; text-indent: 0px;"></p>
    <br>
    -----------------------------<br>
    <br>
    <br>
    --- System information. ---
    <br>
    Architecture: amd64
    <br>
    Kernel: Linux 3.0.0-2-amd64
    <br>
    <br>
    Debian Release: wheezy/sid
    <br>
    550 unstable <a class="moz-txt-link-abbreviated" href="ftp://ftp.cz.debian.org">ftp.cz.debian.org</a> <br>
    500 testing security.debian.org <br>
    500 testing <a class="moz-txt-link-abbreviated" href="ftp://ftp.cz.debian.org">ftp.cz.debian.org</a> <br>
    <br>
    --- Package information. ---
    <br>
    Depends (Version) | Installed
    <br>
    ======================================-+-================
    <br>
    libavahi-client3 (>= 0.6.16) | 0.6.30-5
    <br>
    libavahi-common3 (>= 0.6.16) | 0.6.30-5
    <br>
    libblkid1 (>= 2.17.2) | 2.19.1-5
    <br>
    libc6 (>= 2.11) | 2.13-21
    <br>
    libcap-ng0 | 0.6.6-1
    <br>
    libdevmapper1.02.1 (>= 2:1.02.20) | 2:1.02.67-1
    <br>
    libgcrypt11 (>= 1.4.5) | 1.5.0-3
    <br>
    libgnutls26 (>= 2.12.6.1-0) | 2.12.12-1
    <br>
    libnl1 (>= 1.1) | 1.1-7
    <br>
    libparted0debian1 (>= 2.2-1) | 2.3-8
    <br>
    libpcap0.8 (>= 0.9.8) | 1.1.1-10
    <br>
    libpciaccess0 | 0.12.1-2
    <br>
    libreadline6 (>= 6.0) | 6.2-7
    <br>
    libsasl2-2 | 2.1.25.dfsg1-2
    <br>
    libudev0 (>= 0.140) | 172-1
    <br>
    libvirt0 (= 0.9.6-2) | 0.9.6-2
    <br>
    libxenstore3.0 (>= 3.2.0) | 4.1.1-3
    <br>
    libxml2 (>= 2.7.4) | 2.7.8.dfsg-5
    <br>
    libyajl1 (>= 1.0.5) | 1.0.12-1
    <br>
    adduser | 3.113
    <br>
    logrotate | 3.7.8-6
    <br>
    gettext-base | 0.18.1.1-5
    <br>
    <br>
    <br>
    Recommends (Version) | Installed
    <br>
    ==============================-+-============
    <br>
    netcat-openbsd | 1.89-4
    <br>
    bridge-utils | 1.5-2
    <br>
    dnsmasq-base (>= 2.46-1) | 2.59-2
    <br>
    iptables (>= 1.4.10) | 1.4.12-1
    <br>
    qemu-kvm | 0.15.1+dfsg-1
    <br>
    OR qemu (>= 0.9.1) | 0.15.0+dfsg-1
    <br>
    libxml2-utils | 2.7.8.dfsg-5
    <br>
    gawk | 1:3.1.8+dfsg-0.1
    <br>
    ebtables | 2.0.9.2-2
    <br>
    dmidecode | 2.11-4
    <br>
    iproute | 20110629-1
    <br>
    parted | 2.3-8
    <br>
    <br>
    <br>
    Suggests (Version) | Installed
    <br>
    ==========================-+-===========
    <br>
    policykit-1 | 0.102-1
    <br>
    radvd | <br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>