2.3 KiB
2.3 KiB
To handle the VM ID setting properly and avoid conflicts, you should specify a unique starting VM ID for each image. Here’s how you can modify the script to assign different VM IDs for each template:
1. Ubuntu 24.04 (Default, Starting ID 8000)
curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash -s -- https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img noble-server-cloudimg-amd64.img ubuntu 2404 proxmox 8000
2. Debian 11 Cloud Image (Starting ID 8100)
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.qcow2 debian-11-genericcloud-amd64.qcow2 debian 11 proxmox 8100
3. Fedora 38 Cloud Image (Starting ID 8200)
curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash -s -- https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/x86_64/images/Fedora-Cloud-Base-38-1.6.x86_64.qcow2 fedora-38-cloudimg-amd64.qcow2 fedora 38 proxmox 8200
4. AlmaLinux 8 Cloud Image (Starting ID 8300)
curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash -s -- https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-latest.x86_64.qcow2 almalinux-8-cloudimg-amd64.qcow2 almalinux 8 proxmox 8300
5. Rocky Linux 9 Cloud Image (Starting ID 8400)
curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash -s -- https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2 rockylinux-9-cloudimg-amd64.qcow2 rockylinux 9 proxmox 8400
Explanation:
-
Unique VM IDs:
- Ubuntu: Starting from VM ID
8000
- Debian: Starting from VM ID
8100
- Fedora: Starting from VM ID
8200
- AlmaLinux: Starting from VM ID
8300
- Rocky Linux: Starting from VM ID
8400
These VM IDs are incremented by 100 for each distribution to ensure there are no conflicts.
- Ubuntu: Starting from VM ID
Usage:
You can run each of these commands to create the VM templates with unique IDs for each distribution. This approach ensures that you don’t accidentally overwrite a VM by using the same ID across different images.