No Qemu Guest Agent error

Alessandro 123

Well-Known Member
May 22, 2016
653
24
58
40
I've installed qemu guest agent on a client (apt-get install qemu-guest-agent) and then, on the host:

Code:
# qm set 100 -agent 1
update VM 100: -agent 1

but

Code:
# qm agent 100 ping
No Qemu Guest Agent

any help ?
 
Works here normal. Have you shutdown the vm completly an and start the vm again? This is necessary to activate the agent. If you set this option in the webinterface, it is "red".
 
No, I didn't because this wasn't wrote on PVE docs.

Can't I manually start the agent? This is a production server....
 
anyway, the agent seems to be running:
Code:
# /etc/init.d/qemu-guest-agent status
* qemu-guest-agent.service - LSB: QEMU Guest Agent startup script
   Loaded: loaded (/etc/init.d/qemu-guest-agent; generated; vendor preset: enabled)
   Active: active (exited) since Tue 2017-11-21 21:23:57 CET; 25min ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/qemu-guest-agent.service

Nov 21 21:23:57 x systemd[1]: Starting LSB: QEMU Guest Agent startup script...
Nov 21 21:23:57 x qemu-guest-agent[31639]: qemu-ga: transport endpoint not found, not starting ... (warning).
Nov 21 21:23:57 x systemd[1]: Started LSB: QEMU Guest Agent startup script.
 
Nov 21 21:23:57 x qemu-guest-agent[31639]: qemu-ga: transport endpoint not found, not starting ... (warning).

says the agent is not running ;) you need to shutdown and then start again (not reboot from within the VM!) the VM, then PVE will add the required serial port.
 
says the agent is not running ;) you need to shutdown and then start again (not reboot from within the VM!) the VM, then PVE will add the required serial port.

I think you should write this on official docs.
I've not installed qemu agent when deploying the VM because i wasnt aware about this needed reboot.
 
Hi Alessandro, when creating the VM, you should create with "agent 1" (I always do that)

Then, when you install the OS, you can choose to either install or not install the qemu-guest-agent.

BTW, in my case, qm commands start working immediately after I install the guest agent and start the service inside the VM. (no reboot required)
 
Probably because you created the VM with agent enabled.

Why that flag isn't enabled automatically ? Anyway, i'll plan a scheduled maintenance for a reboot
 
because if there is no agent for your guest OS, or you don't have it installed, PVE will skip some operations which require the agent (like freezing guest FS to improve consistency).
 
Can't you check the agent by using something like "qm agent <vmid> ping" instead checking only the flag?
 
Can't you check the agent by using something like "qm agent <vmid> ping" instead checking only the flag?

we can (and do in some instances). the config switch would be needed nevertheless to enable/disable USING the agent from the PVE side (it might be installed, but in a known buggy version and you don't want to use it), and changing an implicit default value requires more arguments than "it would be slightly more convenient in some use cases".

you can just create the VM with agent=1 if you know you are going to install the agent on first boot, so I don't really see the problem..
 
  • Like
Reactions: shantanu
you can just create the VM with agent=1 if you know you are going to install the agent on first boot, so I don't really see the problem..

There isn't any problem, simply put, official docs doesn't say that a reboot is needed, thus I've installed our VM (and put it in production) thinking to add the agent in a second time..............
 
There isn't any problem, simply put, official docs doesn't say that a reboot is needed, thus I've installed our VM (and put it in production) thinking to add the agent in a second time..............

this is not specific to the 'use agent' flag - there are tons of options that are not hot-pluggable in general or only hot-pluggable in specific configurations..
 
this is not specific to the 'use agent' flag - there are tons of options that are not hot-pluggable in general or only hot-pluggable in specific configurations..

I think that adding a warning on official docs should not hurt anyone, because you are saying:
On Linux you have to simply install the qemu-guest-agent

is not a simple install, you also need a reboot. Just a single line in offical docs shouldn't hurt, something like:

Code:
If VM was created without the agent flag set, you also need to reboot the VM, allowing Proxmox to create the needed socket.
 
Hi Alessandro,
I agree that the docs could have a tip about creating the vm with agent enabled in case you plan to use qemu agent later.

About the Linux qemu agent, for my observation, it is indeed a matter of only installing the qemu-agent and enabling the service is needed.
NOTE: This is if-and-only-if the vm was created with "agent 1"

My observations have been for CentOS 7 and Ubuntu 16.04 guest VMs.

Proxmox versions 4.latest and 5.latest

Regards,
Shantanu
 
I also have an error with Guest Agent. It doesn't work after boot. I need to restart it manually to make it work:

Code:
root@outline:/var/log# systemctl status qemu-guest-agent.service
● qemu-guest-agent.service - LSB: QEMU Guest Agent startup script
   Loaded: loaded (/etc/init.d/qemu-guest-agent; generated; vendor preset: enabled)
   Active: active (exited) since Thu 2018-12-06 00:11:27 MSK; 2min 56s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 257 ExecStart=/etc/init.d/qemu-guest-agent start (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/qemu-guest-agent.service

Dec 06 00:11:27 outline systemd[1]: Starting LSB: QEMU Guest Agent startup script...
Dec 06 00:11:27 outline qemu-guest-agent[257]: qemu-ga: transport endpoint not found, not starting ... (warning).
Dec 06 00:11:27 outline systemd[1]: Started LSB: QEMU Guest Agent startup script.
root@outline:/var/log# systemctl restart qemu-guest-agent.service
root@outline:/var/log# systemctl status qemu-guest-agent.service
● qemu-guest-agent.service - LSB: QEMU Guest Agent startup script
   Loaded: loaded (/etc/init.d/qemu-guest-agent; generated; vendor preset: enabled)
   Active: active (running) since Thu 2018-12-06 00:14:33 MSK; 2s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 726 ExecStop=/etc/init.d/qemu-guest-agent stop (code=exited, status=0/SUCCESS)
  Process: 733 ExecStart=/etc/init.d/qemu-guest-agent start (code=exited, status=0/SUCCESS)
    Tasks: 1 (limit: 4915)
   Memory: 3.0M
      CPU: 51ms
   CGroup: /system.slice/qemu-guest-agent.service
           └─739 /usr/sbin/qemu-ga --daemonize -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0

Dec 06 00:14:33 outline systemd[1]: Starting LSB: QEMU Guest Agent startup script...
Dec 06 00:14:33 outline systemd[1]: Started LSB: QEMU Guest Agent startup script.
Dec 06 00:14:33 outline qemu-ga[739]: info: guest-ping called
root@outline:/var/log#
 
Dec 06 00:11:27 outline qemu-guest-agent[257]: qemu-ga: transport endpoint not found, not starting ... (warning).

which OS does the guest have? (maybe a unit-ordering issue?)
 
Hi guys, I'm new working with proxmox, I have the same problem after installing qm-guest-agent on my proxmox server.
This is the summary of the issue that I'm getting. The service says it's running but it still doesn't work. I will be very grateful for any help you can give me. Greetings from Cuba.

qemu-guest-agent.service - LSB: QEMU Guest Agent startup script
Loaded: loaded (/etc/init.d/qemu-guest-agent; generated; vendor preset: enabled
Active: active (exited) since Wed 2022-09-28 15:25:53 CDT; 1h 11min ago
Docs: man:systemd-sysv-generator(8)
Process: 1409 ExecStart=/etc/init.d/qemu-guest-agent start (code=exited, status=
Tasks: 0 (limit: 4915)
Memory: 0B
CPU: 0
CGroup: /system.slice/qemu-guest-agent.service

Sep 28 15:25:53 epstac systemd[1]: Starting LSB: QEMU Guest Agent startup script..
Sep 28 15:25:53 epstac qemu-guest-agent[1409]: qemu-ga: transport endpoint not fou
Sep 28 15:25:53 epstac systemd[1]: Started LSB: QEMU Guest Agent startup script.
 
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 yours easily in our online shop.

Buy now!