summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
Diffstat (limited to 'nova')
-rw-r--r--nova/endpoint/cloud.py10
-rw-r--r--nova/flags.py3
2 files changed, 11 insertions, 2 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py
index b4157e48c..344352a93 100644
--- a/nova/endpoint/cloud.py
+++ b/nova/endpoint/cloud.py
@@ -523,9 +523,15 @@ class CloudController(object):
kernel_id = kwargs.get('kernel_id', kernel_id)
ramdisk_id = kwargs.get('ramdisk_id', ramdisk_id)
+ if kernel_id == str(FLAGS.null_kernel):
+ kernel_id = None
+ ramdisk_id = None
+
# make sure we have access to kernel and ramdisk
- self._get_image(context, kernel_id)
- self._get_image(context, ramdisk_id)
+ if kernel_id:
+ self._get_image(context, kernel_id)
+ if ramdisk_id:
+ self._get_image(context, ramdisk_id)
logging.debug("Going to run instances...")
reservation_id = utils.generate_uid('r')
diff --git a/nova/flags.py b/nova/flags.py
index f35f5fa10..caae33e14 100644
--- a/nova/flags.py
+++ b/nova/flags.py
@@ -57,6 +57,9 @@ DEFINE_string('ec2_url',
'http://127.0.0.1:8773/services/Cloud',
'Url to ec2 api server')
+DEFINE_string('null_kernel',
+ 'aki-00000000',
+ 'Kernel image that indicates not to use a kernel (use a raw disk image instead)')
DEFINE_string('default_image',
'ami-11111',
'default image to use, testing only')