Running commands on quest with qm guest exec errors

Kobus

New Member
Nov 9, 2018
18
0
1
54
Hi
I have proxmox 5.4-13 installed.
I have enabled the qemu agent.
When I try to run a command omn the remote host I get:
qm guest exec 60037 ls
Agent error: The command guest-exec has not been found
Do I need to install or enable anything else please?
 
Hi
Sorry, I should have said that I have installed it. We run mostly CentOS 6 and 7 VM's and soon to add some 8.
Kobus
 
Hi
Here it is and i dont see guest-exec in here. Is that what it is and how do I enable it?
{
"supported_commands" : [
{
"enabled" : true,
"name" : "guest-set-user-password"
},
{
"enabled" : true,
"name" : "guest-set-vcpus"
},
{
"enabled" : true,
"name" : "guest-get-vcpus"
},
{
"enabled" : true,
"name" : "guest-network-get-interfaces"
},
{
"enabled" : true,
"name" : "guest-suspend-hybrid"
},
{
"enabled" : true,
"name" : "guest-suspend-ram"
},
{
"enabled" : true,
"name" : "guest-suspend-disk"
},
{
"enabled" : true,
"name" : "guest-fstrim"
},
{
"enabled" : true,
"name" : "guest-fsfreeze-thaw"
},
{
"enabled" : true,
"name" : "guest-fsfreeze-freeze"
},
{
"enabled" : true,
"name" : "guest-fsfreeze-status"
},
{
"enabled" : false,
"name" : "guest-file-flush"
},
{
"enabled" : false,
"name" : "guest-file-seek"
},
{
"enabled" : false,
"name" : "guest-file-write"
},
{
"enabled" : false,
"name" : "guest-file-read"
},
{
"enabled" : false,
"name" : "guest-file-close"
},
{
"enabled" : false,
"name" : "guest-file-open"
},
{
"enabled" : true,
"name" : "guest-shutdown"
},
{
"enabled" : true,
"name" : "guest-info"
},
{
"enabled" : true,
"name" : "guest-set-time"
},
{
"enabled" : true,
"name" : "guest-get-time"
},
{
"enabled" : true,
"name" : "guest-ping"
},
{
"enabled" : true,
"name" : "guest-sync"
},
{
"enabled" : true,
"name" : "guest-sync-delimited"
}
],
"version" : "0.12.1"
}
 
hi,

unfortunately the capabilities of qemu-guest-agent aren't always the same between different distributions, since the versions or implementations don't always match.

"version" : "0.12.1"

it seems like this particular one is pretty old, so maybe that's why it doesn't have guest-exec.

what is your vm distribution?
 
Hi
Yes it is. The agent that is installed on CentOS7 is 2.8.1 and that does allow me to do stuff. I might try to get a later version installed, but we pretty much stay clear of source installations. So I will need to hunt for a verion and maybe even create a custom rpm for pour CentOS servers.
Thank you for your time.
 
I might try to get a later version installed, but we pretty much stay clear of source installations. So I will need to hunt for a verion and maybe even create a custom rpm for pour CentOS servers.

Just get the src.rpm of a new version and build it with rpmbuild. I do that all the time and it almost as smooth as using Debian packages :-D
 

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!