Skip to content

Commit 4bb2607

Browse files
renamed
1 parent 6fa644d commit 4bb2607

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

docs/proxmox-templates.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
# Proxmox Templates
1+
# Proxmox VM Templates
22

3-
`netbox-proxmox-automation` is intended to make your life as simple as possible. Once you have a working Proxmox node (or cluster), have provisioned a Proxmox API token with the permissions noted above, a NetBox instance, a NetBox API token, the entire process of managing Proxmox VMs via NetBox involves these simple requirements.
3+
`netbox-proxmox-automation` is intended to make your life as simple as possible. Once you have a working Proxmox node (or cluster), have provisioned a Proxmox API token (the permission is able to manage both VMs and storage), a NetBox instance, a NetBox API token, the entire process of managing Proxmox VMs via NetBox involves these simple requirements.
44

5-
1. You have defined event rules and webhooks for VM operations in NetBox
6-
2. You have a web service that handles events via webhooks
5+
1. You have defined a webhook that will be used to facilitate your automation
6+
2. You have defined an event rule that uses the webhook in Step 1 -- for automating Proxmox VM operations based on VM state in NetBox
7+
3. You have a web application that handles events via webhooks
78

8-
- You are running a web service that handles events via webhooks, e.g. [example-netbox-webhook-flask-app](https://github.com/netboxlabs/netbox-proxmox-automation/tree/main/example-netbox-webhook-flask-app)
9+
- For example, [example-netbox-webhook-flask-app](https://github.com/netboxlabs/netbox-proxmox-automation/tree/main/example-netbox-webhook-flask-app) is an example web application that you can use to facilitate Proxmox automation by handling event rules from NetBox.
910

1011
*-or-*
1112

12-
- You are running AWX and have created templates to handle events via webhooks
13+
- You are running AWX and have created (project) templates to handle events via webhooks
1314

1415

1516
## Initial Configuration: Creating Proxmox VM templates from (cloud-init) images
1617

1718
`netbox-proxmox-automation` *only* supports cloud-init images. The dynamic nature of Proxmox VM automation requires this implementation to be able to set things, during the Proxmox VM provisioning process, like network configuration, hostnames, and more. While it's *possible* that `netbox-proxmox-automation` *might* support your existing Proxmox VM templates, it's *highly* recommended that you follow the procedure below -- for the best results.
1819

19-
As a cloud-init image is basically "blank", meaning that there is not broad network or SSH key configuration, this allows us to have total flexibility in the way that this automation takes a *desired* Proxmox VM state from NetBox and generates anticipated changes to VMs -- in Proxmox.
20+
As a cloud-init image is sufficient "bare bones", meaning that there is not broad network or SSH key or package configuration(s), this allows us to have total flexibility in the way that this automation takes a *desired* Proxmox VM state from NetBox and generates anticipated changes to VMs -- in Proxmox.
2021

2122
This process is [well documented](https://pve.proxmox.com/wiki/Cloud-Init_Support) by the Proxmox team. In the end it comes down to:
2223
- logging into your Proxmox node(s) and running these commands as the 'root' user, or as a user who has adequate permissions to modify Proxmox VMs and the underlying storage
@@ -39,7 +40,7 @@ proxmox-ve-node# cd cloud-images/ubuntu
3940
proxmox-ve-node# for r in jammy focal noble; do wget "https://cloud-images.ubuntu.com/${r}/current/${r}-server-cloudimg-amd64.img" & done
4041
```
4142

42-
Then let the cloud-init images download. Once the downloads have completed, you might want to take backups of the original cloud-init images -- as we will proceed with modifying these cloud-init images slightly before converting them to Proxmox VM templates. Taking backups of the original cloud-init images is helpful should you ever need to revert any customization you did before converting the cloud-init images into Proxmox VM templates. Run this, again, as 'root' on the proxmox-node of your choice.
43+
Then wait for the cloud-init images to download. Once the downloads have completed, you might want to take backups of the original cloud-init images -- as we will proceed with modifying these cloud-init images slightly before converting them to Proxmox VM templates. Taking backups of the original cloud-init images is helpful should you ever need to revert any customization you did before converting the cloud-init images into Proxmox VM templates. Run this, again, as 'root' on the proxmox-node of your choice.
4344

4445
```
4546
proxmox-ve-node# cd /root/cloud-images/ubuntu
@@ -110,7 +111,7 @@ First, create the Proxmox VM, with a unique id, and configure its attributes. W
110111
- create the Proxmox VM
111112
- import the cloud-init image to the Proxmox VM
112113
- set the SCSI (disk) hardware attributes for the Proxmox VM root disk
113-
- map an IDE disk to the cloud-init image
114+
- map an IDE disk to the cloud-init image (this will be used as a CD-ROM)
114115
- define a boot disk for the Proxmox VM
115116
- define a serial port such that the Proxmox VM is accessible through the Proxmox console
116117
- set the QEMU agent to be enabled such that you can access various information from `qemu-guest-agent` when the Proxmox VM is running
@@ -188,14 +189,14 @@ proxmox-ve-node# qm set 9000 --agent enabled=1
188189
update VM 9000: -agent enabled=1
189190
```
190191

191-
Second, convert the Proxmox VM into a template. You can then use this Proxmox VM template in your `netbox-proxmox-automation` automation.
192+
Second, convert the Proxmox VM into a template. You can then use this Proxmox VM template in your `netbox-proxmox-automation` automation.
192193

193-
Now convert the Proxmox VM to a template. *Note that this cannot be undone!*
194+
*Note that this cannot be undone!*
194195

195196
```
196197
proxmox-ve-node# qm template 9000
197198
Renamed "vm-9000-disk-0" to "base-9000-disk-0" in volume group "pve"
198199
Logical volume pve/base-9000-disk-0 changed.
199200
```
200201

201-
You should now be able to use your Proxmox VM template, with a VM id (vmid) of 9000 (or whatever you choose) in your `netbox-proxmox-automation` automation.
202+
You should now be able to use your Proxmox VM template, with a VM id (vmid) of 9000 (or whatever you chose) in your `netbox-proxmox-automation` automation.

0 commit comments

Comments
 (0)