Infrastructure as Code and Proxmox

murphyslaw

Active Member
Feb 20, 2018
6
0
41
52
I've been working on using saltstack to drive proxmox cloud operations through the API. I've come across some issues and it appears I am not alone in this. On one terraform comment on github jamesharr explains this excellently (see https://github.com/Telmate/terraform-provider-proxmox/issues/605):

I also very quickly hit the limitations of my understanding of this code base as well as the library it uses. Unfortunately, I won't have time to devote to learning it.
Proxmox API related issues I've run into.
  • The API is non-idempotent when using import-from. The code needs to be smart enough to handle that.
  • imported disks are not resized by Proxmox automatically, meaning there's another step in the process that needs to happen
  • disk images are referenced by Unix filesystem path, which means only the root user can use this feature. Even generating API keys on the root account won't let you use import-from. I suspect that they'll fix this over time to allow people to reference images via volume path (my-vol:images/foo.qcow2)
  • (not specifically related) there is no way to manage custom cloud-init config YAML/atteibutes via the API.
The terraform provider currently requires a template, or an iso option. That combined with the non-idempotent behavior means that this might be a much more involved change than I had originally anticipated, possibly involving structural changes.
Unfortunately, the likelihood of me completing this feature is pretty slim. Especially in the near future. I'm not sure if the proper etiquette is to close the PR if I no longer intend to work on it, or leave the work out there for someone else to pick up. Let me know what you think I should do.

Some issues that I have come across myself:
  • Some operations can only be performed by root@pve using password authentication (found this on the support forum elsewhere).
  • Importing a volume is only possible from an absolute file path, not from a different storage type such as an existing LVM volume or a reference to an image.
If proxmox capabilities are to be adopted by existing cloud solutions then the above issues should be addressed IMO.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!