From ed118dfd6ebe06a095620e93f4318c4e7ac9cfed Mon Sep 17 00:00:00 2001 From: Renuka Apte Date: Mon, 4 Jun 2012 13:48:34 -0700 Subject: Boot from volume for Xen Implements bp xenapi-boot-from-volume Ensure boot from volume works for XenAPI (tested using XenServer). 1. Add strip_prefix to block_device to make the command mountpoint agnostic. 2. Pass block device and delete on terminate information to driver layer. 3. Add ability to recognize and boot from the specified nova volume. Change-Id: If117087086eab809217d2b173f921bf9319a52c7 --- nova/compute/manager.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/manager.py b/nova/compute/manager.py index aacfdf7a7..7720b3190 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -430,9 +430,10 @@ class ComputeManager(manager.SchedulerDependentManager): self.db.block_device_mapping_update( context, bdm['id'], {'connection_info': jsonutils.dumps(cinfo)}) - block_device_mapping.append({'connection_info': cinfo, - 'mount_device': - bdm['device_name']}) + bdmap = {'connection_info': cinfo, + 'mount_device': bdm['device_name'], + 'delete_on_termination': bdm['delete_on_termination']} + block_device_mapping.append(bdmap) return { 'root_device_name': instance['root_device_name'], @@ -685,9 +686,10 @@ class ComputeManager(manager.SchedulerDependentManager): for bdm in bdms: try: cinfo = jsonutils.loads(bdm['connection_info']) - block_device_mapping.append({'connection_info': cinfo, - 'mount_device': - bdm['device_name']}) + bdmap = {'connection_info': cinfo, + 'mount_device': bdm['device_name'], + 'delete_on_termination': bdm['delete_on_termination']} + block_device_mapping.append(bdmap) except TypeError: # if the block_device_mapping has no value in connection_info # (returned as None), don't include in the mapping -- cgit