mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-07 15:34:05 +03:00
qemu: Fix error when migration with shared TPM storage is unsupported
The VIR_ERR_NO_SUPPORT error is supposed to be used for unsupported driver APIs. It is incorrectly used when swtpm does not support migration with shared storage resulting in a rather strange error message: this function is not supported by the connection driver: the running swtpm does not support migration with shared storage The correct VIR_ERR_OPERATION_UNSUPPORTED error code provides a much better message: Operation not supported: the running swtpm does not support migration with shared storage Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -1723,7 +1723,7 @@ qemuMigrationSrcIsAllowed(virDomainObj *vm,
|
||||
|
||||
if (qemuTPMHasSharedStorage(driver, vm->def) &&
|
||||
!qemuTPMCanMigrateSharedStorage(vm->def)) {
|
||||
virReportError(VIR_ERR_NO_SUPPORT, "%s",
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("the running swtpm does not support migration with shared storage"));
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user