question about best practice for vm's config of ip/gw/nameservers

Status
Not open for further replies.

smcracraft

Member
Nov 27, 2019
31
0
6
124
California, USA
Hi,

I have a question about best practice in the Proxmox world.

We have Ansible here creating and deleting VM's.

But from there, we want to assign ip, assign gateway, assign name server, etc. to the newly created VM and then we will Ansible everything inside that too.

So somewhat like the "userdata" feature of AWS which will permit post-VM provisioning activity such as ip/gateway/name server/etc and then the entirety of the vm internally to it as well.

I ran across this repo but am not sure what people use here as best practice for the ip+gateway+nameserver-related pieces as standard Proxmox practice.

Thoughts?

https://github.com/rits1902/Proxmox-cloud-init

If there is a standard Proxmox best practice document detailing the subject, that would be more handy and if there is pre-existing GitHub activity which can be used, that would be ideal.

Thanks.
 
So somewhat like the "userdata" feature of AWS which will permit post-VM provisioning activity such as ip/gateway/name server/etc and then the entirety of the vm internally to it as well

Isn't cloudinit exactly what you're looking for?

Before the cloudinit age, PXE was a big player and still is. We can also install VMs including configuration only via PXE+DNS+DHCP.
 
Yes, that's what I have in the playbook which is based on https://gitlab.com/morph027/pve-infra-poc

But it fails.

Here's the full error.

Anyone know how I can get at at 500 internal server error exception and the meaning of "data"?

TASK [create vms] ***************************************************************************************************

failed: [localhost] (item={'value': {u'node': u'ceph-hv-01', u'memory_size': u'12288', u'template': u'centos7-template', u'cores': u'4', u'ipconfig': u'{"ipconfig0":"ip=172.30.20.191/24,gw=172.30.20.1"}', u'net': u'{"net0":"virtio,bridge=vmbr320"}', u'cloudinit': True}, 'key': u'stu-test-10'}) => {"ansible_loop_var": "item", "changed": false, "item": {"key": "stu-test-10", "value": {"cloudinit": true, "cores": "4", "ipconfig": "{\"ipconfig0\":\"ip=172.30.20.191/24,gw=172.30.20.1\"}", "memory_size": "12288", "net": "{\"net0\":\"virtio,bridge=vmbr320\"}", "node": "ceph-hv-01", "template": "centos7-template"}}, "msg": "creation of qemu VM stu-test-10 with vmid 102 failed with exception=500 Internal Server Error: {\"data\":null}"}
 
Status
Not open for further replies.

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!