Restore on suspend gives "image magic is incorrect" Error
|Assignee:||Jaime Melis||% Done:|
|Target version:||Release 4.14.2|
|Affected Versions:||OpenNebula 4.14|
Running Ubuntu 15.04, kernel 3.19.0-15-generic. When trying to restore the VM from suspended state, libvirtd gives error:
libvirtd1021: operation failed: image magic is incorrect
#1 Updated by Rachel Chen over 5 years ago
root@concertato:~# qemu-system-x86_64 --version
QEMU emulator version 2.2.0 (Debian 1:2.2+dfsg-5expubuntu9.5), Copyright (c) 2003-2008 Fabrice Bellard
root@concertato:~# libvirtd --version
libvirtd (libvirt) 1.2.12
root@concertato:~# qemu-img --version
qemu-img version 2.2.0, Copyright (c) 2004-2008 Fabrice Bellard
1. Using "file" command and I figured that the template from Marketplace is on QCOW v2, and I think that's what causing the magic block invalid. Using qemu-img to convert the template to compact=1.1(QCOW v3) solves the "image magic is incorrect" error.
2. However it introduces another error when using QCOW v3 to suspend/restore. libvirtd crashed with segfault when trying to "restore" for some reason. "checkpoint" is there however "checkpoint.xml" is empty. Therefore changing the "restore" in the KVM driver to NOT generate a XML solved the problem.
Please look into this issue.