Testing system updates using libvirts checkpoint feature - https://abbbi.github.io/changes/
virtndbackup error - https://github.com/abbbi/virtnbdbackup/discussions/119
working with bitmaps qmp https://kashyapc.fedorapeople.org/QEMU-Docs/_build/html/docs/interop/bitmaps.html#id1
# bitmap
qemu-img bitmap --remove ./local_copy_1_154.hdd.qcow2 virtnbdbackup.1
#snapshot
qemu-img snapshot -l $DISK_IMAGE.qcow2 # List Snapshots
#Snapshots also appear in the output of the qemu-img info command.
qemu-img snapshot -c $SNAPSHOT_NAME $DISK_IMAGE #Create Snapshot
qemu-img snapshot -a $SNAPSHOT_NAME $DISK_IMAGE #Restore (Apply) Snapshot
qemu-img snapshot -d $SNAPSHOT_NAME $DISK_IMAGE #Delete Snapshot
Checkpoints increment backup
# Libvirt - checkpoints - dirtybitmap
article for incremental backup - https://abbbi.github.io/changes/
## Commands
virsh checkpoint-create
virsh qemu-monitor-command one-31 --pretty '{"execute": "query-block", "arguments": {}}'
qemu-img info --output json --force-share /var/lib/one/datastores/0/31/disk.0
## Manual
1.https://qemu-project.gitlab.io/qemu/interop/bitmaps.html#bitmap-status
1.https://qemu-project.gitlab.io/qemu/interop/dbus-vmstate.html
## Interesting manual with commands
1.https://github.com/OpenNebula/one/issues/6206 - in first message examples of commands
1.
<details>
<summary>Example of create chekpoints and use it</summary>
12:23:12.061 [CMD]: virsh --connect qemu:///system checkpoint-list --name 0f297c4b-001f-434d-9123-739342da23fb
12:23:12.079 [CMD]: DONE
12:23:12.080 [CMD]: virsh --connect qemu:///system domfsfreeze 0f297c4b-001f-434d-9123-739342da23fb
12:23:12.149 [CMD]: DONE
12:23:12.152 [CMD]: qemu-img create -f qcow2 /var/lib/one//datastores/0/36/tmp/scracth.0.qcow2 256M
12:23:12.211 [CMD]: DONE
12:23:12.211 [CMD]: virsh --connect qemu:///system backup-begin --reuse-external --backupxml /var/lib/one//datastores/0/36/tmp/backup.xml --checkpointxml /var/lib/one//datastores/0/36/tmp/checkpoint.xml 0f297c4b-001f-434d-9123-739342da23fb
12:23:12.641 [CMD]: DONE
12:23:12.641 [CMD]: virsh --connect qemu:///system domfsthaw 0f297c4b-001f-434d-9123-739342da23fb
12:23:12.716 [CMD]: DONE
12:23:12.719 [CMD]: nbdinfo --json --map=qemu:dirty-bitmap:backup-vda nbd+unix:///vda?socket=/var/lib/one//datastores/0/36/backup.socket
12:23:12.726 [CMD]: DONE
12:23:12.726 [CMD]: qemu-img create -f qcow2 -F raw -b nbd+unix:///vda?socket=/var/lib/one//datastores/0/36/backup.socket /var/lib/one//datastores/0/36/backup/disk.0.2
12:23:12.794 [CMD]: DONE
12:23:12.794 [CMD]: qemu-io
12:23:13.034 [CMD]: DONE
12:23:13.034 [BCK]: Incremental backup done in 0.955029454s
12:23:13.034 [CMD]: virsh --connect qemu:///system domjobabort 0f297c4b-001f-434d-9123-739342da23fb
12:23:13.054 [CMD]: DONE
12:23:13.055 [CMD]: virsh --connect qemu:///system checkpoint-list --name 0f297c4b-001f-434d-9123-739342da23fb
12:23:13.072 [CMD]: DONE
12:23:13.072 [CMD]: qemu-img info --output json --force-share /var/lib/datastores/local_mount/0/36/disk.0.snap/0
12:23:13.077 [CMD]: DONE
12:23:13.078 [CMD]: virsh --connect qemu:///system checkpoint-delete 0f297c4b-001f-434d-9123-739342da23fb one-36-0
12:23:13.399 [CMD]: DONE
</details>
````
Whole libvirt hierarchy of path
# https://www.reddit.com/r/linuxquestions/comments/16kx0oi/how_do_i_change_libvirtqemuvirtmanager_s_xml/
# path of libvirt
/etc/libvirt/ Holds QEMU/Libvirt configurations files are.
/etc/libvirt/hooks/ Holds your own scripts that would starts when a specific VM does.
/etc/libvirt/nwfilter/ Looks like Libvirt has its own networking/firewall rules.
/etc/libvirt/qemu/ Holds VMs' XMLs are stored.
/etc/libvirt/qemu/networks/ Holds QEMU/Libvirt virtual networks' XMLs are.
/etc/libvirt/qemu/networks/autostart/ A QEMU/Libvirt virtual network XML symlinked there will make said virtual network starts when QEMU/Libvirt does.
/etc/libvirt/secrets/ ???
/etc/libvirt/storage/ Holds QEMU/Libvirt datastores/pool configurations files are.
/etc/libvirt/storage/autostart/ A QEMU/Libvirt datastore/pool configuration file symlinked there will make said datastore/pool starts when QEMU/Libvirt does.
/var/lib/libvirt/boot/ ???
/var/lib/libvirt/dnsmasq/ Holds further QEMU/Libvirt virtual networks' configuration files.
/var/lib/libvirt/images/ Default QEMU/Libvirt virtual disks' datastore/pool.
/var/lib/libvirt/qemu/ ???
/var/lib/libvirt/qemu/channel/ ???
/var/lib/libvirt/qemu/target/ ???
/var/lib/libvirt/qemu/checkpoint/ ???
/var/lib/libvirt/qemu/dump/ ???
/var/lib/libvirt/qemu/nvram/ Holds VMs' UEFI settings. Same goes for TPM and Secure Boot databases?
/var/lib/libvirt/qemu/ram/ ???
/var/lib/libvirt/qemu/ram/libvirt/ ???
/var/lib/libvirt/qemu/libvirt/qemu/ ???
/var/lib/libvirt/qemu/save/ Looks like it holds VMs' saved states.
/var/lib/libvirt/qemu/snapshot/ Looks like it's where VMs' snapshot are saved.
/var/lib/libvirt/sanlock/ ???