I need to be able to obtain the VMID from within the guest VM.
There does not appear to be any currently implemented method in Proxmox to do this, if I am wrong please point me in the right direction.
Here is one way to accomplish what I need.
I edited /etc/pve/qemu-server/118.conf and added:
Start the VM
Inside the VM I can run:
Sure I could manually add the argument to all of my VM config files, but that is lots of work and manual processes are not always remembered.
I would like Proxmox to automatically add such arguments or something similar to achieve the same goal.
We should have a similar method for openVZ too, tho since I am not using openVZ have no clue where to begin.
What do you think?
Could we have such a feature added to Proxmox? Maybe someone has a better suggestion than using smbios settings?
My ultimate goal is to take advantage of the new Proxmox firewall feature and auto-generate firewall rules using Chef.
Chef needs the VMID of each node so it can render the /etc/pve/firewall/<VMID>.fw files.
Example use case:
The firewall on the DB server should only allow the web server IP addresses to connect to PostgreSQL.
When I create a new web server, using Chef, the Proxmox firewall rules for the DB server would be automatically updated to allow the new web server through.
When you start adding in reverse proxies, memcached, rabbitMQ, ElasticSearch and a dozen other types of servers it becomes obvious how such automation would be tremendously useful.
There does not appear to be any currently implemented method in Proxmox to do this, if I am wrong please point me in the right direction.
Here is one way to accomplish what I need.
I edited /etc/pve/qemu-server/118.conf and added:
Code:
args: -smbios type=1,serial=[B]118[/B]
Start the VM
Inside the VM I can run:
Code:
# dmidecode -s system-serial-number
[B]118[/B]
Sure I could manually add the argument to all of my VM config files, but that is lots of work and manual processes are not always remembered.
I would like Proxmox to automatically add such arguments or something similar to achieve the same goal.
We should have a similar method for openVZ too, tho since I am not using openVZ have no clue where to begin.
What do you think?
Could we have such a feature added to Proxmox? Maybe someone has a better suggestion than using smbios settings?
My ultimate goal is to take advantage of the new Proxmox firewall feature and auto-generate firewall rules using Chef.
Chef needs the VMID of each node so it can render the /etc/pve/firewall/<VMID>.fw files.
Example use case:
The firewall on the DB server should only allow the web server IP addresses to connect to PostgreSQL.
When I create a new web server, using Chef, the Proxmox firewall rules for the DB server would be automatically updated to allow the new web server through.
When you start adding in reverse proxies, memcached, rabbitMQ, ElasticSearch and a dozen other types of servers it becomes obvious how such automation would be tremendously useful.