ThisCalculator

Everyday

VMware Migration Backup & Restore Guide

Updated · Standard formula, shown below

VMware Migration Backup & Restore Guide

This guide walks you through backing up and restoring virtual machines (VMs) before, during, and after a VMware vSphere migration. You’ll learn how to create reliable snapshots and full backups, how to restore a VM if the migration fails, and how to avoid common pitfalls that lead to data loss or downtime.

What You’ll Need

  • Access to the vSphere Client (web or desktop) with permissions to create snapshots and manage VMs.
  • A backup solution that supports VMware (e.g., Veeam, Nakivo, or the built-in vSphere native snapshots).
  • Enough storage space on the target datastore for the backup files (typically equal to the VM’s used disk size).
  • A maintenance window during which the VM can be shut down or have minimal activity, especially for consistent backups.
  • Network access between the source host, target host, and backup repository.

Step-by-Step

  1. Assess the VM and migration path. Identify the VM’s current host, datastore, and network. Confirm the target host has compatible resources (CPU, memory) and that the datastore has sufficient free space.
  2. Choose your backup method. For a quick rollback point, use a VMware snapshot. For a full independent backup, use a backup tool or export the VM as an OVF/OVA. Snapshots are faster but tied to the original VM; full backups are safer but take longer.
  3. Create a snapshot (quick rollback point). In the vSphere Client, right-click the VM, select Snapshots > Take Snapshot. Name it with the migration date (e.g., “Pre-Migration-2025-01-15”). Ensure the VM is powered on or off as desired—if you need application-consistent backup, use VMware Tools quiescing (check the “Quiesce guest file system” option).
  4. Create a full backup (optional but recommended). If using a third-party backup tool, configure a job to back up the VM to a separate repository. If not, export the VM: right-click the VM, select Export > Export OVF Template. Choose a location and complete the export. This creates a .ova or .ovf plus .vmdk files.
  5. Perform the migration. Right-click the VM and select Migrate. Choose the migration type (change compute, storage, or both). Follow the wizard to select the target host, datastore, and network. For vMotion, the VM can stay powered on; for cold migration, shut it down.
  6. Verify the VM after migration. Once migrated, power on the VM (if it was off) and verify that it boots, network connectivity works, and applications respond. Check the datastore and host placement in the vSphere Client.
  7. Remove the snapshot after successful verification. If you created a snapshot, right-click the VM, select Snapshots > Manage Snapshots, select the snapshot, and click Delete. This merges the snapshot data into the base disk. Do not keep snapshots for extended periods—they degrade performance and can fill the datastore.
  8. Keep the full backup for a few days. Even after removing the snapshot, retain the full backup (export or backup job) for at least a few days in case a delayed issue appears.

Common Mistakes

  • Not taking a snapshot before migration. Without a rollback point, a failed migration can leave the VM in an inconsistent state.
  • Leaving snapshots in place. Snapshots grow over time and can cause severe performance degradation and fill the datastore. Always delete them after verification.
  • Ignoring application consistency. A snapshot without quiescing may not capture the application state correctly, leading to corrupted databases or file systems.
  • Not checking target datastore space. Migrating to a datastore with insufficient space will fail mid-way, potentially leaving the VM in a suspended state.
  • Skipping post-migration verification. Assuming the VM works just because it powered on can miss network misconfigurations or missing drivers.
  • Backing up only the VM files, not the configuration. For complex VMs with multiple disks or custom settings, an OVF export may not capture all settings (e.g., resource reservations).

Tips

  • Use a dedicated backup tool for production VMs. Tools like Veeam or Nakivo offer application-aware backups and automated restore, which are more reliable than manual exports.
  • Schedule snapshots during low-activity periods. Even with quiescing, a snapshot can cause a brief pause in I/O.
  • Test your restore procedure in a lab. Before the real migration, practice restoring a test VM from your backup to ensure you know the steps.
  • Document your VM’s configuration. Note the VM’s hardware version, resource settings, and network details before migration—this helps if you need to recreate the VM from scratch.
  • Use Storage vMotion for storage-only migrations. This allows you to move the VM’s disks without moving the host, which is often safer than a combined migration.

Troubleshooting

  • Migration fails with “Insufficient resources”. Check the target host’s CPU/memory capacity. Reduce the VM’s reservations or choose a different host.
  • VM does not boot after migration. Verify the VM’s boot order and that the virtual disk is connected. Check the VM’s console for error messages. If the disk is missing, re-attach it from the datastore.
  • Network connectivity lost after migration. Ensure the VM’s network adapter is connected to the correct port group on the target host. Check VLAN and firewall settings.
  • Snapshot deletion fails. This can happen if the VM is powered on and has high I/O. Try deleting the snapshot during a maintenance window. If it still fails, contact VMware support.
  • Restore from backup fails. Verify the backup file is not corrupted. If using OVF export, ensure all files (.ovf, .vmdk, .mf) are in the same folder. Try re-importing.
  • VM shows “Invalid” state after failed migration. Do not delete the VM. Instead, try to re-register it from the datastore. Right-click the host, select Storage > Register VM, and browse to the .vmx file.

Frequently Asked Questions

What is the difference between a snapshot and a backup?

A snapshot is a point-in-time copy of the VM’s disk that is stored on the same datastore. It is quick to create but does not protect against datastore failure. A backup is an independent copy stored on a separate location (e.g., another datastore, NAS, or cloud), providing disaster recovery.

Can I restore a VM from a snapshot after migration?

Yes, but only if the snapshot still exists and the VM has not been deleted. If the migration fails, you can revert to the snapshot to return the VM to its pre-migration state. However, once you delete the snapshot, you cannot restore from it.

How long can I keep a snapshot?

It is best to keep snapshots for no more than 24-72 hours. Snapshots grow as the VM writes data, and they can fill the datastore and degrade performance. Always delete them after verification.

What is quiescing and why is it important?

Quiescing pauses the VM’s file system to ensure that all writes are flushed to disk, making the snapshot consistent. Without it, the snapshot may not capture the state of applications like databases, leading to corruption after restore.

Should I shut down the VM before migration?

It depends on the migration type. vMotion allows live migration with no downtime, but cold migration requires the VM to be powered off. For critical VMs, use vMotion to avoid downtime, but ensure you have a backup in case of failure.

Can I migrate a VM without a backup?

Technically yes, but it is not recommended. A failed migration can leave the VM in an inconsistent state, and without a backup, you may lose data. Always create at least a snapshot before migration.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.