[libvirt] Save & Restore Synchronization

Erkan Unal unal at cs.ualberta.ca
Sun Aug 16 02:36:59 UTC 2009


Hi,

I am using libvirt for qemu/kvm. I have following questions in terms of 
save and restore (Version 0.6.2):

1) As I checked the libvirt code, restore command is asynchronous. There 
is a macro  called VIR_EXEC_NONBLOCK but there is no macro called 
VIR_EXEC_BLOCK. Is it possible to execute the restore in blocking mode 
so that I can measure the whole restore time?

2) I tried to measure the time spent to save the VM. I am executing save 
command and getting a timing. However when I  execute the following 
operations in  order I got an error right after script issues the 
restore operation (No delay between them):

"save->restore->save"

... the error is:

20:19:02.478: error : internal error Unable to open monitor path /dev/pts/3
libvir: QEMU error : internal error Unable to open monitor path /dev/pts/3
20:19:02.478: error : internal error unable to start guest: char device 
redirected to /dev/pts/3
inet_listen: bind(ipv4,127.0.0.1,5912): Address already in use
inet_listen: FAILED

libvir: QEMU error : internal error unable to start guest: char device 
redirected to /dev/pts/3
inet_listen: bind(ipv4,127.0.0.1,5912): Address already in use
inet_listen: FAILED
20:19:02.482: error : operation failed: failed to start VM
libvir: QEMU error : operation failed: failed to start VM
error: Failed to restore domain from /path/to/the/save/file
error: operation failed: failed to start VM

(You can find the detailed error report in the attachement when 
LIBVIRT_DEBUG flag is 1)

I think that some of the cleanup is non-blocking which are cleanup of 
pty device and vncserver. However, I am not sure if destroying the qemu 
process is asynchronous??

P.S.: If I put one second delay between first save and restore, there is 
no error. Save and restore work fine.

Thanks,

Erkan Unal
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libvirtdebug.txt
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090815/09230d95/attachment-0001.txt>


More information about the libvir-list mailing list