=Comment: #1=================================================
ANOOP C. VIJAYAN <email address hidden> -
The save hangs because the qemu process is not able to write to the file which libvirtd created.
This happens because qemu-kvm runs with uid of qemu user whereas libvirtd runs as a root user.
Moreover libvirtd creates the save file with only owner (root) read & write permissions.
=Comment: #0===== ======= ======= ======= ======= ======= ======= ==
SANTWANA SAMANTRAY <email address hidden> -
virsh save of the kvm guest hangs in Fedora12 rawhide.
After this, virsh doesn't respond properly, and even restarting libvirtd doesn't help.
Attachment: dmesg and strace of virsh save
[root@mx3550 ~]# strace -o virsh_save -f virsh save rhel6 /home/latest_save
-------HANGS HERE-----------
uname -a :Linux mx3550.in.ibm.com 2.6.31. 5-96.fc12. x86_64 #1 SMP Fri Oct 23 19:30:30 EDT 2009 x86_64
x86_64 x86_64 GNU/Linux
Below are the versions installed: client- 0.7.1-13. fc12.x86_ 64 debuginfo- 0.7.1-13. fc12.x86_ 64 devel-0. 7.1-13. fc12.x86_ 64 python- 0.7.1-13. fc12.x86_ 64 0.7.1-13. fc12.x86_ 64
[root@mx3550 ~]# rpm -qa|grep libvirt
libvirt-
libvirt-
libvirt-
libvirt-
libvirt-
[root@mx3550 ~]# rpm -qa|grep kvm 0.11.0- 9.fc12. x86_64
qemu-kvm-
=Comment: #1===== ======= ======= ======= ======= ======= ======= ==
ANOOP C. VIJAYAN <email address hidden> -
The save hangs because the qemu process is not able to write to the file which libvirtd created.
This happens because qemu-kvm runs with uid of qemu user whereas libvirtd runs as a root user.
Moreover libvirtd creates the save file with only owner (root) read & write permissions.
[root@mx3550 ~]# tail /var/log/ libvirt/ qemu/rhel6. log /usr/sbin: /bin:/usr/ bin HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none e42a-d493- f037-0425f580cb 9d lib/libvirt/ qemu/rhel6. monitor, server, nowait -boot c -drive lib/libvirt/ images/ rhel6.raw, if=ide, index=0, boot=on, format= raw -drive ide,media= cdrom,index= 2 -net nic,macaddr= 52:54:00: 39:3f:5c, vlan=0, name=nic. 0 -net 17,vlan= 0,name= tap.0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -vga cirrus
LC_ALL=C PATH=/sbin:
/usr/bin/qemu-kvm -S -M pc-0.11 -m 500 -smp 1 -name rhel6 -uuid 47b90387-
-monitor unix:/var/
file=/var/
file=,if=
tap,fd=
char device redirected to /dev/pts/1
sh: /home/newguest: Permission denied <=======
[root@mx3550 ~]# ls -l /home/newguest
-rw------- 1 root root 1468 2009-11-03 15:59 /home/newguest
[root@mx3550 ~]# ps -eaf|grep qemu e42a-d493- f037-0425f580cb 9d -monitor lib/libvirt/ qemu/rhel6. monitor, server, nowait -boot c -drive lib/libvirt/ images/ rhel6.raw, if=ide, index=0, boot=on, format= raw -drive ide,media= cdrom,index= 2 -net nic,macaddr= 52:54:00: 39:3f:5c, vlan=0, name=nic. 0 -net 17,vlan= 0,name= tap.0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -vga cirrus
qemu 4616 1 71 15:56 ? 00:00:28 /usr/bin/qemu-kvm -S -M pc-0.11 -m 500 -smp 1 -name
rhel6 -uuid 47b90387-
unix:/var/
file=/var/
file=,if=
tap,fd=
[root@mx3550 ~]# ps -eaf|grep libvirtd
root 3800 1 0 15:32 ? 00:00:02 libvirtd --daemon
file: libvirt- 0.7.1/src/ qemu_driver. c (virDomainPtr dom, ------- --- O_TRUNC| O_WRONLY, S_IRUSR|S_IWUSR)) < 0) { r(dom-> conn, dom, NULL, VIR_ERR_ OPERATION_ FAILED,
3803 static int qemudDomainSave
3804 const char *path)
3805 {
------cut-
3874 /* Write header to file, followed by XML */
3875 if ((fd = open(path, O_CREAT|
3876 qemudReportErro
3877 _("failed to create '%s'"), path);