ERROR: Backup failed - start failed Unit already exists

I have installed gpg couple of months ago to encrypt backup files that are later being sent to external storage via vzdump script. While I guess it is possible gpg-agent is launching whenever backup process spawns, I'd like to know how to disable it; it has got some files in /usr/lib/systemd/user that supposedly launch gpg-agent.

Moreiq, do you also use GPG on the host machine?

The above files (gpg-agent.service and gpg-agent*.socket) from the directory I have mentioned above are also being the only files referenced by the directory /usr/lib/systemd/user/socket.target.wants.

Should I just delete them from there? I'm going to do it and then check what happens. This gpg-agent launching is clearly done by userland process so maybe it gets stuck as it daemonizes.

No GPG here
 
This is to confirm that since last update the issue has been resolved for me. Many thanks for assistance and support.
 
updating the options file fixed my issue with "unit already existing" i changed the start up order
 
Goodmorning everyone,
I have the same problem too.
unfortunately, if the backup tool is not solved (unreliable) it affects the whole infrastructure of my client. No solution? below the backup logs.
Thank you all.


INFO: starting new backup job: vzdump 107 --storage Disk1 --quiet 1 --mailto xxx@yyyyyyy.it --compress lzo --mode stop --mailnotification failure
INFO: Starting Backup of VM 107 (qemu)
INFO: status = running
INFO: update VM 107: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: APPL-win2008-FC
INFO: include disk 'scsi0' 'FC-storage:107/vm-107-disk-1.qcow2' 163G
INFO: include disk 'scsi1' 'FC-storage:107/vm-107-disk-2.qcow2' 300G
INFO: stopping vm
INFO: creating archive '/Disk1/dump/vzdump-qemu-107-2018_09_20-22_00_02.vma.lzo'
INFO: starting kvm to execute backup task
INFO: restarting vm
INFO: vm is online again after 26 seconds
ERROR: Backup of VM 107 failed - start failed: org.freedesktop.systemd1.UnitExists: Unit 107.scope already exists.
INFO: Backup job finished with errors

TASK ERROR: job errors

-------------------------------------
root@nodo1:~# pveversion -v
proxmox-ve: 5.2-2 (running kernel: 4.13.4-1-pve)
pve-manager: 5.2-9 (running version: 5.2-9/4b30e8f9)
pve-kernel-4.15: 5.2-7
pve-kernel-4.15.18-4-pve: 4.15.18-23
pve-kernel-4.13.4-1-pve: 4.13.4-26
corosync: 2.4.2-pve5
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-38
libpve-guest-common-perl: 2.0-17
libpve-http-server-perl: 2.0-10
libpve-storage-perl: 5.0-28
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 3.0.2+pve1-2
lxcfs: 3.0.0-1
novnc-pve: 1.0.0-2
proxmox-widget-toolkit: 1.0-20
pve-cluster: 5.0-30
pve-container: 2.0-27
pve-docs: 5.2-8
pve-firewall: 3.0-14
pve-firmware: 2.0-5
pve-ha-manager: 2.0-5
pve-i18n: 1.0-6
pve-libspice-server1: 0.12.8-3
pve-qemu-kvm: 2.11.2-1
pve-xtermjs: 1.0-5
qemu-server: 5.0-34
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.9-pve1~bpo9

 
Last edited:
Hi my problem still persists, more info:
- full stop scheduled backup
- up to date proxmox VE
- it's random (it doesn't occur always, nor on same VMs)
- it even occurs randomly in one backup job (3 VMs to backup, 2 fail, 1 is OK)
- only the backup fails, the machine never failed to start back (the log is very same as in post above)
 
Same issue here

INFO: vm is online again after 28 seconds
ERROR: Backup of VM 401 failed - start failed: org.freedesktop.systemd1.UnitExists: Unit 401.scope already exists.
INFO: Backup job finished with errors

------------------------------------------------------------------------------------------------------------------------------------------------------------------

proxmox-ve: 5.2-2 (running kernel: 4.15.18-1-pve)
pve-manager: 5.2-10 (running version: 5.2-10/6f892b40)
pve-kernel-4.15: 5.2-10
pve-kernel-4.15.18-7-pve: 4.15.18-27
pve-kernel-4.15.18-2-pve: 4.15.18-21
pve-kernel-4.15.18-1-pve: 4.15.18-19
pve-kernel-4.15.17-3-pve: 4.15.17-14
pve-kernel-4.15.17-2-pve: 4.15.17-10
pve-kernel-4.13.13-2-pve: 4.13.13-33
corosync: 2.4.2-pve5
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-40
libpve-guest-common-perl: 2.0-18
libpve-http-server-perl: 2.0-11
libpve-storage-perl: 5.0-30
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 3.0.2+pve1-3
lxcfs: 3.0.2-2
novnc-pve: 1.0.0-2
proxmox-widget-toolkit: 1.0-20
pve-cluster: 5.0-30
pve-container: 2.0-29
pve-docs: 5.2-8
pve-firewall: 3.0-14
pve-firmware: 2.0-5
pve-ha-manager: 2.0-5
pve-i18n: 1.0-6
pve-libspice-server1: 0.14.1-1
pve-qemu-kvm: 2.12.1-1
pve-xtermjs: 1.0-5
qemu-server: 5.0-38
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.11-pve1~bpo1
 
Same here. VM stops then starts but backup fails.
Driver was changed from "virtio block" to "virtio scsi passthrough" but no luck.
Windows driver version is 0.1.160 (latest available).
I have identical error at another Proxmox deployment with Windows VMs. In both cases error occurs only at VMs with AD domain controller with DNS server.
Code:
INFO: trying to get global lock - waiting...
INFO: got global lock
INFO: starting new backup job: vzdump 100 104 --mode stop --storage backup-vps01-2TB --compress gzip --mailnotification always --quiet 1
INFO: skip external VMs: 100
INFO: Starting Backup of VM 104 (qemu)
INFO: status = running
INFO: update VM 104: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: dot03-ad-dc-terminal
INFO: include disk 'scsi0' 'local-zfs:vm-104-disk-0' 700G
INFO: stopping vm
INFO: creating archive '/mnt/pve/backup-vps01-2TB/dump/vzdump-qemu-104-2018_11_02-03_36_44.vma.gz'
INFO: starting kvm to execute backup task
INFO: restarting vm
INFO: vm is online again after 32 seconds
ERROR: Backup of VM 104 failed - start failed: org.freedesktop.systemd1.UnitExists: Unit 104.scope already exists.
INFO: Backup job finished with errors

TASK ERROR: job errors
Code:
proxmox-ve: 5.2-2 (running kernel: 4.15.18-7-pve)
pve-manager: 5.2-10 (running version: 5.2-10/6f892b40)
pve-kernel-4.15: 5.2-10
pve-kernel-4.15.18-7-pve: 4.15.18-27
pve-kernel-4.15.18-5-pve: 4.15.18-24
pve-kernel-4.15.17-1-pve: 4.15.17-9
corosync: 2.4.2-pve5
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-40
libpve-guest-common-perl: 2.0-18
libpve-http-server-perl: 2.0-11
libpve-storage-perl: 5.0-30
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 3.0.2+pve1-3
lxcfs: 3.0.2-2
novnc-pve: 1.0.0-2
proxmox-widget-toolkit: 1.0-20
pve-cluster: 5.0-30
pve-container: 2.0-29
pve-docs: 5.2-8
pve-firewall: 3.0-14
pve-firmware: 2.0-5
pve-ha-manager: 2.0-5
pve-i18n: 1.0-6
pve-libspice-server1: 0.14.1-1
pve-qemu-kvm: 2.12.1-1
pve-xtermjs: 1.0-5
qemu-server: 5.0-38
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.11-pve1~bpo1
 
Last edited:
Same thing just happened again last night, for 3 VMs.

proxmox-ve: 5.2-2 (running kernel: 4.15.18-1-pve)
pve-manager: 5.2-10 (running version: 5.2-10/6f892b40)
pve-kernel-4.15: 5.2-11
pve-kernel-4.15.18-8-pve: 4.15.18-28
pve-kernel-4.15.18-7-pve: 4.15.18-27
pve-kernel-4.15.18-2-pve: 4.15.18-21
pve-kernel-4.15.18-1-pve: 4.15.18-19
pve-kernel-4.15.17-3-pve: 4.15.17-14
pve-kernel-4.15.17-2-pve: 4.15.17-10
pve-kernel-4.13.13-2-pve: 4.13.13-33
corosync: 2.4.2-pve5
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.0-8
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-41
libpve-guest-common-perl: 2.0-18
libpve-http-server-perl: 2.0-11
libpve-storage-perl: 5.0-30
libqb0: 1.0.1-1
lvm2: 2.02.168-pve6
lxc-pve: 3.0.2+pve1-3
lxcfs: 3.0.2-2
novnc-pve: 1.0.0-2
proxmox-widget-toolkit: 1.0-20
pve-cluster: 5.0-30
pve-container: 2.0-29
pve-docs: 5.2-9
pve-firewall: 3.0-14
pve-firmware: 2.0-6
pve-ha-manager: 2.0-5
pve-i18n: 1.0-6
pve-libspice-server1: 0.14.1-1
pve-qemu-kvm: 2.12.1-1
pve-xtermjs: 1.0-5
qemu-server: 5.0-38
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.11-pve2~bpo1
 
Same issue here. Stop-mode backups randomly fail. PVE v5.3.5. Happens for simple Win10 VMs as well, so not just for AD domain controllers, as the poster above suggested. In addition to that, while the VM seems to start properly, this is not the case, as some Windows services that are supposed start automatically are not started because of timeouts (services fail to start with event id 7009 and 7000). This must be related to the Proxmox stop backup issue, as when the machine is rebooted manually, the services start without any problems. Please have a look at this issue as multiple posters here seem to have the same problem. Thanks!

start failed: org.freedesktop.systemd1.UnitExists: Unit 300.scope already exists.

proxmox-ve: 5.3-1 (running kernel: 4.15.18-9-pve)
pve-manager: 5.3-5 (running version: 5.3-5/97ae681d)
pve-kernel-4.15: 5.2-12
pve-kernel-4.15.18-9-pve: 4.15.18-30
pve-kernel-4.15.17-1-pve: 4.15.17-9
corosync: 2.4.4-pve1
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.1-3
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-43
libpve-guest-common-perl: 2.0-18
libpve-http-server-perl: 2.0-11
libpve-storage-perl: 5.0-33
libqb0: 1.0.3-1~bpo9
lvm2: 2.02.168-pve6
lxc-pve: 3.0.2+pve1-5
lxcfs: 3.0.2-2
novnc-pve: 1.0.0-2
proxmox-widget-toolkit: 1.0-22
pve-cluster: 5.0-31
pve-container: 2.0-31
pve-docs: 5.3-1
pve-edk2-firmware: 1.20181023-1
pve-firewall: 3.0-16
pve-firmware: 2.0-6
pve-ha-manager: 2.0-5
pve-i18n: 1.0-9
pve-libspice-server1: 0.14.1-1
pve-qemu-kvm: 2.12.1-1
pve-xtermjs: 1.0-5
qemu-server: 5.0-43
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.12-pve1~bpo1
 
We're having the same problem on several win 10 vms.
Does anyone have a tip for a work around? This is a big issue for us.

root@pve1:~# pveversion -v
proxmox-ve: 5.3-1 (running kernel: 4.15.18-10-pve)
pve-manager: 5.3-8 (running version: 5.3-8/2929af8e)
pve-kernel-4.15: 5.3-1
pve-kernel-4.15.18-10-pve: 4.15.18-32
pve-kernel-4.15.18-9-pve: 4.15.18-30
pve-kernel-4.15.18-8-pve: 4.15.18-28
pve-kernel-4.15.18-7-pve: 4.15.18-27
pve-kernel-4.15.18-4-pve: 4.15.18-23
pve-kernel-4.15.18-2-pve: 4.15.18-21
pve-kernel-4.15.18-1-pve: 4.15.18-19
pve-kernel-4.15.17-1-pve: 4.15.17-9
corosync: 2.4.4-pve1
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.1-3
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-43
libpve-guest-common-perl: 2.0-19
libpve-http-server-perl: 2.0-11
libpve-storage-perl: 5.0-36
libqb0: 1.0.3-1~bpo9
lvm2: 2.02.168-pve6
lxc-pve: 3.1.0-2
lxcfs: 3.0.2-2
novnc-pve: 1.0.0-2
proxmox-widget-toolkit: 1.0-22
pve-cluster: 5.0-33
pve-container: 2.0-33
pve-docs: 5.3-1
pve-edk2-firmware: 1.20181023-1
pve-firewall: 3.0-17
pve-firmware: 2.0-6
pve-ha-manager: 2.0-6
pve-i18n: 1.0-9
pve-libspice-server1: 0.14.1-1
pve-qemu-kvm: 2.12.1-1
pve-xtermjs: 3.10.1-1
qemu-server: 5.0-45
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.12-pve1~bpo1
root@pve1:~#
 
Hello,
I have the same problem when backing up a VM in "STOP" mode. All current updates are installed, including patch for bug # 2043.
Unfortunately, the patch brings no improvement. Sometimes the backup will not be executed and the following error message will be displayed: "ERROR: Backup of VM XXX failed - start failed: org.freedesktop.systemd1.UnitExists: Unit XXX.scope already exists."
This morning, the VM did not start after the failed backup. Otherwise, the VMs usually start after a faulty backup.
Has anyone else the problem even though the patch was installed?
Code:
proxmox-ve: 5.3-1 (running kernel: 4.15.18-12-pve)
pve-manager: 5.3-11 (running version: 5.3-11/d4907f84)
pve-kernel-4.15: 5.3-3
pve-kernel-4.15.18-12-pve: 4.15.18-35
pve-kernel-4.15.18-11-pve: 4.15.18-34
pve-kernel-4.15.18-8-pve: 4.15.18-28
pve-kernel-4.15.18-7-pve: 4.15.18-27
pve-kernel-4.15.17-3-pve: 4.15.17-14
pve-kernel-4.15.17-2-pve: 4.15.17-10
pve-kernel-4.15.17-1-pve: 4.15.17-9
pve-kernel-4.15.15-1-pve: 4.15.15-6
pve-kernel-4.13.4-1-pve: 4.13.4-26
corosync: 2.4.4-pve1
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.1-3
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-47
libpve-guest-common-perl: 2.0-20
libpve-http-server-perl: 2.0-12
libpve-storage-perl: 5.0-39
libqb0: 1.0.3-1~bpo9
lvm2: 2.02.168-pve6
lxc-pve: 3.1.0-3
lxcfs: 3.0.3-pve1
novnc-pve: 1.0.0-3
proxmox-widget-toolkit: 1.0-23
pve-cluster: 5.0-33
pve-container: 2.0-35
pve-docs: 5.3-3
pve-edk2-firmware: 1.20181023-1
pve-firewall: 3.0-18
pve-firmware: 2.0-6
pve-ha-manager: 2.0-8
pve-i18n: 1.0-9
pve-libspice-server1: 0.14.1-2
pve-qemu-kvm: 2.12.1-2
pve-xtermjs: 3.10.1-2
qemu-server: 5.0-47
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.13-pve1~bpo1
 
It still happens in 5.4:

Do we have to perform some manual cleanup? Could you advise some workarounds?
This particular vm fails to backups every week.

--- pveversion -v

proxmox-ve: 5.4-1 (running kernel: 4.15.18-11-pve)
pve-manager: 5.4-3 (running version: 5.4-3/0a6eaa62)
pve-kernel-4.15: 5.3-3
pve-kernel-4.15.18-12-pve: 4.15.18-35
pve-kernel-4.15.18-11-pve: 4.15.18-34
pve-kernel-4.15.18-10-pve: 4.15.18-32
pve-kernel-4.15.18-9-pve: 4.15.18-30
pve-kernel-4.15.18-8-pve: 4.15.18-28
pve-kernel-4.15.17-1-pve: 4.15.17-9
corosync: 2.4.4-pve1
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.1-8
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-50
libpve-guest-common-perl: 2.0-20
libpve-http-server-perl: 2.0-13
libpve-storage-perl: 5.0-41
libqb0: 1.0.3-1~bpo9
lvm2: 2.02.168-pve6
lxc-pve: 3.1.0-3
lxcfs: 3.0.3-pve1
novnc-pve: 1.0.0-3
proxmox-widget-toolkit: 1.0-25
pve-cluster: 5.0-36
pve-container: 2.0-37
pve-docs: 5.4-2
pve-edk2-firmware: 1.20190312-1
pve-firewall: 3.0-19
pve-firmware: 2.0-6
pve-ha-manager: 2.0-9
pve-i18n: 1.1-4
pve-libspice-server1: 0.14.1-2
pve-qemu-kvm: 2.12.1-3
pve-xtermjs: 3.12.0-1
qemu-server: 5.0-50
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.13-pve1~bpo2


--- Backup log ---

Task viewer: VM/CT 117 - Backup

OutputStatus

Stop
INFO: starting new backup job: vzdump 117 --compress lzo --mailnotification always --quiet 1 --mode stop --node pve3 --storage pve1_backup
INFO: Starting Backup of VM 117 (qemu)
INFO: status = running
INFO: update VM 117: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: tfs
INFO: include disk 'ide0' 'localSSD:117/vm-117-disk-0.qcow2' 400G
INFO: include disk 'ide1' 'pve3pool:vm-117-disk-0' 4000G
INFO: stopping vm
INFO: snapshots found (not included into backup)
INFO: creating archive '/mnt/pve/pve1_backup/dump/vzdump-qemu-117-2019_04_13-10_42_02.vma.lzo'
INFO: starting kvm to execute backup task
INFO: restarting vm
INFO: start failed: org.freedesktop.systemd1.UnitExists: Unit 117.scope already exists.
command 'qm start 117 --skiplock' failed: exit code 255
ERROR: Backup of VM 117 failed - start failed: org.freedesktop.systemd1.UnitExists: Unit 117.scope already exists.
INFO: Backup job finished with errors

TASK ERROR: job errors
 
Problem persists. Is there already a way to solve the problem?
Same issue here, it only happens with a VM with RHEL 6 (virtualized from a running physical server).
I noticed that it is really slow when I shut it down (it takes 5 minutes to power off)

Could it be somehow related to the backup issue?
 
Colleagues, the problem is relevant today. Is there a solution to the problem? Observing the problem, it became clear that the first run of the backup copy of the virtual machine after the server restart proceeds normally, but if you run the backup a second time, no matter after what period of time, the problem appears: "TASK ERROR: start failed: org.freedesktop.systemd1.UnitExists: Unit 104.scope already exists."
 

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!