Proxmox clone VM from cloud-init template with an iSCSI target?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Pakna

Member
May 7, 2019
50
3
8
I was looking at automating creation of my homelab k8s infrastructure with Terraform when I ran into this sharp edge - it looks like Proxmox doesn't support cloning VM images from a (cloud-init) template that want to install a cloud-init image to a hard drive targeted with an iSCSI LUN (provided by TrueNAS).

Here is an example of such a template:

1709614980998.png

I don't understand all the nuance, but basically, the code in the existing clone process that would take the whole available space on the LUN as default and then materialise the "disk image" on top of it simply doesn't exist.

I am absolutely no expert, but I am a bit surprised by such a (basic) gap - at scale, if you wanted to deploy 100 (cloud-init) VMs, would you not leverage something like a Terraform and a SAN? I would imagine so but it looks like you can't do this in Proxmox. You can't even use a process where you create a cloud-init template and then clone it into VMs - you have to manually define each and every VM from scratch and target it to an iSCSI LUN.

Nevertheless, I was curious if anyone had thoughts on how to circumvent this? Thankfully, I don't need to deploy a vast fleet of VMs, but it would be very nice to be able to have 10-20 VMs sitting on iSCSI LUNs and deployed on a handful of nodes in a Proxmox cluster automatically.