From 8ddbbf095136333cb9f2f4c7d60e37f70c759776 Mon Sep 17 00:00:00 2001 From: Nicholas Kuechler Date: Fri, 1 Feb 2013 11:04:01 -0600 Subject: Move allowvssprovider=false to vm-data field Currently we're setting allowvssprovider=false in the other-config field. However, this setting is not honored in the other-config field, allowing vss-based snapshots to be created. The allowvssprovider=false should be moved to the vm-data field in xenstore as that field is used to decide whether vss snapshotting is allowed or not. Amended to change: 'str(False)' to 'false'. Relevant code: https://github.com/openstack/nova/blob/master/nova/virt/xenapi/vm_utils.py#L233 Manually set allowvssprovider=false in the vm-data field: xe vm-param-set uuid= xenstore-data:vm-data/allowvssprovider=false References: https://github.com/mcclurmc/xcp-storage-managers/blob/master/drivers/vss_control#L38 https://github.com/mcclurmc/xcp-storage-managers/blob/master/snapwatchd/snapwatchd#L298 Change-Id: I96efbc18cb7eb0ee2d0e6526b3c4f3502a68e1dd Fixes: bug #1112673 --- nova/virt/xenapi/vm_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index ec6450d9f..4659de880 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -230,8 +230,7 @@ def create_vm(session, instance, name_label, kernel, ramdisk, 'memory_target': mem, 'name_description': '', 'name_label': name_label, - 'other_config': {'allowvssprovider': str(False), - 'nova_uuid': str(instance['uuid'])}, + 'other_config': {'nova_uuid': str(instance['uuid'])}, 'PCI_bus': '', 'platform': {'acpi': 'true', 'apic': 'true', 'pae': 'true', 'viridian': 'true', 'timeoffset': '0'}, @@ -247,7 +246,7 @@ def create_vm(session, instance, name_label, kernel, ramdisk, 'VCPUs_at_startup': vcpus, 'VCPUs_max': vcpus, 'VCPUs_params': {}, - 'xenstore_data': {}} + 'xenstore_data': {'allowvssprovider': 'false'}} # Complete VM configuration record according to the image type # non-raw/raw with PV kernel/raw in HVM mode -- cgit