backup: fixup restore options just before restoring VMs
When user included/excluded some VMs for restoration, it may be neceesarry to fix dependencies between them (for example when default template is no longer going to be restored). Also fix handling conflicting names.
This commit is contained in:
parent
043d20c05d
commit
af182c4fd1
@ -2021,7 +2021,7 @@ class BackupRestore(object):
|
|||||||
vm_info.problems.add(self.VMToRestore.EXCLUDED)
|
vm_info.problems.add(self.VMToRestore.EXCLUDED)
|
||||||
|
|
||||||
if not self.options.verify_only and \
|
if not self.options.verify_only and \
|
||||||
vm in self.app.domains:
|
vm_info.name in self.app.domains:
|
||||||
if self.options.rename_conflicting:
|
if self.options.rename_conflicting:
|
||||||
new_name = self.generate_new_name_for_conflicting_vm(
|
new_name = self.generate_new_name_for_conflicting_vm(
|
||||||
vm, restore_info
|
vm, restore_info
|
||||||
@ -2343,6 +2343,8 @@ class BackupRestore(object):
|
|||||||
|
|
||||||
# FIXME handle locking
|
# FIXME handle locking
|
||||||
|
|
||||||
|
restore_info = self.restore_info_verify(restore_info)
|
||||||
|
|
||||||
self._restore_vms_metadata(restore_info)
|
self._restore_vms_metadata(restore_info)
|
||||||
|
|
||||||
# Perform VM restoration in backup order
|
# Perform VM restoration in backup order
|
||||||
|
Loading…
Reference in New Issue
Block a user