No Qemu Guest Agent error

Alessandro 123

Active Member
May 22, 2016
636
23
38
37
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 ?
 

fireon

Famous Member
Oct 25, 2010
3,762
293
103
39
Austria/Graz
iteas.at
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".
 

Alessandro 123

Active Member
May 22, 2016
636
23
38
37
No, I didn't because this wasn't wrote on PVE docs.

Can't I manually start the agent? This is a production server....
 

Alessandro 123

Active Member
May 22, 2016
636
23
38
37
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.
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
5,995
1,035
164
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.
 

Alessandro 123

Active Member
May 22, 2016
636
23
38
37
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.
 

shantanu

Active Member
Mar 30, 2012
112
10
38
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)
 

Alessandro 123

Active Member
May 22, 2016
636
23
38
37
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
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
5,995
1,035
164
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).
 

Alessandro 123

Active Member
May 22, 2016
636
23
38
37
Can't you check the agent by using something like "qm agent <vmid> ping" instead checking only the flag?
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
5,995
1,035
164
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

Alessandro 123

Active Member
May 22, 2016
636
23
38
37
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..............
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
5,995
1,035
164
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..
 

Alessandro 123

Active Member
May 22, 2016
636
23
38
37
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.
 

shantanu

Active Member
Mar 30, 2012
112
10
38
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
 

Murad

New Member
Aug 31, 2018
3
0
1
42
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#
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
5,781
788
148
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?)
 

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!