Proxmox API domain name

hloudes

New Member
Mar 12, 2026
2
0
1
Hello,

I'd like to be able to retrieve the domain name of my machines naturally via the QEMU agent.
I've gone through the API documentation and the forum without finding an answer.

I can retrieve the hostname, but it’s not the FQDN. I need the FQDN. Aside from the /exec and /exec-status endpoints, which allow me to retrieve the command’s output, is there another method built into the API with certain parameters, maybe?

Best regards !
 
Hi,

By guest agent you can use "qm guest cmd" command which has a set of predefined commands or you can use "qm guest exec" (or exec it via api). Qemu guest exec (when allowed in the guest agent configuration) allows you to execute any linux (or Windows) command. So you can do hostname -f or parse /etc/hosts.
 
Hello,

Actually, I need the FQDN for host discovery in Centreon, so I'd like to be able to retrieve it without having to set up services that point to custom scripts. I'd like to have the FQDN reported directly instead of the host name