A modular Bash script to automate the creation of cloud-ready virtual machines (VMs) on Proxmox VE, supporting both manual and preset-based cloud image selection (Debian, Ubuntu, etc.).
- Interactive setup for all essential VM parameters
- Automatic or manual selection of cloud images (Debian/Ubuntu presets or custom images/URLs)
- Automatic download of missing cloud images
- Cloud-Init configuration for SSH user, passwords, and network
- Option to create a VM template or start the VM immediately
- Modular code structure for easy maintenance and extension
-
Clone this repository and enter the directory:
git clone https://github.com/martin-herz-io/proxmox-vm-builder.git cd proxmox-vm-builder
-
Make the main script executable:
chmod +x create-vm.sh
-
Run the script as root (or with sufficient Proxmox privileges):
sudo ./create-vm.sh
-
Follow the interactive prompts:
- Enter VM details (name, ID, resources, etc.)
- Choose between manual or preset-based cloud image selection
- If preset: select from Debian/Ubuntu images (automatic download if missing)
- If manual: specify a local image or provide a download URL
- Configure network and user settings
- Decide whether to save as template or start the VM
create-vm.sh
— Main entry scriptlib/
— Modular Bash scripts for input, VM creation, cloud image handling, etc.input.sh
— Collects user inputcloudimage_manual.sh
— Manual image selection/downloadcloudimage_preset.sh
— Preset image selection/downloadvm.sh
,cloudinit.sh
,output.sh
,passwords.sh
— Further modular logic
- Proxmox VE (tested on 8.x)
- Bash
wget
(for image download)whiptail
(optional, for nicer menus)- Sufficient permissions to create VMs and write to
/var/lib/vz/template/qcow2
This script is provided "as is" without any warranty. Use at your own risk. Always review and test scripts in a safe environment before using them in production. The author is not responsible for any damage or data loss resulting from the use of this script.
Proxmox VE is a powerful virtualization platform, but creating cloud-ready VMs (with Cloud-Init, SSH, etc.) can be repetitive and error-prone. This script streamlines the process, making it easy to deploy new VMs or templates with best practices and minimal manual effort. The modular structure allows for easy customization and future extension (e.g., more OS presets, advanced networking, etc.).