Skip to content

Commit 00c832b

Browse files
initial
1 parent 949e70b commit 00c832b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/proxmox-discover-vm-and-lxc.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Discover Proxmox VMs and LXCs and Adding Objects to Netbox
2+
3+
Starting with `netbox-proxmox-automation` 1.2.0, you are able to "discover" Proxmox VMs and LXCs and automatically create the related Virtual Machine objects in NetBox. This is done by using a Proxmox API token to query the virtualization inventory, and based on VM category (Virtual Machines and LXC Containers), collecting everything that we know about virtualization objects in Proxmox -- then creating the related VM objects in NetBox.
4+
5+
*Note that you must follow the steps in [this document](./netbox-customization.md) before running this convenience script!*
6+
7+
`./setup/netbox-discovery-tool.py` was created so that you can document everything that you have in Proxmox in NetBox, but with the understanding that your future pattern will be to induce changes in Proxmox from the "intent" (i.e. desired state) that you've set in NetBox.
8+
`./setup/netbox-discovery-tool.py` was not created to implement a perpetual "discovery" process against the inventory that lives in Proxmox. It's meant to be a starting point in your automation journey.
9+
10+
`netbox-proxmox-automation` has a sample config file under the `conf.d` directory that's called `netbox_setup_objects.yml-sample`. Make a copy of `netbox_setup_objects.yml-sample` to the location of your choice. Then run `./setup/netbox-discovery-tool.py` as follows.
11+
12+
```
13+
shell$ cd /path/to/netbox-proxmox-automation/setup
14+
15+
shell$ deactivate
16+
17+
shell$ python3 -m venv venv
18+
19+
shell$ source venv/bin/activate
20+
21+
shell$ pip install -r requirements.txt
22+
```
23+
24+
## To Discover Proxmox VMs
25+
26+
Follow the steps above, then: `./netbox-discovery-tool.py vm --config /path/to/your-config.yml`
27+
28+
## To Discover Proxmox LXCs
29+
30+
Follow the steps above, then: `./netbox-discovery-tool.py lxc --config /path/to/your-config.yml`

0 commit comments

Comments
 (0)