mirror of
https://github.com/RogerSik/proxmox-vm-template.git
synced 2026-11-17 13:34:24 +01:00
document requirements, usage and created VM in README
Also fix the VS Code file association for ssh-keys.pub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8b17d0e365
commit
cf0765982f
2 files changed
+34
-2
No files matched your search
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnPaste": false,
|
||||
"files.associations": {
|
||||
".ssh-keys.pub": "plaintext"
|
||||
"ssh-keys.pub": "plaintext"
|
||||
},
|
||||
"[shellscript]": {
|
||||
"editor.defaultFormatter": "foxundermoon.shell-format"
|
||||
|
||||
@@ -1,3 +1,35 @@
|
||||
# proxmox-vm-template
|
||||
|
||||
A simple script to download and create a cloud init ready Ubuntu LTS vm.
|
||||
A simple script to download and create a cloud-init ready Ubuntu LTS VM on Proxmox VE.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Proxmox VE host, script runs as `root`
|
||||
- Storage `local-lvm` and bridge `vmbr0`
|
||||
- `libguestfs-tools` (installed automatically if missing)
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
cp ssh-keys.pub.dist ssh-keys.pub
|
||||
# add your public SSH keys to ssh-keys.pub
|
||||
|
||||
./ubuntu-lts.sh # interactive release selection
|
||||
./ubuntu-lts.sh noble # select release by codename
|
||||
```
|
||||
|
||||
The script asks for a VM ID (defaults to the next free ID) and a VM name.
|
||||
|
||||
## What it does
|
||||
|
||||
1. Downloads the current Ubuntu cloud image to `/tmp` (only if newer) and verifies its SHA256 checksum
|
||||
2. Installs `qemu-guest-agent` into a copy of the image and resets `/etc/machine-id`
|
||||
3. Creates the VM:
|
||||
- 2 cores, 1024 MB memory, CPU type `x86-64-v2-AES`
|
||||
- 32G disk with discard and SSD emulation
|
||||
- Serial console, QEMU guest agent enabled
|
||||
- Hotplug for disk, network, USB, memory and CPU
|
||||
- Cloud-init user `devops` with keys from `ssh-keys.pub`, DHCP for IPv4 and IPv6
|
||||
- Starts on boot
|
||||
|
||||
If a step fails after the VM was created, the incomplete VM is destroyed again.
|
||||
Reference in new issue
Block a user