dom0/backup-restore: support for restore of HVM
This commit is contained in:
parent
85609a764f
commit
13d1080eb0
@ -885,8 +885,7 @@ def backup_restore_print_summary(restore_info, print_callback = print_stdout):
|
||||
+ ('}' if vm.is_netvm() else '')"},
|
||||
|
||||
"type": {"func": "'Tpl' if vm.is_template() else \
|
||||
('Proxy' if vm.is_proxyvm() else \
|
||||
(' Net' if vm.is_netvm() else 'App'))"},
|
||||
vm.type.replace('VM','')"},
|
||||
|
||||
"updbl" : {"func": "'Yes' if vm.updateable else ''"},
|
||||
|
||||
@ -1135,10 +1134,14 @@ def backup_restore_do(backup_dir, restore_info, host_collection = None, print_ca
|
||||
new_vm = None
|
||||
try:
|
||||
restore_vm_dir (backup_dir, vm.dir_path, qubes_appvms_dir);
|
||||
new_vm = host_collection.add_new_appvm(vm.name, template,
|
||||
conf_file=vm.conf_file,
|
||||
dir_path=vm.dir_path,
|
||||
label=vm.label)
|
||||
if vm.type == "HVM":
|
||||
new_vm = host_collection.add_new_hvm(vm.name,
|
||||
label=vm.label)
|
||||
else:
|
||||
new_vm = host_collection.add_new_appvm(vm.name, template,
|
||||
conf_file=vm.conf_file,
|
||||
dir_path=vm.dir_path,
|
||||
label=vm.label)
|
||||
except Exception as err:
|
||||
error_callback("ERROR: {0}".format(err))
|
||||
error_callback("*** Skiping VM: {0}".format(vm.name))
|
||||
|
Loading…
Reference in New Issue
Block a user