From fc8f7730eadc56af27d33d55daad00a325fc35a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Sun, 21 Nov 2021 12:20:36 +0100 Subject: [PATCH] Set block device ids --- Dockerfile.m4 | 4 ++-- scripts/service/qemu/run | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile.m4 b/Dockerfile.m4 index a2caaaa..f83c436 100644 --- a/Dockerfile.m4 +++ b/Dockerfile.m4 @@ -83,8 +83,8 @@ RUN mkisofs -no-emul-boot -iso-level 4 -eltorito-boot loader/isoboot.bin -o /tmp -machine pc -smp 2 -m 512M -accel tcg \ -device VGA -display none -serial stdio \ -device e1000,netdev=n0 -netdev user,id=n0,restrict=on \ - -device ide-hd,bus=ide.0,drive=c0 -blockdev driver=qcow2,node-name=c0,file.driver=file,file.filename=/tmp/reactos.qcow2 \ - -device ide-cd,bus=ide.1,drive=d0 -blockdev driver=raw,node-name=d0,file.driver=file,file.filename=/tmp/reactos.iso,read-only=on \ + -device ide-hd,id=disk0,bus=ide.0,drive=disk0 -blockdev driver=qcow2,node-name=disk0,file.driver=file,file.filename=/tmp/reactos.qcow2 \ + -device ide-cd,id=cd0,bus=ide.1,drive=cd0 -blockdev driver=raw,node-name=cd0,file.driver=file,file.filename=/tmp/reactos.iso,read-only=on \ -boot order=cd,menu=off \ -usb -device usb-tablet diff --git a/scripts/service/qemu/run b/scripts/service/qemu/run index c9d258a..2a3c2e4 100755 --- a/scripts/service/qemu/run +++ b/scripts/service/qemu/run @@ -6,7 +6,7 @@ set -- set -- "$@" -machine pc -smp "${VM_CPU:?}" -m "${VM_RAM:?}" set -- "$@" -device VGA -display vnc=:0 -serial stdio -monitor unix:/run/qemu-monitor,server,nowait set -- "$@" -device e1000,netdev=n0 -netdev user,id=n0,"${VM_NET_GUESTFWD_OPTIONS?}","${VM_NET_HOSTFWD_OPTIONS?}","${VM_NET_EXTRA_OPTIONS?}" -set -- "$@" -device ide-hd,bus=ide.0,drive=c0 -blockdev driver=qcow2,node-name=c0,file.driver=file,file.filename=/var/lib/qemu/disk/reactos.qcow2 +set -- "$@" -device ide-hd,id=disk0,bus=ide.0,drive=disk0 -blockdev driver=qcow2,node-name=disk0,file.driver=file,file.filename=/var/lib/qemu/disk/reactos.qcow2 set -- "$@" -usb -device usb-tablet set -- "$@" -k "${VM_KEYBOARD:?}" @@ -19,14 +19,14 @@ fi cd_i=0 for cd in /var/lib/qemu/cd/*; do [ -f "${cd:?}" ] || continue - set -- "$@" -device ide-cd,bus=ide.1,drive=d"${cd_i:?}" -blockdev driver=raw,node-name=d"${cd_i:?}",file.driver=file,file.filename="${cd:?}",read-only=on + set -- "$@" -device ide-cd,id=cd"${cd_i:?}",bus=ide.1,drive=cd"${cd_i:?}" -blockdev driver=raw,node-name=cd"${cd_i:?}",file.driver=file,file.filename="${cd:?}",read-only=on cd_i="$((cd_i + 1))" done floppy_i=0 for floppy in /var/lib/qemu/floppy/*; do [ -f "${floppy:?}" ] || continue - set -- "$@" -device floppy,bus=floppy-bus.0,drive=a"${floppy_i:?}" -blockdev driver=raw,node-name=a"${floppy_i:?}",file.driver=file,file.filename="${floppy:?}",read-only=on + set -- "$@" -device floppy,id=floppy"${floppy_i:?}",bus=floppy-bus.0,drive=floppy"${floppy_i:?}" -blockdev driver=raw,node-name=floppy"${floppy_i:?}",file.driver=file,file.filename="${floppy:?}",read-only=on floppy_i="$((floppy_i + 1))" done