savevm snapshot
I am working on creating a snapshot for ARM based VM running on A7. We don't use disk images, so to save the snapshot I am passing "-drive if=none, format=qcow2, file=/home/sridhar/qemu_disk_images/dummy.qcow2" as dummy disk to save the snapshot. Then from qemu monitor, I run the "savevm" command. The savevm seems to execute and return, however I don't see the RAM being copied correctly, and loadvm fails to restore the VM state.
When I debugged, I can see that in "ram_control_save_page", the condition highlighted in bold below fails and function returns RAM_SAVE_CONTROL_NOT_SUPP.
Am I missing something here? From the documents available on qemu.org, I can see that savevm should take care of saving RAM contents as well, and it should work seamlessly.
Can you help on this?
-Sridhar
| size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset, |
| | ram_addr_t offset, size_t size, |
| | uint64_t *bytes_sent) |
| | { |
| | if (f->hooks && f->hooks->save_page) { |
| | int ret = f->hooks->save_page(f, f->opaque, block_offset, |
| | offset, size, bytes_sent); |
| | |
| | if (ret != RAM_SAVE_CONTROL_DELAYED) { |
| | if (bytes_sent && *bytes_sent > 0) { |
| | qemu_update_position(f, *bytes_sent); |
| | } else if (ret < 0) { |
| | qemu_file_set_error(f, ret); |
| | } |
| | } |
| | |
| | return ret; |
| | } |
| | |
| | return RAM_SAVE_CONTROL_NOT_SUPP; |
| | } |