qemu-system-boot/qemu-system-x86_64-boot

27 lines
693 B
Text
Raw Permalink Normal View History

2022-05-11 08:29:39 +02:00
#!/bin/sh
2022-05-11 08:49:05 +02:00
# SPDX-FileCopyrightText: 2022 Tobias Schmidl
# SPDX-License-Identifier: CC0-1.0
2022-05-11 08:29:39 +02:00
HDA=$1;
[ ! -r "$HDA" ] && { echo "Usage: $(basename "$0") <imagefile>" >&2; exit 1; }
shift
QEMU_PUBLIC_SHARE=${QEMU_PUBLIC_SHARE:-$(xdg-user-dir PUBLIC_SHARE)}
QEMU_MEMORY=${QEMU_MEMORY:-1G}
QEMU_EFI=${QEMU_EFI:-/usr/share/OVMF/OVMF_CODE.fd}
qemu-system-x86_64 \
-nographic \
-M q35 \
-cpu max \
-k de \
2022-05-11 09:27:41 +02:00
-enable-kvm \
2022-05-11 08:29:39 +02:00
-machine accel=kvm \
-smp 2 \
-m "${QEMU_MEMORY}" \
-drive file="${HDA}",media=disk \
-virtfs "local,id=shared_folder_dev_0,path=${QEMU_PUBLIC_SHARE},security_model=none,mount_tag=shared0" \
-net nic -net user \
-name "$(basename "$HDA")" \
-bios "$QEMU_EFI" \
"$@"