Stop vm for backup

Valerio Pachera

Active Member
Aug 19, 2016
131
6
38
42
Hi all, right now I don't have time to test so I ask directly:
when I configure a backup with method 'stop', shall the guest be automatically restarted after the backup?

It seems it doesn't (proxmox 5).

Thank you.
 
Here's the log:

Code:
INFO: starting new backup job: vzdump 103 104 105 --quiet 1 --mode stop --storage esterno --node proxmox --mailto 'xxxxxxxxxxxxxxxxxxxxx' --mailnotification always --compress lzo
INFO: Starting Backup of VM 103 (qemu)
INFO: status = running
INFO: update VM 103: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: nextcloud-caritas
INFO: include disk 'virtio0' 'vm:vm-103-disk-1' 10G
INFO: include disk 'virtio1' 'vm:vm-103-disk-2' 2100G
INFO: exclude disk 'virtio2' 'vm:vm-103-disk-3' (backup=no)
INFO: stopping vm
INFO: creating archive '/media/esterno/dump/vzdump-qemu-103-2017_07_09-23_00_02.vma.lzo'
INFO: starting kvm to execute backup task
INFO: started backup task 'ca6359b3-8c9c-4b5c-95ed-399bb366c7bb'
INFO: resume VM
ERROR: VM 103 not running
INFO: aborting backup job
ERROR: VM 103 not running
INFO: restarting vm
INFO: start failed: org.freedesktop.systemd1.UnitExists: Unit 103.scope already exists.
command 'qm start 103 --skiplock' failed: exit code 255
ERROR: Backup of VM 103 failed - VM 103 not running
INFO: Starting Backup of VM 104 (qemu)
INFO: status = stopped
INFO: update VM 104: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: collabora
INFO: skip unused drive 'vm:vm-104-disk-1' (not included into backup)
INFO: creating archive '/media/esterno/dump/vzdump-qemu-104-2017_07_09-23_00_11.vma.lzo'
INFO: backup contains no disks
INFO: starting template backup
INFO: /usr/bin/vma create -v -c /media/esterno/dump/vzdump-qemu-104-2017_07_09-23_00_11.tmp/qemu-server.conf exec:lzop>/media/esterno/dump/vzdump-qemu-104-2017_07_09-23_00_11.vma.dat
INFO: archive file size: 0KB
INFO: Finished Backup of VM 104 (00:00:01)
INFO: Starting Backup of VM 105 (qemu)
INFO: status = running
INFO: update VM 105: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: zeroshell-caritas
INFO: include disk 'virtio0' 'vm:vm-105-disk-1' 4G
INFO: stopping vm
INFO: creating archive '/media/esterno/dump/vzdump-qemu-105-2017_07_09-23_00_12.vma.lzo'
INFO: starting kvm to execute backup task
INFO: started backup task 'cdc69863-978c-46bc-b401-c2d7b4a02cd3'
INFO: resume VM
ERROR: VM 105 not running
INFO: aborting backup job
ERROR: VM 105 not running
INFO: restarting vm
INFO: start failed: org.freedesktop.systemd1.UnitExists: Unit 105.scope already exists.
command 'qm start 105 --skiplock' failed: exit code 255
ERROR: Backup of VM 105 failed - VM 105 not running
INFO: Backup job finished with errors
TASK ERROR: job errors

vm with id 105 is the most critical one because it's the firewall.
If it doesn't start, I can't reach the server.

I can tell you that the problem is reproducible.
I created a backup on another proxmox 5 installation with 1 gust only.
This is the log

Code:
()
INFO: starting new backup job: vzdump 105 --mailnotification always --quiet 1 --mode stop --compress lzo --storage nas
INFO: Starting Backup of VM 105 (qemu)
INFO: status = running
INFO: update VM 105: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: zeroshell-caritas
INFO: include disk 'virtio0' 'vm:vm-105-disk-1' 4G
INFO: stopping vm
INFO: creating archive '/mnt/pve/nas/dump/vzdump-qemu-105-2017_07_10-14_21_02.vma.lzo'
INFO: starting kvm to execute backup task
INFO: started backup task '1e51ff4d-03b5-4c4c-93be-99772d7f38ff'
INFO: resume VM
ERROR: VM 105 not running
INFO: aborting backup job
ERROR: VM 105 not running
INFO: restarting vm
INFO: start failed: org.freedesktop.systemd1.UnitExists: Unit 105.scope already exists.
command 'qm start 105 --skiplock' failed: exit code 255
ERROR: Backup of VM 105 failed - VM 105 not running
INFO: Backup job finished with errors
TASK ERROR: job errors
 
Hi,
can't reproduce it here.
May be you have special settings?
Can you also give some information about your VM.
What storage do you use as backup storage and what as vm storage?
 
I preproduced the problem with a qemu guest.
OS is a firewall distribution named zeroshell.
I will re-test with a debian guest soon.
The storage is lvm-thin.
The destination is a directory (mount point for a usb hard disk).
Here in my office the destination is nfs storage.
 
I tested it again on my office server.
This time the guest is another debian 9 (qemu guest).
If I run backup manually (so by snapshot) it works fine.
That means there are no problem on the destination storage.

I run the backup twice because the first time it gave this error:

Code:
TASK ERROR: start failed: org.freedesktop.systemd1.UnitExists: Unit 103.scope already exists.

An this is the second time, also failed

Code:
()
INFO: starting new backup job: vzdump 103 --storage nas --quiet 1 --mode stop --compress lzo --mailnotification always
INFO: Starting Backup of VM 103 (qemu)
INFO: status = running
INFO: update VM 103: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: nextcloud-caritas
INFO: include disk 'virtio0' 'vm:vm-103-disk-1' 10G
INFO: stopping vm
INFO: creating archive '/mnt/pve/nas/dump/vzdump-qemu-103-2017_07_11-16_42_02.vma.lzo'
INFO: starting kvm to execute backup task
INFO: started backup task 'a85db974-777a-47eb-be79-0b04bdf25e3d'
INFO: resume VM
ERROR: VM 103 not running
INFO: aborting backup job
ERROR: VM 103 not running
INFO: restarting vm
INFO: start failed: org.freedesktop.systemd1.UnitExists: Unit 103.scope already exists.
command 'qm start 103 --skiplock' failed: exit code 255
ERROR: Backup of VM 103 failed - VM 103 not running
INFO: Backup job finished with errors
TASK ERROR: job errors

The guest was running at the moment of the backups.
 
Reporting another issue, W10 guests with Virtio Driver (ZFS ZVOl storage) on shutdown had 2 x windows 10 guests hang.
Cannot restart them, even after killing and unlocking process.

TASK ERROR: start failed: org.freedesktop.systemd1.UnitExists: Unit 111.scope already exists.

Any workaround other than rebooting?
 
Reporting another issue, W10 guests with Virtio Driver (ZFS ZVOl storage) on shutdown had 2 x windows 10 guests hang.
Cannot restart them, even after killing and unlocking process.

TASK ERROR: start failed: org.freedesktop.systemd1.UnitExists: Unit 111.scope already exists.

Any workaround other than rebooting?

Something to try, I recall that when running on ZFS, they recommend setting VM hard drive cache setting set to "writeback". Check if it's set to none, and change if needed.

https://forum.proxmox.com/threads/solved-vm-wont-boot-if-located-in-a-zfs-directory.17784/

Also, always use stable virtio drivers (YMMV)
 
Last edited:
Yes, all that is set correctly.
I actually remembered this being a big problem in the past as well.

In order to make the GUESTs run correctly, I had to change my virtio0 to scsci0 although the scsi controller is still the virtio.
Having the disk devices on virtio0 caused huge latency and they would get stuck randomly.

This configuration causes huge problems and lockups.
virtio0: datastore-zfs-mypool-8tb:vm-110-disk-1,cache=writeback,size=100G
scsihw: virtio-scsi-pci

Switching to this configuration seems to work fine.
scsi0: datastore-zfs-mypool-8tb:vm-110-disk-1,cache=writeback,size=100G
scsihw: virtio-scsi-pci

It seems to happen when there are multiple KVM guests running with virtio0
I fixed via adding an extra disk scsi0, booting them up one at a time, installing the redhat drivers (which did install a different driver when the disk is set to scsi0 than when it is virtio0 even though the controller is the same), shutting down and then switching the boot disk from virtio0 to scsi0.





Something to try, I recall that when running on ZFS, they recommend setting VM hard drive cache setting set to "writeback". Check if it's set to none, and change if needed.

https://forum.proxmox.com/threads/solved-vm-wont-boot-if-located-in-a-zfs-directory.17784/

Also, always use stable virtio drivers (YMMV)
 
Hi effgee,

when you have problems do not use threads what has noting to do with your problem.
Open a new thread and you get help.
 
Hi effgee,

when you have problems do not use threads what has noting to do with your problem.
Open a new thread and you get help.

Is there a fix for this yet? I have VMs all over the place that are not starting and no combination of virtio or SCSI is solving the issue.

- TASK ERROR: start failed: org.freedesktop.systemd1.UnitExists: Unit 123.scope already exists.

This is starting to become a big problem for us because we can't reliably start the VM after a backup.
 
I don't know but you will see it in the bug-tracker.
 
The patch available in pve-qemu-kvm 2.9.1-5 seems to not fully work. I am still facing the same issue with 5 VM out of 15.
 
Hi,

Do you if that issue has been fixed? We hosts 2 instances of Proxmox (running 19 VMs in total) with biweekly VM backups, and some VM's are randomly not backed up because of the same issue "start failed: org.freedesktop.systemd1.UnitExists: Unit 109.scope already exists."

Configuration :
- Proxmox = Version 5.1-42
- All the VM's use the "VirtIO SCSI" hard disk (see screenshot)
upload_2018-1-23_8-32-54.png


That issue is really annoying as it prevents us from trusting the Proxmox full backup process.

Any idea to fix that or a workaround?

Thanks
 
I am running this:

Code:
INFO: starting new backup job: vzdump --storage ovh-nfs-node03 --mailnotification failure --mode snapshot --compress lzo --all 1 --mailto eng@uhlhost.net --exclude 17800202,112233,8888,7777,7116,3333,1177,1111,777,101 --quiet 1

INFO: starting new backup job: vzdump --mode snapshot --quiet 1 --all 1 --exclude 17800202,112233,8888,7777,7116,3333,1177,1111,777,101 --storage ovh-nfs-node03 --compress lzo --mailnotification failure --mailto eng@uhlhost.net
And received the same error while trying to start a machine:

Code:
TASK ERROR: start failed: org.freedesktop.systemd1.UnitExists: Unit 2222.scope already exists.
 
qemu-server just got a fix applied that should hopefully get rid of this issue. please check once 5.0-24 hits the repos!
 

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!