
if ! [[ "8 9 10 11 12 13" == *"$(grep VERSION_ID /etc/os-release | cut -d '"' -f 2 | cut -d '.' -f 1)"* ]];
then
    echo "Debian $(grep VERSION_ID /etc/os-release | cut -d '"' -f 2 | cut -d '.' -f 1) is not currently supported.";
    exit;
fi


NAME='development'
IFACE=eno3
BR=vmbr1
#ISOPOOL=${HOME}/KVM/hbues/isos
ISOPOOL=/media/White/box/source_kalacmul/source/pool/template/iso
#ISO=debian-12.11.0-amd64-netinst.iso
ISO=debian-13.2.0-amd64-netinst.iso
MAC=52:54:00:24:a0:a0
DISKPATH=${HOME}/kvm/storage
DISK=${NAME}.qcow2
DISKSIZE=60
SPICEPORT=59011
VNCPORT=59111


# NewMachine
virt-install --connect qemu:///session \
   --name ${NAME} \
   --virt-type kvm \
   --memory 8192 \
   --machine q35 \
   --disk ${DISKPATH}/${DISK},size=${DISKSIZE} \
   --cdrom ${ISOPOOL}/${ISO} \
   --controller type=scsi,model=virtio-scsi,driver.iommu=on \
   --controller type=virtio-serial,driver.iommu=on \
   --rng /dev/random,driver.iommu=on \
   --memballoon driver.iommu=on \
   --vcpus 12 \
   --network bridge=${IFACE},model=virtio,driver.iommu=on,mac.address=${MAC} \
   --graphics spice \
   --graphics vnc \
   --os-type linux \
   --os-variant debiantesting


# Windows server
# virt-install --connect qemu:///session \
#    --name development \
#    --virt-type kvm \
#    --memory 8192 \
#    --boot uefi \
#    --machine q35 \
#    --disk /home/elph/kvm/elph-pool/gst/disk.qcow2,size=60 \
#    --cdrom /media/source/pool/template/iso/debian-12.1.0-amd64-netinst.iso \
#    --controller type=scsi,model=virtio-scsi,driver.iommu=on \
#    --controller type=virtio-serial,driver.iommu=on \
#    --rng /dev/random,driver.iommu=on \
#    --memballoon driver.iommu=on \
#    --vcpus 12 \
#    --network bridge=vmbr1,model=virtio,driver.iommu=on,mac.address= \
#    --graphics spice \
#    --graphics vnc \
#    --os-info win2k19 \

