Update README.md
This commit is contained in:
parent
5e2fb3421d
commit
3fb96e37b2
31
README.md
31
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Cloud Init Script
|
# 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 with the same ID.
|
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
|
## Usage
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ You can execute this script directly using `curl` with the following commands:
|
||||||
|
|
||||||
### 1. **Default Storage (`proxmox`) and Default VM Name (`ubuntu-cloudinit2404`):**
|
### 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`):
|
To run the script using the default storage (`proxmox`) and the default VM name (`ubuntu-cloudinit2404`), with VM IDs starting from `8000`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash
|
curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash
|
||||||
|
@ -16,33 +16,28 @@ curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash
|
||||||
|
|
||||||
### 2. **Specify a Different Storage:**
|
### 2. **Specify a Different Storage:**
|
||||||
|
|
||||||
To specify a different storage (`local`) while using the default VM name (`ubuntu-cloudinit2404`):
|
To specify a different storage (`local`) while using the default VM name (`ubuntu-cloudinit2404`), with VM IDs starting from `8000`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash -s -- local
|
curl -sSL https://git.nixc.us/colin/cloud-init/raw/branch/main/install.sh | bash -s -- local
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. **Specify a Different Cloud Image, VM Name, and Storage:**
|
### 3. **Specify a Starting VM ID, Cloud Image, VM Name, and Storage:**
|
||||||
|
|
||||||
To specify a custom cloud image URL, image name, distribution name, version, and storage, the script expects the following parameters in order:
|
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).
|
||||||
|
|
||||||
1. **Cloud Image URL**: The URL from where the cloud image will be downloaded.
|
#### Example for Debian 11:
|
||||||
2. **Image Name**: The name to save the downloaded image file.
|
|
||||||
3. **Distribution Name**: The name of the distribution (e.g., `ubuntu`, `debian`).
|
|
||||||
4. **Version**: The version of the distribution (e.g., `2404`, `11`).
|
|
||||||
5. **Storage**: The Proxmox storage location (e.g., `local`, `proxmox`).
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
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 local
|
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 does the following:
|
This command will:
|
||||||
- Downloads the cloud image from `https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img`.
|
- Download the Debian 11 cloud image.
|
||||||
- Saves the image as `noble-server-cloudimg-amd64.img`.
|
- Save it as `debian-11-genericcloud-amd64.img`.
|
||||||
- Sets the distribution name as `ubuntu` and the version as `2404`.
|
- Set the distribution name as `debian` and the version as `11`.
|
||||||
- Uses `local` as the Proxmox storage location.
|
- Use `local` as the Proxmox storage location.
|
||||||
|
- Prompt for a starting VM ID.
|
||||||
|
|
||||||
## Manual Template Creation
|
## Manual Template Creation
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue