Getting cloud-init on a machine so its feasible to get cloudinit working on Proxmox
Go to file
colin 0709f98d3f Add CUSTOM.md 2024-08-12 10:22:03 -04:00
CUSTOM.md Add CUSTOM.md 2024-08-12 10:22:03 -04:00
DISTROS.md Add DISTROS.md 2024-08-12 10:16:58 -04:00
README.md Update README.md 2024-08-12 09:41:12 -04:00
install.sh Update install.sh 2024-08-12 10:12:49 -04:00

README.md

Cloud Init Script

This script automates the setup of a virtual machine using a cloud image in Proxmox, with options to create a template and override any existing virtual machine within a specified range of IDs.

Usage

You can execute this script directly using curl with the following commands:

1. Default Storage (proxmox) and Default VM Name (ubuntu-cloudinit2404):

To run the script using the default storage (proxmox) and the default VM name (ubuntu-cloudinit2404), with VM IDs starting from 8000:

curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash

2. Specify a Different Storage:

To specify a different storage (local) while using the default VM name (ubuntu-cloudinit2404), with VM IDs starting from 8000:

curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash -s -- local

3. Specify a Starting VM ID, Cloud Image, VM Name, and Storage:

The script allows you to specify a starting VM ID, cloud image URL, image name, distribution name, version, and storage. The script will delete all VMs in the range starting from the specified ID up to the number of VMs being created (e.g., six VMs).

Example for Debian 11:

curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash -s -- https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.img debian-11-genericcloud-amd64.img debian 11 local

This command will:

  • Download the Debian 11 cloud image.
  • Save it as debian-11-genericcloud-amd64.img.
  • Set the distribution name as debian and the version as 11.
  • Use local as the Proxmox storage location.
  • Prompt for a starting VM ID.

Manual Template Creation

After configuring your VM, when you're ready, create a template using the following command:

qm template <VM_ID>

Where <VM_ID> is the ID of the VM you created.

No license or contributors are defined for this script.