40

I made an image with disk2vhd and unfortunately I chose VHDX instead of VHD. I didn't see any information about what to choose.

Anyway, now that file is all I have, the original PC is trashed. So I need to know how to run it as a Virtual Machine in Windows 7.

VirtualBox doesn't have an option to open VHDX and WM Converter doesn't have an option to open VHDX (or to convert to VHD).

Doktoro Reichard
  • 5,390
  • 5
  • 35
  • 42
Bjorn
  • 501
  • 1
  • 4
  • 3

6 Answers6

51

You can do that conversion with VirtualBox :

VBoxManage.exe clonemedium "input_file.vhdx" "output_file.vhd" --format VHD

Default Path to VBoxManage.exe

C:\Program Files\Oracle\VirtualBox\
Chiramisu
  • 285
  • 3
  • 10
Poulpos
  • 511
  • 4
  • 2
  • 3
    It looks like this is [broken in VirtualBox 5.0](https://www.virtualbox.org/ticket/14288). The report is labeled as "critical", but hasn't been modified in 7 months, so not very optimistic. – Wasabi Fan Feb 03 '16 at 02:07
  • 2
    @WasabiFan - it works again in 5.1.4 (I just used it). – WiredPrairie Sep 10 '16 at 22:23
  • Also, one can encounter the `VHDX: Image has a non empty log which is not supported (VERR_NOT_SUPPORTED)` error message. – Bass Dec 25 '17 at 13:12
12

Before anything, make a backup of the original .VHDX, just in case.

You said you have Windows 7. In that case, you can easily convert VHDX to VHD with PowerShell.

Go to "Run..." (Windows + R) and type Powershell.

Then, in the PowerShell command line, type the command PS C:\> Convert-VHD –Path YOUR VHDX PATH –DestinationPath YOUR DESTINATION PATH

It should be converted then.

You can find additional information about the Convert-VHD command here.

matan129
  • 1,940
  • 2
  • 18
  • 24
6

To convert vhdx to vhd use the free StarWind V2V Image Converter

Jan Doggen
  • 4,108
  • 10
  • 36
  • 51
shujauddin
  • 77
  • 1
  • 1
5

I made the same mistake, when creating the Virtual disk from the physical with Disk2VHD, there is a check box at the top right (second down) that is ticked by default to create a vhdx, Remove this check and it will create a vhd instead.

Mokubai
  • 89,133
  • 25
  • 207
  • 233
James Taylor
  • 51
  • 1
  • 1
1

I managed to extract files from a Windows 10 VMDH "Windows Image Backup" and to write them to a Windows 7 machine: I installed Windows Server 2012 (free 180 days evaluation) in a virtual machine and connected it to my local hard disk via a network share. This way I could "mount" the VMDH backup and write the important files back to my local drive.

fraber
  • 189
  • 1
  • 4
0
  1. Open CMD as Admin, and type the following command to switch to VirtualBox folder:
cd "C:\Program Files\Oracle\VirtualBox"
  1. Then type this command to convert from VHDX to VHD:
VBoxManage convertfromraw "C:\Full-Path-To\image.VHDX" "C:\Full-Path-To\new-image.VHD" --format VHD

After that, I would prefer giving the result VHD image a new UUID by using this command:

VBoxManage internalcommands sethduuid "C:\Full-Path-To\new-image.VHD"

Extra step I usually do when converting/cloning images in VirtualBox as it tends to show many errors when it finds 2 images with the same UUID. Unlike Hyper-V doesn't care for that.

Note: These commands mentioned above are case sensitive! (convertfromraw - internalcommands - sethduuid)

FahadBA
  • 121
  • 3