backup: restore Qubes 3.x VMs as HVMs

Make use of better security of Qubes 4.x by using HVM by default. If
some VMs are incompatible with it (like MirageOS based), user can always
switch it to PV manually later.
This commit is contained in:
Marek Marczykowski-Górecki 2017-12-29 17:24:16 +01:00
parent 917df5a8c5
commit 0e033645ad
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 7 additions and 18 deletions

View File

@ -296,8 +296,6 @@ class Core2Qubes(qubesadmin.backup.BackupApp):
# it this way, otherwise some OSes (Windows) will crash because # it this way, otherwise some OSes (Windows) will crash because
# of substantial hardware change # of substantial hardware change
vm.features['linux-stubdom'] = False vm.features['linux-stubdom'] = False
else:
vm.properties['virt_mode'] = 'pv'
if vm_class_name in ('QubesNetVm', 'QubesProxyVm'): if vm_class_name in ('QubesNetVm', 'QubesProxyVm'):
vm.properties['provides_network'] = True vm.properties['provides_network'] = True
if vm_class_name == 'QubesNetVm': if vm_class_name == 'QubesNetVm':

View File

@ -154,7 +154,6 @@ parsed_qubes_xml_r2 = {
'klass': 'TemplateVM', 'klass': 'TemplateVM',
'label': 'black', 'label': 'black',
'properties': { 'properties': {
'virt_mode': 'pv',
'maxmem': '1535', 'maxmem': '1535',
}, },
'devices': {}, 'devices': {},
@ -172,7 +171,6 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'red', 'label': 'red',
'properties': { 'properties': {
'virt_mode': 'pv',
'maxmem': '1535', 'maxmem': '1535',
'memory': '200', 'memory': '200',
'netvm': None, 'netvm': None,
@ -197,7 +195,6 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'green', 'label': 'green',
'properties': { 'properties': {
'virt_mode': 'pv',
'maxmem': '1535', 'maxmem': '1535',
'memory': '200', 'memory': '200',
'provides_network': True 'provides_network': True
@ -213,7 +210,6 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'gray', 'label': 'gray',
'properties': { 'properties': {
'virt_mode': 'pv',
'maxmem': '1535', 'maxmem': '1535',
'vcpus': '1' 'vcpus': '1'
}, },
@ -228,7 +224,7 @@ parsed_qubes_xml_r2 = {
'banking': { 'banking': {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'green', 'label': 'green',
'properties': {'virt_mode': 'pv', 'maxmem': '1535'}, 'properties': {'maxmem': '1535'},
'devices': {}, 'devices': {},
'tags': set(), 'tags': set(),
'features': {'service.meminfo-writer': True}, 'features': {'service.meminfo-writer': True},
@ -239,7 +235,7 @@ parsed_qubes_xml_r2 = {
'personal': { 'personal': {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'yellow', 'label': 'yellow',
'properties': {'virt_mode': 'pv', 'maxmem': '1535'}, 'properties': {'maxmem': '1535'},
'devices': {}, 'devices': {},
'tags': set(), 'tags': set(),
'features': {'service.meminfo-writer': True}, 'features': {'service.meminfo-writer': True},
@ -251,7 +247,6 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'red', 'label': 'red',
'properties': { 'properties': {
'virt_mode': 'pv',
'maxmem': '1535', 'maxmem': '1535',
'netvm': 'test-testproxy', 'netvm': 'test-testproxy',
'default_dispvm': 'disp-test-testproxy', 'default_dispvm': 'disp-test-testproxy',
@ -267,7 +262,6 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'red', 'label': 'red',
'properties': { 'properties': {
'virt_mode': 'pv',
'maxmem': '1535', 'maxmem': '1535',
'memory': '200', 'memory': '200',
'provides_network': True}, 'provides_network': True},
@ -282,7 +276,6 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'red', 'label': 'red',
'properties': { 'properties': {
'virt_mode': 'pv',
'maxmem': '1535', 'maxmem': '1535',
'memory': '200', 'memory': '200',
'provides_network': True}, 'provides_network': True},
@ -310,7 +303,7 @@ parsed_qubes_xml_r2 = {
'test-work': { 'test-work': {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'green', 'label': 'green',
'properties': {'virt_mode': 'pv', 'maxmem': '1535'}, 'properties': {'maxmem': '1535'},
'devices': {}, 'devices': {},
'tags': set(), 'tags': set(),
'features': {'service.meminfo-writer': True}, 'features': {'service.meminfo-writer': True},
@ -321,7 +314,7 @@ parsed_qubes_xml_r2 = {
'test-template-clone': { 'test-template-clone': {
'klass': 'TemplateVM', 'klass': 'TemplateVM',
'label': 'green', 'label': 'green',
'properties': {'virt_mode': 'pv', 'maxmem': '1535'}, 'properties': {'maxmem': '1535'},
'devices': {}, 'devices': {},
'tags': set(), 'tags': set(),
'features': { 'features': {
@ -337,7 +330,7 @@ parsed_qubes_xml_r2 = {
'test-custom-template-appvm': { 'test-custom-template-appvm': {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'yellow', 'label': 'yellow',
'properties': {'virt_mode': 'pv', 'maxmem': '1535'}, 'properties': {'maxmem': '1535'},
'devices': {}, 'devices': {},
'tags': set(), 'tags': set(),
'features': {'service.meminfo-writer': True}, 'features': {'service.meminfo-writer': True},
@ -348,7 +341,7 @@ parsed_qubes_xml_r2 = {
'test-standalonevm': { 'test-standalonevm': {
'klass': 'StandaloneVM', 'klass': 'StandaloneVM',
'label': 'blue', 'label': 'blue',
'properties': {'virt_mode': 'pv', 'maxmem': '1535'}, 'properties': {'maxmem': '1535'},
'devices': {}, 'devices': {},
'tags': set(), 'tags': set(),
'features': { 'features': {
@ -364,7 +357,7 @@ parsed_qubes_xml_r2 = {
'test-net': { 'test-net': {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'red', 'label': 'red',
'properties': {'virt_mode': 'pv', 'properties': {
'maxmem': '1535', 'maxmem': '1535',
'memory': '200', 'memory': '200',
'netvm': None, 'netvm': None,
@ -606,7 +599,6 @@ parsed_qubes_xml_v4 = {
'klass': 'AppVM', 'klass': 'AppVM',
'label': 'red', 'label': 'red',
'properties': { 'properties': {
'virt_mode': 'pv',
'autostart': 'True', 'autostart': 'True',
'maxmem': '400', 'maxmem': '400',
'provides_network': 'True', 'provides_network': 'True',

View File

@ -421,7 +421,6 @@
<properties> <properties>
<property name="autostart">True</property> <property name="autostart">True</property>
<property name="label">label-1</property> <property name="label">label-1</property>
<property name="virt_mode">pv</property>
<property name="maxmem">400</property> <property name="maxmem">400</property>
<property name="name">sys-usb</property> <property name="name">sys-usb</property>
<property name="qid">5</property> <property name="qid">5</property>