Get IP of VM from script on PVE host (PVE 6.2-6.3)

alexc

Active Member
Apr 13, 2015
123
4
38
I have several KVM VMs on PVE host (both windows and linux guests), all VMs are have qemu-agent installed, and PVE web interface show VM’s IPs. But I can’t find a way to get these IPs from script run on PVE host.

Please advice! Should be some API call or some way to poll qemu-agent I suppose?

All I can find so far is to parse arp table for VM MACs but when agent can report correct (and all) IPs this should be better way.

PVE 6.2 and 6.3 involved.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!