1

I'm having a problem creating a vhdx file using disk2vhd64 in command line. I don't know how to add \?\Volume{...} to vhdx file since drives can be specified like c: or so. I'm using this manual https://adamtheautomator.com/disk2vhd/ . Tried to search web for solution, but didn't find anything.

9
  • Why don’t you use the utility GUI?
    – Ramhound
    Commented Mar 1, 2023 at 12:29
  • Have you tried disk2vhd -c “\?\Volume{...}” "\\file-server\Backups\snapshot-$(Get-Date -f yyyy-MM-dd).vhd"? But if you want the virtual drive within the VM to be bootable you should include all relevant partitions on the disk.
    – Ramhound
    Commented Mar 1, 2023 at 12:48
  • I want to create a scheduled event so my server will backup onto another machine, in event of failure I can start a VM right away. Don't want to do backup by myself. Tried line you mentioned and it doesn't work. I can use * to copy all partitions, but I don't want to backup volume with archive data, just work volumes I need the most.
    – Michal
    Commented Mar 1, 2023 at 13:04
  • That particular volume is the system reserved partition and shouldn’t be necessary for what you’re doing. What error did you receive? What did you try exactly? I didn’t have the entire volume identifier so I couldn’t suggest the complete command
    – Ramhound
    Commented Mar 1, 2023 at 13:36
  • 1
    When I just copy C: and E: volumes Hyper-V can't boot VM. System reserved volume is necessary for it to run in Hyper-V. Volume displayed in GUI is \\?\Volume{1ac006ea-4520-11eb-93e7-806e6f6e6963} . Using "C:\Program Files\disk2vhd64.exe" disk2vhd c: e: "\\share\d\VM\myvmname-%date%.vhdx" line in bat file works just fine, just need this additional volume.
    – Michal
    Commented Mar 1, 2023 at 13:48

0

You must log in to answer this question.

Browse other questions tagged .