backup: skip dom0's properties while restoring core2 backup

Fixes QubesOS/qubes-issues#3467
This commit is contained in:
Marek Marczykowski-Górecki 2018-02-14 04:04:29 +01:00
parent e81c2f3cf6
commit 04635e7e80
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -267,6 +267,15 @@ class Core2Qubes(qubesadmin.backup.BackupApp):
vm.template = \
self.qid_map[int(element.get('template_qid'))]
vm.klass = "AppVM"
vm.backup_content = element.get('backup_content', False) == 'True'
vm.backup_path = element.get('backup_path', None)
vm.size = element.get('backup_size', 0)
if vm.klass == 'AdminVM':
# don't set any other dom0 property
return
# simple attributes
for attr, default in {
#'installed_by_rpm': 'False',
@ -324,10 +333,6 @@ class Core2Qubes(qubesadmin.backup.BackupApp):
feature = repl_feature
vm.features[feature] = value
vm.backup_content = element.get('backup_content', False) == 'True'
vm.backup_path = element.get('backup_path', None)
vm.size = element.get('backup_size', 0)
pci_strictreset = element.get('pci_strictreset', True)
pcidevs = element.get('pcidevs')
if pcidevs: