From b980de7cd1ac0e9085c20392bf82d1d3b12b24e8 Mon Sep 17 00:00:00 2001 From: Nicolas Simonds Date: Thu, 25 Apr 2013 13:07:06 -0700 Subject: Fix missing kernel output via VNC/Spice on boot Bug 1164021 Use both ttys0 and tty0 as console options to the kernel during boot. Change-Id: I0365ff7cad021fb6ca551651d00d58297087e95e --- nova/virt/libvirt/driver.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 2c08a913e..2a246d439 100755 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -2134,6 +2134,8 @@ class LibvirtDriver(driver.ComputeDriver): inst_path = libvirt_utils.get_instance_path(instance) disk_mapping = disk_info['mapping'] + CONSOLE = "console=tty0 console=ttyS0" + guest = vconfig.LibvirtConfigGuest() guest.virt_type = CONF.libvirt_type guest.name = instance['name'] @@ -2186,7 +2188,7 @@ class LibvirtDriver(driver.ComputeDriver): if CONF.libvirt_type == "lxc": guest.os_type = vm_mode.EXE guest.os_init_path = "/sbin/init" - guest.os_cmdline = "console=ttyS0" + guest.os_cmdline = CONSOLE elif CONF.libvirt_type == "uml": guest.os_type = vm_mode.UML guest.os_kernel = "/usr/bin/linux" @@ -2203,8 +2205,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) + guest.os_cmdline = ("root=%s %s" % (root_device_name, + CONSOLE)) if rescue.get('ramdisk_id'): guest.os_initrd = os.path.join(inst_path, "ramdisk.rescue") @@ -2213,8 +2215,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) + guest.os_cmdline = ("root=%s %s" % (root_device_name, + CONSOLE)) if instance['ramdisk_id']: guest.os_initrd = os.path.join(inst_path, "ramdisk") else: -- cgit