backup: change 'hvm' property to 'virt_mode'

QubesOS/qubes-issues#2912
This commit is contained in:
Marek Marczykowski-Górecki 2017-07-17 20:40:08 +02:00
parent ced735b476
commit 96d4a2f066
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 16 additions and 16 deletions

View File

@ -289,7 +289,7 @@ class Core2Qubes(qubesadmin.backup.BackupApp):
if value_is_default and value_is_default.lower() != \
"true":
vm.properties[attr] = value
vm.properties['hvm'] = "HVm" in vm_class_name
vm.properties['virt_mode'] = 'hvm' if "HVm" in vm_class_name else 'pv'
if vm_class_name in ('QubesNetVm', 'QubesProxyVm'):
vm.properties['provides_network'] = True
if vm_class_name == 'QubesNetVm':

View File

@ -154,7 +154,7 @@ parsed_qubes_xml_r2 = {
'klass': 'TemplateVM',
'label': 'black',
'properties': {
'hvm': False,
'virt_mode': 'pv',
'maxmem': '1535',
},
'devices': {},
@ -168,7 +168,7 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM',
'label': 'red',
'properties': {
'hvm': False,
'virt_mode': 'pv',
'maxmem': '1535',
'memory': '200',
'netvm': None,
@ -193,7 +193,7 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM',
'label': 'green',
'properties': {
'hvm': False,
'virt_mode': 'pv',
'maxmem': '1535',
'memory': '200',
'provides_network': True
@ -209,7 +209,7 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM',
'label': 'gray',
'properties': {
'hvm': False,
'virt_mode': 'pv',
'maxmem': '1535',
'vcpus': '1'
},
@ -224,7 +224,7 @@ parsed_qubes_xml_r2 = {
'banking': {
'klass': 'AppVM',
'label': 'green',
'properties': {'hvm': False, 'maxmem': '1535'},
'properties': {'virt_mode': 'pv', 'maxmem': '1535'},
'devices': {},
'tags': set(),
'features': {'services.meminfo-writer': True},
@ -235,7 +235,7 @@ parsed_qubes_xml_r2 = {
'personal': {
'klass': 'AppVM',
'label': 'yellow',
'properties': {'hvm': False, 'maxmem': '1535'},
'properties': {'virt_mode': 'pv', 'maxmem': '1535'},
'devices': {},
'tags': set(),
'features': {'services.meminfo-writer': True},
@ -247,7 +247,7 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM',
'label': 'red',
'properties': {
'hvm': False,
'virt_mode': 'pv',
'maxmem': '1535',
'netvm': 'test-testproxy',
'default_dispvm': 'disp-test-testproxy',
@ -263,7 +263,7 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM',
'label': 'red',
'properties': {
'hvm': False,
'virt_mode': 'pv',
'maxmem': '1535',
'memory': '200',
'provides_network': True},
@ -278,7 +278,7 @@ parsed_qubes_xml_r2 = {
'klass': 'AppVM',
'label': 'red',
'properties': {
'hvm': False,
'virt_mode': 'pv',
'maxmem': '1535',
'memory': '200',
'provides_network': True},
@ -292,7 +292,7 @@ parsed_qubes_xml_r2 = {
'test-testhvm': {
'klass': 'StandaloneVM',
'label': 'purple',
'properties': {'hvm': True, 'memory': '512'},
'properties': {'virt_mode': 'hvm', 'memory': '512'},
'devices': {},
'tags': set(),
'features': {'services.meminfo-writer': False},
@ -304,7 +304,7 @@ parsed_qubes_xml_r2 = {
'test-work': {
'klass': 'AppVM',
'label': 'green',
'properties': {'hvm': False, 'maxmem': '1535'},
'properties': {'virt_mode': 'pv', 'maxmem': '1535'},
'devices': {},
'tags': set(),
'features': {'services.meminfo-writer': True},
@ -315,7 +315,7 @@ parsed_qubes_xml_r2 = {
'test-template-clone': {
'klass': 'TemplateVM',
'label': 'green',
'properties': {'hvm': False, 'maxmem': '1535'},
'properties': {'virt_mode': 'pv', 'maxmem': '1535'},
'devices': {},
'tags': set(),
'features': {'services.meminfo-writer': True},
@ -326,7 +326,7 @@ parsed_qubes_xml_r2 = {
'test-custom-template-appvm': {
'klass': 'AppVM',
'label': 'yellow',
'properties': {'hvm': False, 'maxmem': '1535'},
'properties': {'virt_mode': 'pv', 'maxmem': '1535'},
'devices': {},
'tags': set(),
'features': {'services.meminfo-writer': True},
@ -337,7 +337,7 @@ parsed_qubes_xml_r2 = {
'test-standalonevm': {
'klass': 'StandaloneVM',
'label': 'blue',
'properties': {'hvm': False, 'maxmem': '1535'},
'properties': {'virt_mode': 'pv', 'maxmem': '1535'},
'devices': {},
'tags': set(),
'features': {'services.meminfo-writer': True},
@ -349,7 +349,7 @@ parsed_qubes_xml_r2 = {
'test-net': {
'klass': 'AppVM',
'label': 'red',
'properties': {'hvm': False,
'properties': {'virt_mode': 'pv',
'maxmem': '1535',
'memory': '200',
'netvm': None,