Skip to content

Commit 6f33d5b

Browse files
committed
add README with template import instructions; remove vmIDRange
Signed-off-by: Philipp Born <[email protected]>
1 parent 233a807 commit 6f33d5b

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

samples/proxmox/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# importing a vm template into proxmox
2+
3+
A standard KVM optimized Ubuntu 22.04 image can be imported via
4+
5+
```
6+
TEMPLATE_URL=https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img
7+
TEMPLATE_VMID=10000
8+
TEMPLATE_NAME=ubuntu-22.04
9+
TEMPLATE_STORAGE=tank
10+
TEMPLATE_DISK_OPTIONS="discard=on,iothread=1,ssd=1"
11+
12+
curl -o template.img ${TEMPLATE_URL}
13+
14+
qm create "${TEMPLATE_VMID}" --name ${TEMPLATE_NAME} --memory 16
15+
qm importdisk "${TEMPLATE_VMID}" template.img "${TEMPLATE_STORAGE}"
16+
qm set "${TEMPLATE_VMID}" \
17+
--scsihw virtio-scsi-single \
18+
--scsi0 ${TEMPLATE_STORAGE}:vm-${TEMPLATE_VMID}-disk-0,${TEMPLATE_DISK_OPTIONS} \
19+
--boot order=scsi0 \
20+
--cpu host \
21+
--rng0 source=/dev/urandom \
22+
--template 1 \
23+
--agent 1 \
24+
--onboot 1
25+
```
26+
Then for Ubuntu to work properly, you have to extend the `preK3sCommands` of both `KThreesConfigTemplate` and `KThreesControlPlane` with `apt update && apt -y install qemu-guest-agent && systemctl enable --now qemu-guest-agent`

samples/proxmox/cluster-template-k3s.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ spec:
5858
default:
5959
bridge: ${BRIDGE}
6060
model: virtio
61-
vmIDRange:
62-
start: 2000
63-
end: 3000
6461
---
6562
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
6663
kind: ProxmoxMachineTemplate
@@ -84,9 +81,6 @@ spec:
8481
default:
8582
bridge: ${BRIDGE}
8683
model: virtio
87-
vmIDRange:
88-
start: 2000
89-
end: 3000
9084
---
9185
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
9286
kind: KThreesControlPlane

0 commit comments

Comments
 (0)