I created a special Debian 10 preseed iso just for my Proxmox kvm machines. I can go from zero to ready to rock in under 10 minutes!
The preseeded iso starts automatically, installs a few key packages, sets vim as my default editor and copies my ssh public key to my authorized_keys file so I can run the Ansible playbook right after install.
I created a small playbook to configure the system for me so it's set up the way I like.
ansible-playbook -v -b --ask-become-pass -i xxx.xxx.xxx.xxx, basic_kvm.yml
If it's a VM that I plan on keeping around for a while, I'll give it a static IP address in pfSense before installing Debian. The preseed will use the hostname I assigned it in pfSense as the system hostname when configuring the network via DHCP.
Otherwise, the system's hostname will be set as hostname and it will be assigned an ip address outside of the 'reserved' addresses for the vlan I added it to.
/media/sas/data/template/iso. Use your favorite file transfer method to get the iso file there (or the iso storage location on your system).
sudo qm list
sudo qm create 150 --cdrom sas-storage:iso/preseed-debian-10.4.iso \ --name preseed --numa 0 --ostype l26 \ --cpu cputype=host --cores 2 --sockets 2 \ --memory 4096 \ --net0 bridge=vmbr90,virtio \ --bootdisk scsi0 --scsihw virtio-scsi-pci --scsi0 file=ssd-lvm:32 \ --serial0 socket --vga qxl --audio0 device=ich9-intel-hda,driver=spice # I'll add macaddr=XX:XX:XX:XX:XX:XX to the --net0 section if I want to pre-configure the ip in pfSense beforehand.
sudo qm start <vmid>
man qmfor more info