Handle RAW images

This commit is contained in:
Anthony Rose 2023-12-10 21:17:26 +00:00
parent edd4f544ed
commit 59d640776a

View file

@ -34,13 +34,20 @@ case "$_acp_vm_distro" in
;; ;;
esac esac
if [ -r "$_acp_vm_root/$_acp_vm_name.raw" ]
then
_acp_vm_disk=$_acp_vm_root/$_acp_vm_name.raw
else
_acp_vm_disk=$_acp_vm_root/$_acp_vm_name.qcow2
fi
# 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 $_acp_vm_boot \ --boot $_acp_vm_boot \
--cpu host-passthrough \ --cpu host-passthrough \
--disk "$_acp_vm_root/$_acp_vm_name.qcow2,size=20" \ --disk "$_acp_vm_disk,size=20" \
--graphics vnc \ --graphics vnc \
--console pty,target.type=virtio \ --console pty,target.type=virtio \
--serial pty \ --serial pty \