diff --git a/files/apts/ironic b/files/apts/ironic
index 45fdeccbb4..f6c7b74494 100644
--- a/files/apts/ironic
+++ b/files/apts/ironic
@@ -12,6 +12,7 @@ python-libvirt
qemu
qemu-kvm
qemu-utils
+sgabios
syslinux
tftpd-hpa
xinetd
diff --git a/files/rpms/ironic b/files/rpms/ironic
index e646f3a8aa..0a46314964 100644
--- a/files/rpms/ironic
+++ b/files/rpms/ironic
@@ -9,6 +9,7 @@ net-tools
openssh-clients
openvswitch
python-libguestfs
+sgabios
syslinux
tftp-server
xinetd
diff --git a/lib/ironic b/lib/ironic
index afe69f2df8..a8a78d42b2 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -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
diff --git a/tools/ironic/scripts/configure-vm b/tools/ironic/scripts/configure-vm
index 4c42c491c5..378fcb85ad 100755
--- a/tools/ironic/scripts/configure-vm
+++ b/tools/ironic/scripts/configure-vm
@@ -78,8 +78,10 @@ def main():
params['emulator'] = "/usr/bin/qemu-kvm"
if args.console_log:
+ params['bios_serial'] = ""
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")
diff --git a/tools/ironic/templates/vm.xml b/tools/ironic/templates/vm.xml
index 4f40334b7d..ae7d685256 100644
--- a/tools/ironic/templates/vm.xml
+++ b/tools/ironic/templates/vm.xml
@@ -6,6 +6,7 @@
hvm
+ %(bios_serial)s