diff options
author | Jenkins <jenkins@review.openstack.org> | 2012-12-21 05:13:16 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-12-21 05:13:16 +0000 |
commit | 2a57e53855fcbccb8f5fe399f557f98494540e61 (patch) | |
tree | e41f798cc7f25e27c2409cf20810923a480f42ab | |
parent | 366270451892ad6b94872e7d13e9da998d0b2606 (diff) | |
parent | 3b8e122f7ddaa1382036f1f4d0c1f833f8d7deaa (diff) | |
download | nova-2a57e53855fcbccb8f5fe399f557f98494540e61.tar.gz nova-2a57e53855fcbccb8f5fe399f557f98494540e61.tar.xz nova-2a57e53855fcbccb8f5fe399f557f98494540e61.zip |
Merge "fix instance rescue without cmdline params in xml.rescue."
-rw-r--r-- | nova/virt/libvirt/driver.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index dc1ab3936..97ee4bb70 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -1805,6 +1805,12 @@ class LibvirtDriver(driver.ComputeDriver): guest.os_kernel = os.path.join(CONF.instances_path, instance['name'], "kernel.rescue") + if CONF.libvirt_type == "xen": + guest.os_cmdline = "ro" + else: + guest.os_cmdline = ("root=%s console=ttyS0" % + (root_device_name or "/dev/vda",)) + if rescue.get('ramdisk_id'): guest.os_initrd = os.path.join(CONF.instances_path, instance['name'], @@ -1816,8 +1822,8 @@ class LibvirtDriver(driver.ComputeDriver): if CONF.libvirt_type == "xen": guest.os_cmdline = "ro" else: - guest.os_cmdline = "root=%s console=ttyS0" % ( - root_device_name or "/dev/vda",) + guest.os_cmdline = ("root=%s console=ttyS0" % + (root_device_name or "/dev/vda",)) if instance['ramdisk_id']: guest.os_initrd = os.path.join(CONF.instances_path, instance['name'], |