#!/bin/bash
qm create 900 --name debian-10-openstack-amd64 --net0 virtio,bridge=vmbr0
qm importdisk 900 debian-10-openstack-amd64.qcow2 local-lvm
qm set 900 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-900-disk-0
qm set 900 --ide2 local-lvm:cloudinit
qm set 900 --boot c --bootdisk scsi0
qm set 900 --serial0 socket --vga serial0
qm set 900 -sshkey /etc/pve/pub_keys/fbachelet_lablocal.pub
qm template 900
#!/bin/bash
# Attach the disk to the virtual machine
qm set 9000 -scsihw virtio-scsi-pci -virtio0 local-lvm:vm-9000-disk-0
# Add a serial output
qm set 9000 -serial0 socket
# Set the bootdisk to the imported Openstack disk
qm set 9000 -boot c -bootdisk virtio0
# Enable the Qemu agent
qm set 9000 -agent 1
# Allow hotplugging of network, USB and disks
qm set 9000 -hotplug disk,network,usb
# Add a single vCPU (for now)
qm set 9000 -vcpus 1
# Add a video output
qm set 9000 -vga qxl
# Set a second hard drive, using the inbuilt cloudinit drive
qm set 9000 -ide2 local-lvm:cloudinit
# Resize the primary boot disk (otherwise it will be around 2G by default)
# This step adds another 8G of disk space, but change this as you need to
qm resize 9000 virtio0 +8G
# Convert the VM to the template
qm template 9000