The documentation on https://learn.microsoft.com/en-us/sysinternals/downloads/disk2vhd is minimal, and doesn't seem to cover the use case of how to specify multiple volumes for backup, assuming that there isn't any way to specify volumes or drives to exclude. I want to script a backup of my computer into an VHDX file for use as a VM in case something crashes irreparably and I cannot recover the windows installation. My computer has 2 drives, a typical C: with 3 volumes (C:, \?\volume{819..., \?\volume{d89..., one being the EFI, and the other being the recovery)
The command
.\disk2vhd64.exe -h C: D:\VHDs\mycomputer_test.VHDX
invokes this, which doesn't include those boot volumes nor does is check the box for "Prepare for using in Virtual PC", despite the -h
parameter.
What is the correct command for this?