summaryrefslogtreecommitdiff
path: root/others/vm3/compute
diff options
context:
space:
mode:
Diffstat (limited to 'others/vm3/compute')
-rwxr-xr-xothers/vm3/compute/create.sh13
-rwxr-xr-xothers/vm3/compute/ls.sh (renamed from others/vm3/compute/list.sh)0
2 files changed, 10 insertions, 3 deletions
diff --git a/others/vm3/compute/create.sh b/others/vm3/compute/create.sh
index 3e6c088..a1d84f6 100755
--- a/others/vm3/compute/create.sh
+++ b/others/vm3/compute/create.sh
@@ -88,11 +88,18 @@ if [[ ${os,,} == *"freebsd"* ]]; then
88 ostype="generic" 88 ostype="generic"
89fi 89fi
90 90
91# Define the disk options based on OS type
92if [ "$os" = "debian12" ]; then
93 disk_opts="--disk path=$new_vm,format=qcow2"
94else
95 disk_opts="--disk path=$new_vm,format=qcow2 --disk path=$seed_iso,device=cdrom"
96fi
97
98# Use the conditional disk options in virt-install
91sudo virt-install --name $vmname \ 99sudo virt-install --name $vmname \
92 --vcpus $vcpu \ 100 --vcpus $vcpu \
93 --memory "$((ram_gb * 1024))"\ 101 --memory "$((ram_gb * 1024))" \
94 --disk path=$new_vm,format=qcow2 \ 102 $disk_opts \
95 --disk path=$seed_iso,device=cdrom \
96 --os-type $ostype \ 103 --os-type $ostype \
97 --os-variant $os \ 104 --os-variant $os \
98 --virt-type kvm \ 105 --virt-type kvm \
diff --git a/others/vm3/compute/list.sh b/others/vm3/compute/ls.sh
index b62ef14..b62ef14 100755
--- a/others/vm3/compute/list.sh
+++ b/others/vm3/compute/ls.sh