qm guest command - List

andaga

Member
May 24, 2022
94
14
8
Hello!
Where to found all the list of command available for using the qemu-guest-agent for setup everything

A list where we can found all the functions available like this:

Adding static IP to network interfaces:
qm guest exec VMID netsh interface ipv4 set address name=Ethernet static IP netmask gateway

Adding DNS server into network interface:

DNS 1: qm guest exec VMID netsh interface ipv4 set dnsservers name="Ethernet" static 8.8.8.8 primary
DNS 2: qm guest exec VMID netsh interface ipv4 add dnsservers name="Ethernet" address=1.1.1.1 index=2
DNS 3: qm guest exec VMID netsh interface ipv4 add dnsservers name="Ethernet" address=9.9.9.9 index=3

For to have all the possibilities..

Thank you
 
Hello,

`qm` is more general than an interface for `qemu-guest-agent` as it can work without the agent installed on VMs. Have you tried reading the manual for `qm` using `man qm`?
 
qm guest exec VMID
This is the QEMU part, i.e. the general one.
netsh interface ipv4 set dnsservers name="Ethernet" static 8.8.8.8 primary
This is a Windows CMD command to set the network configuration.

The only thing you do with it is send a command to the operating system via the QEMU Guest Agent. The command is as if you were there directly via CMD and entered it there. Accordingly, the commands only work if the Guest Agent is already running.

But with this part you are completely free to decide which instructions you give to the VM. So if you're looking for a list of what you can do, you'll have to contact the manufacturers or developers of the operating systems. Neither QEMU nor Proxmox can do this.

But if you have specific use cases where you're stuck, you can always ask here in the forum. Someone here will definitely be able to help you.
 

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!