envsubst hack
qemu fix and more
This commit is contained in:
26
qemu.sh
26
qemu.sh
@@ -4,28 +4,24 @@ last_autoinstaller=$(ls -t1 autoinstall-2026* | head -n1)
|
||||
echo " ....... $last_autoinstaller"
|
||||
sleep 1
|
||||
|
||||
# qemu-system-x86_64 \
|
||||
# -m 2048 \
|
||||
# -enable-kvm \
|
||||
# -drive file=${last_autoinstaller},format=raw,if=none,id=usbdisk \
|
||||
# -device usb-ehci \
|
||||
# -device usb-storage,drive=usbdisk \
|
||||
# -bios /usr/share/ovmf/OVMF.fd
|
||||
|
||||
_cdrom=""
|
||||
_cdrom=()
|
||||
if [[ "$1" = "cdrom" ]]; then
|
||||
_cdrom="-drive file=${last_autoinstaller},format=raw,if=none,id=usbdisk
|
||||
-device usb-ehci \
|
||||
-device usb-storage,drive=usbdisk \
|
||||
"
|
||||
_cdrom=(
|
||||
-drive file=${last_autoinstaller},format=raw,if=none,id=usbdisk
|
||||
-device usb-ehci,id=usb
|
||||
-device usb-storage,drive=usbdisk,bus=usb.0,bootindex=1
|
||||
-bios /usr/share/ovmf/OVMF.fd
|
||||
)
|
||||
fi
|
||||
|
||||
# Create a virtual disk first
|
||||
## Create a virtual disk first
|
||||
## Uncomment 'create' if test-disk missing
|
||||
# qemu-img create -f qcow2 /tmp/test-disk.qcow2 20G
|
||||
|
||||
# Boot the ISO as USB with the virtual disk as install target
|
||||
qemu-system-x86_64 \
|
||||
-m 4096 \
|
||||
-enable-kvm \
|
||||
-drive file=/tmp/test-disk.qcow2,format=qcow2 $_cdrom \
|
||||
-drive file=/tmp/test-disk.qcow2,format=qcow2 \
|
||||
"${_cdrom[@]}" \
|
||||
-bios /usr/share/ovmf/OVMF.fd
|
||||
|
||||
Reference in New Issue
Block a user