after rename a domain which has managedsave file, the new name domain can't boot up from the state it saved, and the managedsave file will exist with the original name. Signed-off-by: Shanzhi Yu <shyu@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4bd4071..036a367 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20000,6 +20000,12 @@ static int qemuDomainRename(virDomainPtr dom, goto endjob; } + if (vm->hasManagedSave) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("can't rename a domain has managedsave file")); + goto endjob; + } + if (virDomainObjListRename(driver->domains, vm, new_name, flags, qemuDomainRenameCallback, driver) < 0) goto endjob; -- 2.5.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list