Skip to main content
Version: 3.0

Virtual Machine backups

Applicable to Classic mode only

note

VM backup (KubeVirt) is not supported in Federated mode for this release.

Portworx Backup enables you to back up and restore KubeVirt Virtual Machines (VMs) running on Kubernetes clusters in an enterprise environment. This feature also allows you to back up and restore VMs migrated from VMware environments and VMs running on OpenShift Virtualization. Portworx Backup detects these VMs to provide end-to-end data protection for VMs, VM disks, resource configuration, and network configuration data.

KubeVirt is a Virtual Machine management add-on that provides a unified platform for VM workloads in the Kubernetes environment and allows VMs to run in parallel with containers on Kubernetes, OpenShift, and other environments. With KubeVirt, you can run VM workloads and Kubernetes-native workloads without requiring additional management tools or dedicated pipelines.

Prerequisites

Make sure that:

  • KubeVirt v1.0.0 or later and its dependent modules are installed on all managed Kubernetes clusters, source and destination clusters

  • qemu-guest-agent is installed on all the VMs to add KubeVirt specific pre-exec and post-exec rules

  • Stork version 24.1.0 and above is installed on all application clusters

The following table lists the backup and restore workflows and the scenarios supported by Portworx Backup as part of this feature:

Resource typesSupport
ClustersBackup and restore on OCP, EKS, GKE, and Kubernetes Vanilla clusters
Backup locationsBackup and restore of VMs on S3 compliant object store and NFS backup locations
Cloud accountsAll the cloud accounts that Portworx Backup currently supports
Pre-exec and post-exec rulesFreeze/thaw (unfreeze) rules for crash consistent backups
Backup typesManual and scheduled backups
Backups and restores
  • Data volumes with VolumeMode set to block and file system
  • Portworx Enterprise backed data volumes
  • Non-Portworx Enterprise backed data volumes that support CSI snapshots
  • Cross-region and cross-cloud backups and restores
  • note

    VolumeBlock mode is supported when using Portworx Enterprise 3.4.x or later.


    Backup and restore workflows supported by Portworx Backup for VM resources are outlined in the following table:

    VM resourcesSupport
    PVCs (CSI-based and non-CSI based)Yes
    Hotplug volumesYes
    (Supports hotplug volumes with persist enabled)
    Kubernetes secrets (used as startup scripts, networkDataSecretRef)Yes
    (Manual selection of these resources is required during backup creation)
    NetworkAttachmentDefinitionYes
    Network PolicyNo
    Service object
    Data volumes (DV)No
    (Supports backup and restores of PVCs associated with data volumes only)
    Data volume template (serves as a template to create data volume for a VM)No
    (Supports backup and restores of PVCs associated with data volume templates only)
  • VirtualMachineInstancetype
  • VirtualMachinePreference
  • Yes
  • VirtualMachineInstancePreset
  • Virtual Machine Templates
  • No
    note
    • Portworx Backup creates a backup of VM resources with automatic selection of all resources, with a few exceptions outlined in the table above. Dependent VirtualMachine resources that are not part of the VirtualMachine configuration are not automatically selected — for example, Network Policy, Service, and so on.

    To back up and restore your KubeVirt VMs (or namespaces that contain your VMs):

    1. Log in to the Portworx Backup web console.

    2. From the home page, add a cloud account.

    3. Configure a backup location.

    4. Add the required type of cluster.

    5. Create pre-exec and post-exec backup rules, or use the built-in (default) rules available in Portworx Backup. To create pre-exec and post-exec backup rules for file-system backups, see Backup Rules for file-system consistent backups.

    6. Create a VM backup.

    7. Restore a VM backup

    note
    • Portworx Backup creates backups of VMs regardless of their state. VMs restored from backup always return to a running state, even if the VM was stopped during the backup creation process.