if ! [[ "8 9 10 11 12" == *"$(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='support'
IFACE=eno3
BR=vmbr1
ISOPOOL=https://pool.hbues.net/isos
ISO=debian-12.1.0-amd64-netinst.iso 
MAC=52:54:00:05:2a:09
DISKPATH=${HOME}/KVM/hbues
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=${BR},model=virtio,driver.iommu=on,mac.address=${MAC} \
   --graphics spice \
   --graphics vnc \
   --os-type linux \
   --os-variant debiantesting



