[SOLVED] qemu-ga - it's possible to reboot via pve from VM?

czechsys

Well-Known Member
Nov 18, 2015
331
28
48
For example, when i change VM name, without reboot on PVE side it's still using old name in qm process on PVE. Or use some swap on PVE.

Can i use qemu-ga to send reboot (itself) command from VM to PVE and if yes, what's correct syntax?
 

Lorenz.S

Proxmox Retired Staff
Retired Staff
Apr 12, 2021
97
16
8
21
Hi,

no, it is not directly possible to send a command from the VM to the PVE via the qemu-ga.

But you could use SSH on the VM to trigger a custom script on the PVE which shuts the VM down and boots it again. :)
 

czechsys

Well-Known Member
Nov 18, 2015
331
28
48
Thanks for reply. Exposing PVE infra to all VMs is no go for me. It will be nice feature for qemu-agent to "reset" process on PVE.
 

Dunuin

Famous Member
Jun 30, 2020
7,212
1,719
149
Germany
Thanks for reply. Exposing PVE infra to all VMs is no go for me. It will be nice feature for qemu-agent to "reset" process on PVE.
Using the PVE API should work too. You could create a user that is only allowed to start/stop/reset VMs (only give the "VM.PowerMgmt" privilege). And you could give that user a token to authentificate with the API. So in worst case a VM might shutdown another VM and you revoke the token.
 
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 your own in 60 seconds.

Buy now!