root@pve-1:~# ./vm_create.sh
variables used:
STORAGE == blockbridge-nvme
VMID == 100
DEVICE == scsi0
NAME == vm100
OSUSER == blockbridge
CONSOLE == vga
CLOUDINIT == local
BIOS == default
==============
qm create 100 --memory 8192 --name vm100 --socket 1 --onboot no --cpu cputype=host
qm importdisk 100 /mnt/pve/bbnas/template/iso/ubuntu-24.04-noble-server-cloudimg-amd64.img blockbridge-nvme --format raw
qm set 100 --scsihw virtio-scsi-single --scsi0 blockbridge-nvme:vm-100-disk-0
update VM 100: -scsi0 blockbridge-nvme:vm-100-disk-0 -scsihw virtio-scsi-single
qm set 100 -net0 virtio,bridge=vmbr0,firewall=1,mtu=1
update VM 100: -net0 virtio,bridge=vmbr0,firewall=1,mtu=1
qm set 100 --scsi1 blockbridge-nvme:cloudinit
update VM 100: -scsi1 blockbridge-nvme:cloudinit
scsi1: successfully created disk 'blockbridge-nvme:vm-100-cloudinit,media=cdrom'
generating cloud-init ISO
qm set 100 --boot c --bootdisk scsi0
update VM 100: -boot c -bootdisk scsi0
qm set 100 --serial0 socket --vga virtio
update VM 100: -serial0 socket -vga virtio
qm set 100 -ipconfig0 ip=172.16.202.100/24,gw=172.16.202.1
update VM 100: -ipconfig0 ip=172.16.202.100/24,gw=172.16.202.1
qm set 100 --cipassword blockbridge --ciuser blockbridge
update VM 100: -cipassword <hidden> -ciuser blockbridge
qm set 100 -sshkeys /root/.ssh/authorized_keys
update VM 100: -sshkeys %0Assh-rsa%20AAAA#############
qm set 100 -ciupgrade 1
update VM 100: -ciupgrade 1
root@pve-1:~# qm start 100
generating cloud-init ISO
root@pve-1:~# ssh blockbridge@172.16.202.100
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-31-generic x86_64)
....
blockbridge@vm100:~$
logout
Connection to 172.16.202.100 closed.
root@pve-1:~# qm stop 100
root@pve-1:~# qm set 100 --delete sshkeys
update VM 100: -delete sshkeys
root@pve-1:~# qm start 100
generating cloud-init ISO
root@pve-1:~# ssh blockbridge@172.16.202.100
..
blockbridge@vm100:~$