From e1fd75229c9f58209920714aa105c4585a07af3e Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Thu, 3 Nov 2022 19:47:26 +0000 Subject: [PATCH] Default to always booting UefiShell.iso --- roles/home-cli/files/profile | 40 +++--------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 9a3e48d..e4a110f 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -372,43 +372,13 @@ tlscheck () { virtinst () { _acp_vm_default_nic=enp2s0 - if [ $# -lt 1 ] || [ $# -gt 3 ] + if [ $# -ne 1 ] then virtinst --help return fi 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) echo "Usage: virtinst --cdrom /path/to/cdrom.iso vmname" >&2 echo " virtinst --pxe vmname" >&2 @@ -416,24 +386,20 @@ virtinst () { return ;; *) - echo "virtinst --help" >&2 - return ;; esac virt-install --name $_acp_vm_name \ --osinfo linux2022 \ --boot uefi \ - $_acp_vm_args \ - --disk /var/lib/libvirt/images/${_acp_vm_name}.qcow2${_acp_vm_gb} \ + --cdrom /usr/share/edk2/ovmf/UefiShell.iso \ + --disk /var/lib/libvirt/images/${_acp_vm_name}.qcow2,size=20 \ --network type=direct,source=${_acp_vm_default_nic},source_mode=bridge \ --graphics vnc \ --console pty,target.type=virtio \ --autoconsole none unset _acp_vm_name - unset _acp_vm_gb - unset _acp_vm_args unset _acp_vm_default_nic }