Description of problem: 'migration' async event is only provided for tcp migration; we need it in migration from file (done with exec), too.
Created attachment 345322 [details] qemu: add "-notify" command line option to enable async notifications Patch that is currently on the git patch queue.
Created attachment 345323 [details] migration: exec: notify upon successful completion of migration Patch that is currently on the git patch queue.
Patch posted for review and queued. Changing status to POST
Created attachment 346276 [details] qemu: add "-notify" command line option to enable async notifications (v2) Patch that is currently on the git patch queue.
Created attachment 346277 [details] migration: exec: notify upon successful completion of migration (v2) Patch that is currently on the git patch queue.
Created attachment 346278 [details] asynchronous notifications: add "all" event (v2) Patch that is currently on the git patch queue.
Created attachment 346279 [details] exec-migration: handle EINTR in popen_get_buffer() Patch that is currently on the git patch queue.
Tested migration with "-incoming "exec: gzip..." notification is printed . # /usr/libexec/qemu-kvm -no-hpet -rtc-td-hack -smp 2 -m 4096 -name vm1 -drive file=/mnt/5u4_x86_64.qcow2,if=ide,index=0 -uuid 9e29a742-a170-41f4-b484-8c03a6fcbbac -net nic,macaddr=00:21:9B:FF:B5:80,model=rtl8139 -net tap,vlan=0,ifname=AUTOTEST_270,script=/etc/qemu-ifup,downscript=no -usbdevice tablet -vnc :10 -monitor stdio -boot c -incoming "exec: gzip -c -d STATEFILE.gz" -notify migration QEMU 0.9.1 monitor - type 'help' for more information (qemu) qemu_popen: returning result of qemu_fopen_ops # migration: migration process finished (qemu) info status VM status: running (qemu) (qemu) quit # /usr/libexec/qemu-kvm -no-hpet -rtc-td-hack -smp 2 -m 4096 -name vm1 -drive file=/mnt/5u4_x86_64.qcow2,if=ide,index=0 -uuid 9e29a742-a170-41f4-b484-8c03a6fcbbac -net nic,macaddr=00:21:9B:FF:B5:80,model=rtl8139 -net tap,vlan=0,ifname=AUTOTEST_270,script=/etc/qemu-ifup,downscript=no -usbdevice tablet -vnc :10 -monitor stdio -boot c -incoming "exec: gzip -c -d STATEFILE.gz" -notify all QEMU 0.9.1 monitor - type 'help' for more information (qemu) qemu_popen: returning result of qemu_fopen_ops # migration: migration process finished (qemu) info status VM status: running (qemu)
Verified the help message is printed : # /usr/libexec/qemu-kvm --help | grep notify -notify event enable async-notifications for event
verified *all* event is added into qemu monitor help: (qemu) help notify notify vnc|rtc|migration|reboot|shutdown|vmstop|watermark|vdi|all on|off -- enable / disable printing of notifications for the specified event with qemu monitor command * notify all on * . and CLI option *-notify all* verified notification of events: vnc/rtc/migration/reboot/shutdown is printed : #/usr/libexec/qemu-kvm -no-hpet -rtc-td-hack -smp 2 -m 4096 -name vm1 -drive file=/mnt/RHEL-Server-5.3-32.qcow2,if=ide,index=0 -uuid 9e29a742-a170-41f4-b484-8c03a6fcbbac -net nic,macaddr=00:21:9B:FF:B5:80,model=rtl8139 -net tap,vlan=0,ifname=AUTOTEST_270,script=/etc/qemu-ifup,downscript=no -usbdevice tablet -vnc :10 -monitor stdio -boot c QEMU 0.9.1 monitor - type 'help' for more information (qemu) notify all on (qemu) # VNC: Closing down connection [::]:10 // printed when closing vnc connection (qemu) # GUEST: Got reboot request // printed when rebooting guest (qemu) # RTC: new time is UTC+472 // printed when reset guest's time # GUEST: Got shutdown request //printed when guest is down. verified invalid input could be handled .
/usr/libexec/qemu-kvm -no-hpet -rtc-td-hack -smp 2 -m 2G -name vm1 -drive file=/mnt/my/clone5.4-64,if=ide -drive file=/mnt/Fedora-11-32.qcow2,index=2,media=cdrom -uuid c585c8d3-0ff2-4dba-9710-d894efc0b24b -net nic,macaddr=00:24:7E:11:91:C8,model=e1000 -net tap,vlan=0,script=/etc/qemu-ifup -usbdevice tablet -vnc :8 -monitor stdio -boot c QEMU 0.9.1 monitor - type 'help' for more information (qemu) notify watermark on (qemu) block_set_watermark ide0-hd0 10 (qemu) # high watermark reached for ide0-hd0 alloc=17170432 mark=10485760
## verify vmstop notification: command used: /usr/libexec/qemu-kvm -no-hpet -rtc-td-hack -smp 2 -m 4G -name vm1 -drive file=/opt/rhel5.4-64,if=ide,werror=stop -drive file=/mnt/ISO/RHEL-Server-5.4/64/RHEL-Server-5.4-x86_64.DVD,index=2,media=cdrom -uuid `uuidgen` -net nic,macaddr=00:81:9B:FF:B8:08,model=e1000 -net tap,vlan=0,script=/etc/qemu-ifup -usbdevice tablet -vnc :8 -monitor stdio -boot d Steps: 1. create a lv with 1G space. 2. mount lv on /opt 3. create a qcow2 image with 10G space in lv, and install rhel5.4 in the image file. (qemu) notify all on (qemu) # VM is stopped due to disk write error: ide0-hd0: No space left on device
## vdi notification: command used: /usr/libexec/qemu-kvm -drive file=/mnt/shuang/RHEL-3.9-64.qcow2,if=ide,cache=off,index=0 -no-hpet -usbdevice tablet -rtc-td-hack -smp 2 -m 2G -uuid `uuidgen` -net nic,model=e1000,macaddr=00:86:FD:08:95:DF,vlan=0 -net tap,vlan=0,script=/etc/qemu-ifup -cpu qemu64,+sse2 -boot c -spice host=0,ic=on,port=5930,disable-ticketing -qxl 1 -balloon none -monitor stdio Steps: 1. start vm with the command up 2. view vm with spice 3. close spice. (qemu) notify vdi on (qemu) reds_handle_main_link: # spice: new user connection reds_show_new_channel: channel 1:0, connected sucessfully, over Non Secure link reds_show_new_channel: channel 4:0, connected sucessfully, over Non Secure link red_dispatcher_set_cursor_peer: handle_dev_input: cursor connect reds_show_new_channel: channel 3:0, connected sucessfully, over Non Secure link # spice: keybord channel is unsecure inputs_link: reds_show_new_channel: channel 2:0, connected sucessfully, over Non Secure link red_dispatcher_set_peer: handle_dev_input: connect reds_disconnect: # spice: user disconnected red_dispatcher_shutdown_cursor_peer: red_dispatcher_shutdown_peer: handle_dev_input: cursor disconnect handle_dev_input: disconnect ## when set "notify all off" no notification is printed.
Change the status to *VERIFIED* according to the test result.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1272.html