[SOLVED] QEMU guest agent

Fablux

New Member
Mar 3, 2020
6
0
1
124
HI all,
I'm using your API into my PHP client.
I'm trying to execute this steps:
  1. Clone VM: /api2/json/nodes/{node}/qemu/{vmid}/clone (OK)
  2. Config IP,Gateway and "QEMU enabled" property: /api2/json/nodes/{node}/qemu/{vmid}/config (OK)
  3. Start VM: /api2/json/nodes/{node}/qemu/{vmid}/status/start (OK)
  4. Execute custom script: /api2/json/nodes/{node}/qemu/{vmid}/agent/exec (KO)
The fourth step failed with this error:
"QEMU guest agent is not running" (status: 500).
Where is the error?

I hope I was clear.

Thank you in advance.
 
the qemu guest agent starts with the guest

so before step 4 wait at least 60 seconds for the vm to start or check if the agent is running

this also requires to install the qemu agent within the guest os if not done
 
another approach is to use the ping command and try as long as you get nothing back ... or fail after 5 oder 10 minutes.

Hi LnxBil,
I tryed with the 'ping' API command and it works!
Thank you very much!
 

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!