[TUTORIAL] Proxmox VE Cloud-init deploy tool

ananiasfilho

Active Member
Nov 20, 2019
27
29
33
44
Hello All, a customer asked us to make Cloud init deployment more fast and less confused.
So, we from KMEE created a proxmox cloud-init tool to help deploy. Its only shellscript solution.
The repository is: https://github.com/kmee/proxmox-cloud-init-tools
Feel free to test and report issues on Github if possible.

Proxmox cloud-init tools​

ShellScript tools to deploy VM cloud-init in Proxmox Virtual Environment (PVE)

Supported PVE Versions​

  • PVE 6 Not tested
  • PVE 6.1 [OK] - Tested
  • PVE 6.2 [OK] - Tested
  • PVE 6.3 [OK] - Tested

Features​

  1. Auto cloud images download
  • Debian 9 - Stretch
  • Debian 10 - Buster
  • Ubuntu Server 18.04 LTS - Bionic
  • Ubuntu Server 20.04 LTS - Focal
  1. Set VM Hostname
  2. Set VM Description
  3. Memory (Available to select 2GB,4GB,8GB and 16GB)
  4. CPU Cores
  5. CPU Sockets
  6. Storage destination (Local, NFS, LVM/LVM-Thin, etc)
  7. Define user, by default root user is defined. If you change to another, this user can be used with sudo powers without password;
  8. Insert SSH authorized keys to user defined on step 8 Very important;
  9. Select bridge network;
  10. Select Static/IP or DHCP usage;
  11. Define uniq VMID;
  12. Can start or not, VM after deployment.

Usage​

  1. Login on your Proxmox VE server over SSH or Console Shell
  2. Clone proxmox-cloud-init project
git clone https://github.com/kmee/proxmox-cloud-init-tools.git

cd proxmox-cloud-init-tools

  1. Create authorized keys files
mkdir pub_keys

touch pub_keys/id_rsa.pub

copy your public ssh keys to pub/keys/id_rsa.pub file

  1. Adjust permission, then run deploy.sh
chmod +x deploy.sh

./deploy.sh

  1. Follow instructions on screen.

Important​

Before deploy VM using things script, upload your public ssh key to ./pub_keys/id_rsa.pub file. if you do not upload keys do pub_keys/id_rsa.pub, you will not access VM.
 
What are the benefits of such scripts over Debian's FAI (fully automated installation) project? No bashing, I'm really interested. ;-)
 
are totaly diferents purposes. Cloud images get a custom lilttle image to deploy clean server.
Many linuxs distros have a cloud image repository to run directly on hypervisors.
This FAI is a tool to deploy environment with multiple features - i have no idea about FAI but seems a good tool to deploy environments too! =) Good to know!
 

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!