#!/bin/bash

virt-install \
    --connect "qemu:///session" \
    --name "debian12desktop.virt-install" \
    --ram "4096" \
    --vcpus "4" \
    --disk "size=20,path=debian12desktop.virt-install.qcow2,format=qcow2,bus=scsi,discard=unmap,cache=unsafe" \
    --controller "type=scsi,model=virtio-scsi" \
    --initrd-inject "preseed.cfg" \
    --initrd-inject "late_command.sh" \
    --location "http://deb.debian.org/debian/dists/bookworm/main/installer-amd64/" \
    --os-variant "debian10" \
    --virt-type "kvm" \
    --noautoconsole \
    --transient \
    --wait -1 \
    --network "user,model=virtio" \
    --extra-args "auto=true hostname=debian domain="
