top | item 38477798

(no title)

mccoyc | 2 years ago

It works, but anytime you have custom networking or more complex cloud-init configs, you'll have to go into "snippets" territory or referring to files in a local filesystem of the host. They don't have API support for making snippets the last time I checked. Where I ran into this was when trying to set up hosts with Terraform on Proxmox VE (which works well itself too).

discuss

order

brirec|2 years ago

The best way to handle this (which is really terrible, honestly, but it works) is to make configdrive2 ISOs locally, and upload those using the API. That is, don't give Proxmox a cloud-init snippet, but rather a fully-built cloud-init ISO. This is basically bypassing/reimplementing Proxmox's cloud-init features yourself, which is terrible. But it works really well.

There's a pretty neat Proxmox API library written in Go that can do this all for you: https://github.com/luthermonson/go-proxmox

There's a Terraform plugin planned, as well. Not sure what the status on it is, currently.

I also am slowly working on my own Proxmox CLI, consuming the go-proxmox library: https://github.com/perchnet/gomox

But unfortunately I don't have much software engineering experience, so it's a very slow process... :)