Skip to main content

Pre/post commands backing up VMs on Hyper-v

Thread needs solution
Posts: 2
Comments: 1

Hi Guys,

we have 3 x VMs running on a hyper v host. 2 Windows and 1 Debian.

When the VMs are powered off the backup works with no problem.

When the VMs are on the backup with complete with warnings related to VSS/snapshot creation.

Could you please tell me how I can successfully shut down my VMs, do a backup and then turn them back on using the Acronis pre/post commands?


0 Users found this helpful
Acronis Program Manager
Posts: 22
Comments: 3135



First of all it makes sense to investigate the issue with capturing the snapshot, e.g. why it produces a warning. It might be the case that production checkpoint (which relies on VSS) cannot be taken while VM is online and to avoid the warning there can be "Volume Shadow Copy (VSS) for Virtual Machines" option turned off in the backup plan settings. Also it makes sense to investigate these issues by contacting our support team.

As an alternative workaround you can power off/on the VM before/after taking the snapshot via "Pre/post data capture" command using PowerShell.

Parameters for pre-command:

Command: Powershell

Working directory: C:\

Arguments: Stop-VM -name [VMName]

Parameters for post-command to start VM after taking snapshot:

Command: Powershell

Working directory: C:\

Arguments: Start-VM -name [VMName]

Example of settings:

Thank you.