Access to API

hi,

try to see if you can access it with curl from inside the VM. use the -v flag for verbose info (to see what's going on)

use the IP of the PVE host, and don't forget the port 8006
 
use --output-format=json or json-pretty with your pvesh command.

afterwards you can parse the json with whatever you like
 
Do you have an example how I could possibly use the returned json?

Especially for pvesh get /cluster/ressources to store the value on which host the vm is running in a variable.
 

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!