Veeam snapshots in VMware

When a Veeam backup or replication job for a VMware VM starts, it creates a VM snapshot. This snapshot can stick around if vCenter is unreachable when Veeam attempts to remove the snapshot; Veeam may also not attempt to remove the snapshot at all in some failure states.

VM snapshots are costly to disk reads since every read must traverse through each snapshot to find the most up-to-date block. Creating new snapshots also takes longer with a build up of older snapshots. Therefore it is best to minimize VM snapshots in production.

One interesting problem occurs if vCenter has multiple of these snapshots. Eventually it will reach a point where creating a new snapshot takes 20 seconds or longer with only a handful of snapshots. This can take long enough that Veeam times out in its backup attempt, which causes the snapshot to not be removed, and the problem to exacerbate.

Make sure all Veeam jobs are stopped and find all Veeam temporary snapshots:

$s = Get-VM | Where {-not $_.Name.EndsWith('_replica')} |
  Get-Snapshot | Where {$_.Name -eq 'VEEAM BACKUP TEMPORARY SNAPSHOT'} |
  sort Created -Descending
$s | select VM, Name, Created

If the list looks OK (no snapshots within the last ~hour which is probably an active Veeam job) then remove the snapshots:

$s | Group-Object -Property VM |
  ForEach-Object {$_.Group | Select -First 1} |
  Remove-Snapshot -RemoveChildren

Removing a snapshot used by an active job will surely cause it to fail.

Left-click: follow link, Right-click: select node, Scroll: zoom
x