From e3b49a2167e5210f6984164d30376b4ac11fd245 Mon Sep 17 00:00:00 2001 From: Andrew Laski Date: Tue, 26 Feb 2013 13:47:03 -0500 Subject: Use min_ram of original image for snapshot, even with VHD When snapshotting an instance there seems to be no reason that min_ram can't be set based off of the original image in all cases. This relaxes the restriction that VHD backed instances set min_ram for snapshots based on the current instance. Bug 1133524 Change-Id: I3779c48d7325f3f0bde496f43a70017fe79d2835 --- nova/compute/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index bba6ee1eb..1fab15fb1 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1644,13 +1644,13 @@ class API(base.Base): #disk format of vhd is non-shrinkable if orig_image.get('disk_format') == 'vhd': - min_ram = instance['instance_type']['memory_mb'] min_disk = instance['instance_type']['root_gb'] else: #set new image values to the original image values - min_ram = orig_image.get('min_ram') min_disk = orig_image.get('min_disk') + min_ram = orig_image.get('min_ram') + return min_ram, min_disk def _get_block_device_info(self, context, instance_uuid): -- cgit