Log early boot of Ironic VMs to serial with sgabios
This adds sgabios to the list of packages for Ironic and configures the libvirt domain to redirect BIOS messages to serial via sgabios, when console logging is enabled. The sgabios package in Ubuntu currently has an apparmor bug, so that is worked around here. This allows visibility into early boot of Ironic nodes and should help get to the bottom of a frequent failure we're seeing in the gate. Change-Id: Ifd18851e2d23d198d36e67883a81afc6a92d2a58 Related-Bug: #1393099
This commit is contained in:
parent
9bfdea87a6
commit
ffd66ad77f
@ -12,6 +12,7 @@ python-libvirt
|
||||
qemu
|
||||
qemu-kvm
|
||||
qemu-utils
|
||||
sgabios
|
||||
syslinux
|
||||
tftpd-hpa
|
||||
xinetd
|
||||
|
@ -9,6 +9,7 @@ net-tools
|
||||
openssh-clients
|
||||
openvswitch
|
||||
python-libguestfs
|
||||
sgabios
|
||||
syslinux
|
||||
tftp-server
|
||||
xinetd
|
||||
|
@ -147,6 +147,14 @@ function install_ironic {
|
||||
if [[ "$IRONIC_IPXE_ENABLED" == "True" ]] ; then
|
||||
install_apache_wsgi
|
||||
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
|
||||
|
@ -78,8 +78,10 @@ def main():
|
||||
params['emulator'] = "/usr/bin/qemu-kvm"
|
||||
|
||||
if args.console_log:
|
||||
params['bios_serial'] = "<bios useserial='yes'/>"
|
||||
params['console_log'] = CONSOLE_LOG % {'console_log': args.console_log}
|
||||
else:
|
||||
params['bios_serial'] = ''
|
||||
params['console_log'] = ''
|
||||
libvirt_template = source_template % params
|
||||
conn = libvirt.open("qemu:///system")
|
||||
|
@ -6,6 +6,7 @@
|
||||
<type arch='%(arch)s' machine='pc-1.0'>hvm</type>
|
||||
<boot dev='%(bootdev)s'/>
|
||||
<bootmenu enable='no'/>
|
||||
%(bios_serial)s
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
|
Loading…
Reference in New Issue
Block a user