KVM中如何实现类似VMWare Workstation在暂停虚拟机的时候能够显示当前屏幕截图?今天看到qemu里面有一个命令: screendump,利用它就可以完成。
QEMU 0.10.50 monitor - type 'help' for more information
(qemu) help screendump
screendump filename -- save screen into PPM image 'filename'
(qemu)
生成的图形文件格式是ppm。在Ubuntu下,apt-get install netpbm可以安装相应的图形转换工具。然后使用pnmtopng就可以转为png格式的图片了。
目前还不能通过libvirt来做这个事情,因为libvirt来还没支持这条命令。也许我可以交个patch?