0

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. enter image description here

What is the correct command for this?

0

1 Answer 1

0

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)

disk2VHD is limited in this way in that, the command line arguments, require the selected volumes have a disk letter assigned. This is especially true with regards to the System Reserved partition. The only required volume is the System Reserved partition. The other disk without a disk letter in your screenshot is the WinRE partition.

You will have to copy all the disks, mount the VHD, and delete the partition yourself. An alternative is to merge those 2 partitions together, create the backup, and then shrink the partition significantly.

You should be able to script both of those options. The “prepare for use in Virtual PC” shouldn’t be used since Virtual PC hasn’t been supported or functional in a decade. Virtual PC cannot even run on Windows 10+

There are numerous third-party tools that allow you to schedule a backup of the exact partitions you want and the majority of them have the tools to convert that backup into a Hyper-V or VMWare VM.

2
  • 1
    I will be unable to provide any scripts or even specific suggestions on how to script what your trying to achieve with disk2VHD as I ruled it out myself as a potential solution for my own backup needs
    – Ramhound
    Commented Jun 17 at 23:16
  • I don’t use open source tools.
    – Ramhound
    Commented Jun 18 at 11:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .