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.
This commit is contained in:
Dongsu Park 2018-03-12 21:38:42 +01:00
parent 575f7cdf63
commit 52214f533b

View File

@ -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