Auto Provisioning and IP Assignment Provisioning script

May 9, 2016
3
0
21
40
Hi All,

I've been working hard to make the job of provisioning and assigning ips easier. So I'd like to share a little script I've made that I hope some of you will find it helpful in your mission to automate the world.

I apologise to mods if this isn't the right section.

The reason I developed this is because I wanted a way to automatically provision a new virtual machine with Ansible.

The main issue I was facing when using templates with Proxmox is they retain their ip address and there isn't a way (as far as I am aware) to change the ip address before creating a new vm from a template.

I did figure out that I was able to clone a template then mount the kvm image and change the network configuration on the host machine.

From this proxmox tools was born, not really a comprehensive tool set at the moment, but a big first step.

The script uses both the Proxmox API and ssh to achieve a quick and automated provisioning and you can use it to not only change the network configuration before lauching a new vm but also change any files on a system before starting for the first time.

For some reason when I started this project I though it was a good time to start learning ruby.....

So if you are a ruby expert you will probably find some very noob errors and unfortunately I haven't got time to refactor into something that looks nice. So pull requests to expand the functionality or coding standards are welcome.

Please find the repo here

Proxmox Tools
 
Last edited: