Hi!
I successfully ran this script to create a template for a Ubuntu 22.04 template. I then proceeded to to create a CentOS Stream 9 and Alma Linux 9 template.
After making a full clone of the template. Adding a password, ssh-keyand setting IPV4 and IPV6 networking to use DHCP and then booting the VM the CPU basically stays at 50% and I'm unable to open the console to view the output.
Here's the script I ran to create my template. Shouldn't be anything weird in it as far as I can tell..
I successfully ran this script to create a template for a Ubuntu 22.04 template. I then proceeded to to create a CentOS Stream 9 and Alma Linux 9 template.
After making a full clone of the template. Adding a password, ssh-keyand setting IPV4 and IPV6 networking to use DHCP and then booting the VM the CPU basically stays at 50% and I'm unable to open the console to view the output.
Here's the script I ran to create my template. Shouldn't be anything weird in it as far as I can tell..
Bash:
# Set script variables
IMAGE_FILE='AlmaLinux-9-GenericCloud-latest.x86_64.qcow2'
TEMPLATE_ID='3000'
TEMPLATE_NAME='almalinux-template'
# Create VM
qm create $TEMPLATE_ID --name $TEMPLATE_NAME --net0 virtio,bridge=vmbr0 --memory 2048 --core 2
# Import image
qm importdisk $TEMPLATE_ID $IMAGE_FILE local-lvm
# Attach image as storage device
qm set $TEMPLATE_ID --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-$TEMPLATE_ID-disk-0
# Attach a drive for cloud-init
qm set $TEMPLATE_ID --ide2 local-lvm:cloudinit
# Configure VM to boot from our image
qm set $TEMPLATE_ID --boot c --bootdisk scsi0
# Add a serial console
qm set $TEMPLATE_ID --serial0 socket --vga serial0
# Convert VM to template
qm template $TEMPLATE_ID