Description of problem: The incremental backup feature is currently marked as experimental as it doesn't intergrate well with few other features. After all required bits are present we should enable to use it without requirements for any XML-based hacks.
*** Bug 1803602 has been marked as a duplicate of this bug. ***
Hi Peter, The xml to enable the whole function should be as follow, correct? <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> … <qemu:capabilities> <qemu:add capability='incremental-backup'/> </qemu:capabilities> … Any other configurations? thx
Yes, that override allows you to use the checkpoint and backup APIs with following caveats: - checkpoints resinding in backing files can't be deleted - block copy/block stream messes up the bitmaps - manual overlay/snapshot creation prohibits backups - live migration doesn't migrate bitmaps (possible others, see bugs this BZ depends on) Please don't hesitate to file bugs for problems in the existing code I'll review whether it makes sense.
Peter, is this expected in 8.3? The bug have many dependencies. Should we plan to have this in 8.3 or this will be too risky?
If you look closely, all the dependencies are already fixed. In fact I need to add two more probably to accurately reflect what's required. This bug was designed to be a tracker, but will also be used to include the code to enable incremental backups.
Adding dependencies since we need to ensure that backups work after non-shared-storage migration (this can't be fixed later) and blockdev-reopen is made stable in qemu.
Upstream enables the incremental backup feature once 'blockdev-reopen' becomes stable by: commit 013e7564ff568a4b16240f8598fba90130dbe932 Author: Peter Krempa <pkrempa> Date: Wed Oct 16 13:57:49 2019 +0200 qemu: capabilities: Enable QEMU_CAPS_INCREMENTAL_BACKUP For incremental backup we need QEMU_CAPS_BLOCKDEV, QEMU_CAPS_BLOCKDEV_REOPEN, QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING. Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Jiri Denemark <jdenemar> For downstream this commit itself will be enough since we have a downstream capability enabling blockdev-reopen.
Hi Peter, With latest rhelav libvirt, the backup cannot start without any setting [root@dell-per740-18 ~]# rpm -qa | grep ^libvirt-7 libvirt-7.0.0-6.module+el8.4.0+10144+c3d3c217.x86_64 [root@dell-per740-18 ~]# virsh domstate vm1 running [root@dell-per740-18 ~]# virsh domblklist vm1 Target Source -------------------------------------------------------- vda /var/lib/libvirt/images/jeos-27-x86_64.qcow2 [root@dell-per740-18 ~]# virsh backup-begin vm1 error: Operation not supported: incremental backup is not supported yet And backup can start with comment 2 settings
(In reply to yisun from comment #15) > Hi Peter, > With latest rhelav libvirt, the backup cannot start without any setting > > [root@dell-per740-18 ~]# rpm -qa | grep ^libvirt-7 > libvirt-7.0.0-6.module+el8.4.0+10144+c3d3c217.x86_64 > > [root@dell-per740-18 ~]# virsh domstate vm1 > running > > [root@dell-per740-18 ~]# virsh domblklist vm1 > Target Source > -------------------------------------------------------- > vda /var/lib/libvirt/images/jeos-27-x86_64.qcow2 > > [root@dell-per740-18 ~]# virsh backup-begin vm1 > error: Operation not supported: incremental backup is not supported yet > > > And backup can start with comment 2 settings Did you use qemu which includes the patches from: https://bugzilla.redhat.com/show_bug.cgi?id=193075 ?
(In reply to Peter Krempa from comment #16) > (In reply to yisun from comment #15) > > Hi Peter, > > With latest rhelav libvirt, the backup cannot start without any setting > > > > [root@dell-per740-18 ~]# rpm -qa | grep ^libvirt-7 > > libvirt-7.0.0-6.module+el8.4.0+10144+c3d3c217.x86_64 > > > > [root@dell-per740-18 ~]# virsh domstate vm1 > > running > > > > [root@dell-per740-18 ~]# virsh domblklist vm1 > > Target Source > > -------------------------------------------------------- > > vda /var/lib/libvirt/images/jeos-27-x86_64.qcow2 > > > > [root@dell-per740-18 ~]# virsh backup-begin vm1 > > error: Operation not supported: incremental backup is not supported yet > > > > > > And backup can start with comment 2 settings > > Did you use qemu which includes the patches from: > > https://bugzilla.redhat.com/show_bug.cgi?id=193075 > > ? I guess you meant bz1930757?
Oops, yes. I messed up copy&paste. sorry for that
Verified with: libvirt-7.0.0-8.module+el8.4.0+10233+8b7fd9eb.x86_64 qemu-kvm-5.2.0-10.module+el8.4.0+10217+cbdd2152.x86_64 1. do a backup job WITHOUT any special configs in vm's xml (can refer to comment 2) (.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domstate avocado-vt-vm1 running (.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh backup-begin avocado-vt-vm1 Backup started (.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domjobinfo avocado-vt-vm1 Job type: Unbounded Operation: Backup Time elapsed: 3656 ms File processed: 2.217 GiB File remaining: 7.783 GiB File total: 10.000 GiB (.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# ll /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2* -rw-r--r--. 1 qemu qemu 863633408 Mar 8 04:35 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2 -rw-------. 1 qemu qemu 1050738688 Mar 8 04:35 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2.1615196130 (.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domjobinfo avocado-vt-vm1 Job type: None (.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domjobinfo avocado-vt-vm1 --completed Job type: Completed Operation: Backup Time elapsed: 24762 ms File processed: 10.000 GiB File remaining: 0.000 B File total: 10.000 GiB 2. check the hypervisor's capabilities(.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domcapabilities | grep backup -i <backup supported='yes'/>
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:2098