Why it supposed to back up the VM only in running state? #84
-
Hi, The README is quite complicated for me. Could anyone answer a few most prominent questions I have?
What does virtnbdbackup do under the hood when it is backing up VM in running state? Are we talking here only about disk backups and no RAM & CPU state preserving? What's the point to backup VM in running state that when we will restore it it may be in insonsistent state from the point of view of the operating system that is running within the VM? As I see it in it's documentation (https://github.com/qemu/qemu/blob/master/docs/interop/bitmaps.rst), the QEMU project suggests to power off the VM and then in one transaction start VM and immediately pause the VM and in that state start the VM backup of one or more disks of VM in transactional manner to guarantee disks data consistency at the moment of backup and the right "state" of the data on the disk from the guest OS point of view as it's the same state when the backup was being recorded and when it's being restored later on (the guest VM was in "just powered on and not yet even booted" state when we backed up and it will be in the same "just powered on and not yet even booted" state when we restored it). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
qemu has an NBD backend, which allows you to expose virtual disks via the NBD protocol. Qemu can also use For the specific purpose of the backup operation, the NBD server also knows about the created bitmaps, thus,
If you want to create forward incremental backups, which you can use for future backus, the qemu process needs to Both the libvirt API and the qcow image need to know about the bitmaps. On libvirt side, it is called a "checkpoint".
is the wording problematic here? If so it can be changed.
virtnbdbackup only saves disk data, qcow image and vm configuration, it does not care about memory state or cpu state. It is not an "snapshot" type backup. It allows you to restore the complete virtual machine from the backup, in case of disaster or disk failure.
if the virtual machine has an qemu agen installed, virtnbdbackup will tell the virtual machine to freeze the filesystems Its the same as if you want to create consistent snapshots while the virtual machine is running, ..
The transactions which are stated within the documentation are all handled by the libvirt API, the documentation which If you want to be 100% sure the VM is in consistent state, then poweroff your VM and create manual backups, |
Beta Was this translation helpful? Give feedback.
-
I have moved this over to a discussion, because its not an issue per-se. |
Beta Was this translation helpful? Give feedback.
qemu has an NBD backend, which allows you to expose virtual disks via the NBD protocol. Qemu can also use
disks attached via NBD, it is used in various ways to give other components access to the disk data.
For the specific purpose of the backup operation, the NBD server also knows about the created bitmaps, thus,
it allows other applications to access the bitmap information over NBD, what happens is:
which stores information about further changes to the disks. From this point on…