I followed the instructions here -> https://pve.proxmox.com/wiki/Cloud-Init_Support to create a ubuntu 2004 template using the cloudimg https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
Running the following commands works consistently:
When I watch the console as the VM boots, I see the hostname is set to "cloudinit-test" properly, and the ciuser/cipassword allows me to login.
However, when I set the name of the VM using the `--name` argument to the `qm` command, cloud-init no longer works:
The hostname is no longer set properly and the ciuser/cipassword does not allow me to login to the cloned VM.
In addition, I am experiencing this behavior inconsistently when using an OVMF BIOS with an EFI drive attached (I will open a separate issue for that).
Running the following commands works consistently:
Code:
qm clone 2004 100 --name cloudinit-test
qm set 100 -cipassword highlysecure123 -ciuser max -sshkeys /root/.ssh/id_rsa.pub
qm start 100
When I watch the console as the VM boots, I see the hostname is set to "cloudinit-test" properly, and the ciuser/cipassword allows me to login.
However, when I set the name of the VM using the `--name` argument to the `qm` command, cloud-init no longer works:
Code:
qm clone 2004 100 --name cloudinit-test
qm set 100 -cipassword highlysecure123 -ciuser max -sshkeys /root/.ssh/id_rsa.pub --name 59
qm start 100
The hostname is no longer set properly and the ciuser/cipassword does not allow me to login to the cloned VM.
In addition, I am experiencing this behavior inconsistently when using an OVMF BIOS with an EFI drive attached (I will open a separate issue for that).