To date, JSON disk snapshots worked by accident, as they were always
using hmp fallback due to a typo in commit
e702b5b not picking up
on the (intentional) difference in command names between the two
monitor protocols.
* src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskSnapshot):
Spell QMP command correctly.
Reported by Luiz Capitulino.
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
- cmd = qemuMonitorJSONMakeCommand("snapshot-blkdev-sync",
+ cmd = qemuMonitorJSONMakeCommand("blockdev-snapshot-sync",
"s:device", device,
"s:snapshot-file", file,
NULL);
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
qemuMonitorCheckHMP(mon, "snapshot_blkdev")) {
- VIR_DEBUG("snapshot-blkdev-sync command not found, trying HMP");
+ VIR_DEBUG("blockdev-snapshot-sync command not found, trying HMP");
ret = qemuMonitorTextDiskSnapshot(mon, device, file);
goto cleanup;
}