Use non-secureboot

This commit is contained in:
Anthony Rose 2023-08-12 01:08:32 +01:00
parent 9fec936680
commit c68be4fc88

View file

@ -8,6 +8,7 @@ else
_acp_vm_session=qemu:///session _acp_vm_session=qemu:///session
fi fi
_acp_vm_name=${1:---help} _acp_vm_name=${1:---help}
_acp_vm_distro=$(. /etc/os-release; echo $ID)
case "$_acp_vm_name" in case "$_acp_vm_name" in
"--help" | -*) "--help" | -*)
@ -24,11 +25,20 @@ then
mkdir -p "$_acp_vm_root" mkdir -p "$_acp_vm_root"
fi fi
case "$_acp_vm_distro" in
"debian")
_acp_vm_boot=loader=/usr/share/OVMF/OVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/usr/share/OVMF/OVMF_VARS.fd,loader_secure=no
;;
*)
_acp_vm_boot=uefi
;;
esac
# To get a list of valid osinfo options, run: # To get a list of valid osinfo options, run:
# virt-install --osinfo list # virt-install --osinfo list
virt-install --connect $_acp_vm_session \ virt-install --connect $_acp_vm_session \
--osinfo linux2022 \ --osinfo linux2022 \
--boot uefi \ --boot $_acp_vm_boot \
--cpu host-passthrough \ --cpu host-passthrough \
--disk "$_acp_vm_root/$_acp_vm_name.qcow2,size=20" \ --disk "$_acp_vm_root/$_acp_vm_name.qcow2,size=20" \
--graphics vnc \ --graphics vnc \