Automating the VM creation and delete

arioxz

New Member
Apr 24, 2020
4
1
1
26
Hello, am studying IT at the moment, and in the end of this troubled year, i've got a project related to proxmox. My group and me have to make an automating creation and delete of VMs from a excel (.CSV) file, as i've never experienced any project or anything before this one with proxmox, am wondering if you could have any helping recommandation, links, doc, that could help me see clearer on it.

The VM we use to work on it is a CentOs7, thanks by advance for your help, have a nice day/evening.
 
Hi,

First, you need the API[1] of Proxmox VE for doing things.
For the API there are different clients[2] available.
For bootstrapping a VM you can use Cloudinit[3][4].
LXC can be configured over the API direct.
After the VM/CT is running you can use ansible[5] to do what you what to do.

1.) https://pve.proxmox.com/pve-docs/api-viewer/index.html
2.) https://pve.proxmox.com/wiki/Proxmox_VE_API#Clients
3.) https://pve.proxmox.com/wiki/Cloud-Init_Support
4.) https://cloudinit.readthedocs.io/en/latest/
5.) https://docs.ansible.com/
 
Hey, thank you for your fast answer ! I'm going to check this out this week with my crew, thank you very much !
 
Hello again, we've been working a bit on that since, and we've met that error that we are not able to solve, do you have any idea ?

fatal: [localhost]: FAILED! => {"changed": false, "msg": "authorization on proxmox cluster failed with exception: invalid literal for float(): 6.1-3"}.

Thanks by advance :)

96243253_723854768359765_5760294619954806784_n.png
 
Hello again, we've been working a bit on that since, and we've met that error that we are not able to solve, do you have any idea ?

fatal: [localhost]: FAILED! => {"changed": false, "msg": "authorization on proxmox cluster failed with exception: invalid literal for float(): 6.1-3"}.

Thanks by advance :)

View attachment 16992

hi,

user on this thread[0] with same problem reports that it works with a newer version of ansible.

can you verify this?

[0]: https://forum.proxmox.com/threads/u..._password-from-ansibles-proxmox-module.67194/
 
Hey thanks once again for your very fast answer, it was indeed the version problem, now it's setup, so i really want to thank you for this first but as well because you made me discover ansible which appears to be a great tool, so really Oguz and Wolfgang, take much care of you during those hard times !
 
  • Like
Reactions: oguz

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!