Custom Variables Tab in VM, Template, Container, Host, Storage etc.

Marek Wajdzik

New Member
Nov 29, 2017
7
0
1
34
Hello,

Is there a possibility to define variable, that is accessible by proxmox API in each object type like VM, Template, Container, Host or Datastore?

If no, simple tab with key and value added to all objects in proxmox gui will be awesome, because this will allow to build extensions for ansible dynamic inventory or cloudinit datasource using proxmox API returning those KVs. Also, it will be great if proxmox API could listen also on link-local address in vmbr0 (accessibility to it, before network will be up especially to use with cloudinit)

Or, just tell me how to start writing code with you guys :))
 
I can relate to the idea of custom variables. We currently deploy "custom variables" by using a special ascii format for the notes of the VM, which will be parsed and then further processing will be performed. Another part of customization is via pools and furthermore via DHCP for each, so it would be great to have all necessary and possibly configuration in one place: the PVE vm/container.
 
First of all I wanted to create development VM - I've used vagrant for it:

github.com/consi/proxmox-devel-vagrant

But well, documentation is incomplete (5.x does not use jessie, it uses other apt key and so on) - that was easy to fix, but I don't have read access to some repositories defined in documentation:
failed: [proxmox-devel] (item=libpve-http-server-perl) => {"changed": false, "cmd": ["/usr/bin/git", "fetch", "--tags", "origin"], "failed": true, "item": "libpve-http-server-perl", "msg": "Failed todownload remote objects and refs: fatal: remote error: access denied or repository not exported: /git/libpve-http-server-perl.git\n"}
failed: [proxmox-devel] (item=libpve-apiclient-perl) => {"changed": false, "cmd": ["/usr/bin/git", "fetch", "--tags", "origin"], "failed": true, "item": "libpve-apiclient-perl", "msg": "Failed to download remote objects and refs: fatal: remote error: access denied or repository not exported: /git/libpve-apiclient-perl.git\n"}

How could I fix that?

Regards
Marek
 
But well, documentation is incomplete (5.x does not use jessie, it uses other apt key and so on) - that was easy to fix, but I don't have read access to some repositories defined in documentation:

Where did you read that 5.x is using jessie? The installation is well documented on the wiki:

https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Stretch

failed: [proxmox-devel] (item=libpve-http-server-perl) => {"changed": false, "cmd": ["/usr/bin/git", "fetch", "--tags", "origin"], "failed": true, "item": "libpve-http-server-perl", "msg": "Failed todownload remote objects and refs: fatal: remote error: access denied or repository not exported: /git/libpve-http-server-perl.git\n"}
failed: [proxmox-devel] (item=libpve-apiclient-perl) => {"changed": false, "cmd": ["/usr/bin/git", "fetch", "--tags", "origin"], "failed": true, "item": "libpve-apiclient-perl", "msg": "Failed to download remote objects and refs: fatal: remote error: access denied or repository not exported: /git/libpve-apiclient-perl.git\n"}

How could I fix that?

I have no idea where you get these errors from, yet those git repositories are not listed here: https://git.proxmox.com/
 
Well, on stretch I can't even install prerequisities from instruction above, also, those repositories are listed in this README - so I think, that it's outdated

I'll try first to install it without development files, then I add rest ;)
 
Last edited:
Please be more precise what you did and where you get your information from (what prerequisites and what readme). Neither the Developer page as nor the install on stretch nor the https://git.proxmox.com/ does not mention the repositories you're talking about.
 
So after some time I've migrated vagrant to git submodules and it works, I've made first changes to pve-manager and it seems to be fairly easy :) Thanks for pointing instructions that helped me to start development environment
 
Did this ever get developed? It's something that would be really useful to me, and probably others.
Years ago I worked with a dev team that used a similar feature in VMWare for their orchestration for dynamic environments, they would put host names in the variables,
e.g. spin up a db server and note the hostname, then spin up multiple app servers and use this feature for the db server's hostname, the app server then used this value to connect to the db
 

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!