This is the standard boring part of creating the template VM.
wget https://cloud-images.ubuntu.com/resolute/current/resolute-server-cloudimg-amd64.img
qm create 997 \
--name ubuntu-26-04-cloudimage \
--machine q35 \
--bios ovmf \
--memory 2048 \
--balloon 2048 \
--cores 4 \
--cpu x86-64-v3,flags=+aes \
--net0 virtio,bridge=vmbr0,firewall=true,queues=4 \
--scsihw virtio-scsi-single \
--agent enabled=1 \
--serial0 socket \
--vga serial0 \
--ostype l26 \
--ide2 local-btrfs:cloudinit \
--tpmstate0 local-btrfs:1,version=v2.0 \
--boot order=scsi0 \
--ipconfig0 ip=dhcp,ip6=dhcp \
--sshkeys keys.txt \
--ciuser upright \
--efidisk0 local-btrfs:1,efitype=4m,pre-enrolled-keys=1 \
--rng0 source=/dev/urandom
qm importdisk 997 resolute-server-cloudimg-amd64.img local-btrfs --format qcow2
qm set 997 --scsi0 local-btrfs:997/vm-997-disk-2.raw,ssd=1,iothread=1,discard=on
qm resize 997 scsi0 50G
Unsolved DHCP Issues
I’ve noticed the DHCP was acting weird on Ubuntu 26.04, and I’m yet to find the solution.
The first boot will get a clientID of 1:<MAC> DHCP and then the second boot will have a full clientID.
This means IP address changes on the first and second boot on my Mikrotik.
It looks like the /run/systemd/network/zzzz-dracut-default.network on ubuntu 26 falls back to ClientIdentifier=mac.
/etc/default/grub
rd.dhcp.client-id=duid
sudo update-grub
It’s rather networkd or similar.
Bonus: Running ubuntu 26 with amd64v3 packages.
echo 'APT::Architecture-Variants "amd64v3";' | sudo tee /etc/apt/apt.conf.d/99enable-amd64v3
Finally
#QEMU guest agent for Proxmox
apt install qemu-guest-agent
#Clean the machine ID.
cloud-init clean --machine-id
Categories: Uncategorised
Leave a Reply