Application consistent virtual machines backup
You must annotate the virt-launcher pod with the NetBackup pre and post hooks if it is responsible for spawning virtual machines (VMs), as VMs cannot be created without it.
Commands to freeze and unfreeze the virtual machines:
/usr/bin/virt-freezer --freeze --name <vm-name> --namespace <namespace>
/usr/bin/virt-freezer --unfreeze --name <vm-name> --namespace <namespace>
# kubectl annotate pod -l vm.kubevirt.io/name=<vm-name> -n <vm-namespace> netbackup-pre.hook.backup.velero.io/command='["/usr/bin/virt-freezer", "--freeze", "--name", "<vm-name>", "--namespace", "<vm-namespace>"]'
netbackup-pre.hook.backup.velero.io/container=compute
netbackup-post.hook.backup.velero.io/command='
["/usr/bin/virt-freezer", "--unfreeze", "--name",
"<vm-name>", "--namespace", "<vm-namespace>"]'
netbackup-post.hook.backup.velero.io/container=compute
Note:
In order to achieve app consistency, it is necessary to install qemu-guest-agent on virtual machines to implement kubevirt-specific pre-exec and post-exec rules.
For more details, about configuration of NetBackup pre and post hook, see https://www.veritas.com/
Backup with acceleration and incremental backups cannot be performed on PVCs that are exclusively used as virtual machine disks.