Merge "Log early boot of Ironic VMs to serial with sgabios"

This commit is contained in:
Jenkins 2014-11-18 15:21:36 +00:00 committed by Gerrit Code Review
commit 9b4b2913f9
5 changed files with 13 additions and 0 deletions

View File

@ -12,6 +12,7 @@ python-libvirt
qemu qemu
qemu-kvm qemu-kvm
qemu-utils qemu-utils
sgabios
syslinux syslinux
tftpd-hpa tftpd-hpa
xinetd xinetd

View File

@ -9,6 +9,7 @@ net-tools
openssh-clients openssh-clients
openvswitch openvswitch
python-libguestfs python-libguestfs
sgabios
syslinux syslinux
tftp-server tftp-server
xinetd xinetd

View File

@ -147,6 +147,14 @@ function install_ironic {
if [[ "$IRONIC_IPXE_ENABLED" == "True" ]] ; then if [[ "$IRONIC_IPXE_ENABLED" == "True" ]] ; then
install_apache_wsgi install_apache_wsgi
fi fi
if [[ "$IRONIC_VM_LOG_CONSOLE" == "True" ]] && is_ubuntu; then
# Ubuntu packaging+apparmor issue prevents libvirt from loading
# the ROM from /usr/share/misc. Workaround by installing it directly
# to a directory that it can read from. (LP: #1393548)
sudo rm -rf /usr/share/qemu/sgabios.bin
sudo cp /usr/share/misc/sgabios.bin /usr/share/qemu/sgabios.bin
fi
} }
# install_ironicclient() - Collect sources and prepare # install_ironicclient() - Collect sources and prepare

View File

@ -78,8 +78,10 @@ def main():
params['emulator'] = "/usr/bin/qemu-kvm" params['emulator'] = "/usr/bin/qemu-kvm"
if args.console_log: if args.console_log:
params['bios_serial'] = "<bios useserial='yes'/>"
params['console_log'] = CONSOLE_LOG % {'console_log': args.console_log} params['console_log'] = CONSOLE_LOG % {'console_log': args.console_log}
else: else:
params['bios_serial'] = ''
params['console_log'] = '' params['console_log'] = ''
libvirt_template = source_template % params libvirt_template = source_template % params
conn = libvirt.open("qemu:///system") conn = libvirt.open("qemu:///system")

View File

@ -6,6 +6,7 @@
<type arch='%(arch)s' machine='pc-1.0'>hvm</type> <type arch='%(arch)s' machine='pc-1.0'>hvm</type>
<boot dev='%(bootdev)s'/> <boot dev='%(bootdev)s'/>
<bootmenu enable='no'/> <bootmenu enable='no'/>
%(bios_serial)s
</os> </os>
<features> <features>
<acpi/> <acpi/>