From 52214f533bc54ba4e5ac7025a8e6a81bec58138b Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Mon, 12 Mar 2018 21:38:42 +0100 Subject: [PATCH] build_library: fix a bug when setting a CDROM image Setting `$VM_CDROM` in the qemu script does not work as expected when installing Container Linux from the given bootable CDROM image. That's probably because qemu-system-x86_64 expects another boot option `-boot order=d` to be able to boot from the given CDROM drive. Let's specify specify a `-boot` as well as `-drive` option for the given CDROM drive. --- build_library/qemu_template.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_library/qemu_template.sh b/build_library/qemu_template.sh index 8424aa2fb1..b846b4f4c4 100755 --- a/build_library/qemu_template.sh +++ b/build_library/qemu_template.sh @@ -198,7 +198,8 @@ if [ -n "${VM_UUID}" ]; then fi if [ -n "${VM_CDROM}" ]; then - set -- -cdrom "${SCRIPT_DIR}/${VM_CDROM}" "$@" + set -- -boot order=d \ + -drive file="${SCRIPT_DIR}/${VM_CDROM}",media=cdrom,format=raw "$@" fi if [ -n "${VM_PFLASH_RO}" ] && [ -n "${VM_PFLASH_RW}" ]; then