Default to always booting UefiShell.iso

This commit is contained in:
Anthony Rose 2022-11-03 19:47:26 +00:00
parent a274dd2e0e
commit e1fd75229c

View file

@ -372,43 +372,13 @@ tlscheck () {
virtinst () { virtinst () {
_acp_vm_default_nic=enp2s0 _acp_vm_default_nic=enp2s0
if [ $# -lt 1 ] || [ $# -gt 3 ] if [ $# -ne 1 ]
then then
virtinst --help virtinst --help
return return
fi fi
case "$1" in case "$1" in
--cdrom)
if [ $# -ne 3 ]
then
virtinst --help
return
fi
_acp_vm_name="$3"
_acp_vm_gb=",size=20"
_acp_vm_args="--cdrom $2"
;;
--pxe)
if [ $# -ne 2 ]
then
virtinst --help
return
fi
_acp_vm_name="$2"
_acp_vm_gb=",size=20"
_acp_vm_args="--pxe"
;;
--import)
if [ $# -ne 2 ]
then
virtinst --help
return
fi
_acp_vm_name="$2"
_acp_vm_gb=""
_acp_vm_args="--import"
;;
--help) --help)
echo "Usage: virtinst --cdrom /path/to/cdrom.iso vmname" >&2 echo "Usage: virtinst --cdrom /path/to/cdrom.iso vmname" >&2
echo " virtinst --pxe vmname" >&2 echo " virtinst --pxe vmname" >&2
@ -416,24 +386,20 @@ virtinst () {
return return
;; ;;
*) *)
echo "virtinst --help" >&2
return
;; ;;
esac esac
virt-install --name $_acp_vm_name \ virt-install --name $_acp_vm_name \
--osinfo linux2022 \ --osinfo linux2022 \
--boot uefi \ --boot uefi \
$_acp_vm_args \ --cdrom /usr/share/edk2/ovmf/UefiShell.iso \
--disk /var/lib/libvirt/images/${_acp_vm_name}.qcow2${_acp_vm_gb} \ --disk /var/lib/libvirt/images/${_acp_vm_name}.qcow2,size=20 \
--network type=direct,source=${_acp_vm_default_nic},source_mode=bridge \ --network type=direct,source=${_acp_vm_default_nic},source_mode=bridge \
--graphics vnc \ --graphics vnc \
--console pty,target.type=virtio \ --console pty,target.type=virtio \
--autoconsole none --autoconsole none
unset _acp_vm_name unset _acp_vm_name
unset _acp_vm_gb
unset _acp_vm_args
unset _acp_vm_default_nic unset _acp_vm_default_nic
} }