Purpose of pve-dbus-vmstate@VMID.service?

gurubert

Distinguished Member
Mar 12, 2015
1,299
454
153
Berlin, Germany
www.heinlein-consulting.de
Hi,
what is the purpose of the pve-dbus-vmstate@.service?

It starts a Perl script /usr/libexec/qemu-server/dbus-vmstate but not for every VM.

We have seen it running for a few VMs and sometimes it fails:

Code:
Aug 31 15:17:22 pve56 systemd[1]: Starting pve-dbus-vmstate@6000.service - PVE DBus VMState Helper (VM 6000)...
Aug 31 15:17:22 pve56 dbus-vmstate[2563415]: pve-vmstate-6000 listening on :1.74416
Aug 31 15:17:22 pve56 systemd[1]: Started pve-dbus-vmstate@6000.service - PVE DBus VMState Helper (VM 6000).
Aug 31 15:18:15 pve56 dbus-vmstate[2563415]: shutting down gracefully ..
Aug 31 15:19:15 pve56 dbus-vmstate[2563415]: VM 6000 qmp command failed - VM 6000 qmp command 'object-del' failed - got timeout
Aug 31 15:19:15 pve56 dbus-vmstate[2563415]: failed to remove object: VM 6000 qmp command 'object-del' failed - got timeout
Aug 31 15:19:15 pve56 systemd[1]: pve-dbus-vmstate@6000.service: Deactivated successfully.
Aug 31 17:52:50 pve56 systemd[1]: Starting pve-dbus-vmstate@6000.service - PVE DBus VMState Helper (VM 6000)...
Aug 31 17:52:50 pve56 dbus-vmstate[2935010]: pve-vmstate-6000 listening on :1.75059
Aug 31 17:52:50 pve56 dbus-vmstate[2935010]: VM 6000 qmp command failed - VM 6000 qmp command 'object-add' failed - attempt to add duplicate property 'pve-vmstate' to object (type 'container')
Aug 31 17:52:50 pve56 dbus-vmstate[2935010]: VM 6000 qmp command 'object-add' failed - attempt to add duplicate property 'pve-vmstate' to object (type 'container')
Aug 31 17:52:50 pve56 systemd[1]: pve-dbus-vmstate@6000.service: Main process exited, code=exited, status=29/n/a
Aug 31 17:52:50 pve56 systemd[1]: pve-dbus-vmstate@6000.service: Failed with result 'exit-code'.
Aug 31 17:52:50 pve56 systemd[1]: Failed to start pve-dbus-vmstate@6000.service - PVE DBus VMState Helper (VM 6000).
Aug 31 19:09:52 pve56 systemd[1]: Starting pve-dbus-vmstate@6000.service - PVE DBus VMState Helper (VM 6000)...
Aug 31 19:09:53 pve56 dbus-vmstate[3114123]: pve-vmstate-6000 listening on :1.75180
Aug 31 19:09:53 pve56 dbus-vmstate[3114123]: VM 6000 qmp command failed - VM 6000 qmp command 'object-add' failed - attempt to add duplicate property 'pve-vmstate' to object (type 'container')
Aug 31 19:09:53 pve56 dbus-vmstate[3114123]: VM 6000 qmp command 'object-add' failed - attempt to add duplicate property 'pve-vmstate' to object (type 'container')
Aug 31 19:09:53 pve56 systemd[1]: pve-dbus-vmstate@6000.service: Main process exited, code=exited, status=29/n/a
Aug 31 19:09:53 pve56 systemd[1]: pve-dbus-vmstate@6000.service: Failed with result 'exit-code'.
Aug 31 19:09:53 pve56 systemd[1]: Failed to start pve-dbus-vmstate@6000.service - PVE DBus VMState Helper (VM 6000).

It seems to be related with live migration of the VM. This fails as long as this service is in error state.

We have to stop the VM to get rid of the error state.

Why does this exist?

This is on pve-manager/9.2.6/7f8d010005bd72cb (running kernel: 7.0.14-8-pve)
 
That service is currently used to transfer a VM’s connection-tracking state during live migration, so established connections (within the guest) continue to be recognized by stateful firewalls on the target node.

The stale object should not be left behind in the first place in the first place (we should look into why that happened and if cleaning that automatically up can be fine and sensible to do). If this does happen, you should be able to remove it by running qm monitor 6000, entering object_del pve-vmstate in the monitor, and then closing it again, e.g., with Ctrl+D.
 
Last edited: