From 59d640776a6d7fe07c547a3f184126fded163633 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sun, 10 Dec 2023 21:17:26 +0000 Subject: [PATCH] Handle RAW images --- roles/home-cli/files/virtinst.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/home-cli/files/virtinst.sh b/roles/home-cli/files/virtinst.sh index b1b7f00..44a5a17 100755 --- a/roles/home-cli/files/virtinst.sh +++ b/roles/home-cli/files/virtinst.sh @@ -34,13 +34,20 @@ case "$_acp_vm_distro" in ;; 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: # virt-install --osinfo list virt-install --connect $_acp_vm_session \ --osinfo linux2022 \ --boot $_acp_vm_boot \ --cpu host-passthrough \ - --disk "$_acp_vm_root/$_acp_vm_name.qcow2,size=20" \ + --disk "$_acp_vm_disk,size=20" \ --graphics vnc \ --console pty,target.type=virtio \ --serial pty \