backup: improve migrating templates from Qubes 3.x
In Qubes 3.x any PV template had qrexec-agent and gui-agent installed. Adjust features appropriately while restoring them.
This commit is contained in:
parent
abc0d0063e
commit
f89d67c3e3
@ -302,6 +302,11 @@ class Core2Qubes(qubesadmin.backup.BackupApp):
|
||||
vm.properties['provides_network'] = True
|
||||
if vm_class_name == 'QubesNetVm':
|
||||
vm.properties['netvm'] = None
|
||||
if vm_class_name == 'QubesTemplateVm' or \
|
||||
(vm_class_name == 'QubesAppVm' and vm.template is None):
|
||||
# PV VMs in Qubes 3.x assumed gui-agent and qrexec-agent installed
|
||||
vm.features['qrexec'] = True
|
||||
vm.features['gui'] = True
|
||||
if element.get('internal', False) == 'True':
|
||||
vm.features['internal'] = True
|
||||
|
||||
|
@ -159,7 +159,11 @@ parsed_qubes_xml_r2 = {
|
||||
},
|
||||
'devices': {},
|
||||
'tags': set(),
|
||||
'features': {'service.meminfo-writer': True},
|
||||
'features': {
|
||||
'service.meminfo-writer': True,
|
||||
'qrexec': True,
|
||||
'gui': True,
|
||||
},
|
||||
'template': None,
|
||||
'backup_path': None,
|
||||
'included_in_backup': False,
|
||||
@ -320,7 +324,11 @@ parsed_qubes_xml_r2 = {
|
||||
'properties': {'virt_mode': 'pv', 'maxmem': '1535'},
|
||||
'devices': {},
|
||||
'tags': set(),
|
||||
'features': {'service.meminfo-writer': True},
|
||||
'features': {
|
||||
'service.meminfo-writer': True,
|
||||
'qrexec': True,
|
||||
'gui': True,
|
||||
},
|
||||
'template': None,
|
||||
'backup_path': 'vm-templates/test-template-clone',
|
||||
'included_in_backup': True,
|
||||
@ -343,7 +351,11 @@ parsed_qubes_xml_r2 = {
|
||||
'properties': {'virt_mode': 'pv', 'maxmem': '1535'},
|
||||
'devices': {},
|
||||
'tags': set(),
|
||||
'features': {'service.meminfo-writer': True},
|
||||
'features': {
|
||||
'service.meminfo-writer': True,
|
||||
'qrexec': True,
|
||||
'gui': True,
|
||||
},
|
||||
'template': None,
|
||||
'backup_path': 'appvms/test-standalonevm',
|
||||
'included_in_backup': True,
|
||||
|
Loading…
Reference in New Issue
Block a user