none
Vhd2disk RRS feed

  • Question

  • Hello,

    this little post to release a tool I played to implement time ago...

    What Vhd2disk does?
    It's a very basic V2P free tool to simply dump a VHD contents/structure to a physical drive.
    It designed to work only with "dynamic" VHD like Disk2vhd's ouput. Vhd2disk was tested succefully on win7 and win2K8: Disk2vhd -> vhd used for virtualisation -> Vhd2disk.

    Be caution using this tool since it will overwrite the data on the target drive.
    If you play with it, I can't be responsive about any data lost.

    Here a little screenshot:


    here the x64 binary:
    [edit: binaries (32 & 64 bits) are in my second post.]

    ps:
    I played to reproduce the Disk2vhd's GUI interface and I hope authours will not be angry about that. It's just a wink and should not produce problem since I will not distribute that little tool outside the sysinternals forum. If it's a problem, don't hesitate to remove my attachement and to accept my apologies.



    All the best,

    Orkblutt
    Friday, December 30, 2011 4:37 PM

All replies

  • Nice!
    Friday, December 30, 2011 4:48 PM
  • I forgot to post the 32 bits version. I also fixed a little bug. It's now v 0.2.
    I don't think it will grow more...

    32 bits:
    uploads/865/Vhd2disk_32bits.zip

    64 bits:
    uploads/865/Vhd2disk_64bits.rar

    Regards,

    Orkblutt


    Tuesday, January 3, 2012 1:50 AM
  • I have given Vhd2Disk a go and have been unsuccessful at writing an image back to a physical disk.  The test system is under Windows 7 32.  I created the VHD from the running box to a USB connected hard drive, then took the system down, attached a second hard drive and restarted windows.  After going into Computer Management > Disk Management and taking the drive offline, I started Vhd2Disk, but it could not write the physical disk, indicating it is probably mounted and must be taken offline.

    I have done the usual reboot and recheck of all but no luck on two systems.

    Friday, January 6, 2012 3:36 AM
  • Hello,

    you should try to delete existing partitions on your destination hard drive before to try to write on it.

    all the best,

    orkblutt
    Friday, January 6, 2012 4:24 AM
  • Hello:
     
    I used Disk2Vhd to copy a physical drive. I would now like to use Vhd2Disk to write that copy onto a new physical drive. Does the new drive need to be the same size as the old drive?
     
    Thanks,
    Richard.
     
    Monday, June 11, 2012 2:38 PM
  • Hey,

    it will use the same MBR offsets for the partitions so you need at least same size or bigger. If it's bigger I think you could use tools to extend partition...

    regards,

    orkblutt
    Monday, June 11, 2012 2:42 PM
  • I made a backup image of my SSD (GPT / UEFI Windows 7 install) using disk2vhd, I have mounted the VHD on another computer and can see all the right partitions using Paragon Partition Manager, but am unable to write this VHD back to the SSD, have even deleted all partitions on the SSD and made sure it's offline. is VHD2Disk GPT aware? it doesn't appear to show all partitions/volumes...
    Wednesday, August 1, 2012 4:26 PM
  • Hello,
     
    I made a ful backup of MS-VPC Windows enviroment and restored this backup on a empty clean formated with NTFS File System 20 MB IBM HDD.
    The Recycle, System Volume Informations and other directories created automaticly by Windows XP have been automaticly deleted and particions replaced by the partitions from MS-VPC VH Disk.
     
    Here is a screenshot:
    Thursday, August 30, 2012 8:10 PM
  • I've just installed on a Windows XP system. It worked yesterday on another XP system, but it's not working on this one. I get a message saying it can't run the application because it's not configured correctly.
    Tuesday, April 16, 2013 10:27 AM
  • Ok. I ran Windows Update again, but chose Custom instead of Express and installed everything. Now it works on XP.
    Tuesday, April 16, 2013 11:41 AM
  • Hi,

    Sorry to dredge up an old thread.

    I used disk2vhd to create vhd files, not realising that Windows Backup cannot restore from them.
    I copied the vhds and was able to boot a VM from them.
    The disk from which the vhds was created has now been wiped and everything (all partitions, hidden stuff, everything) has been taken off the disk.

    When I try to do Vhd2disk, as it comes to the end of "dumping blocks" it runs out of room...

    This isn't just the same sized disk as the one the files came from - it's the physical same disk! I have tried not selecting all volumes in the list of volumes but as far as I can tell this doesn't do anything. Can you help?

    (to do this I'm booting on to the windows 64bit setup disk, with vhd2disk copied to another drive, along with the vhds themselves)

    Thanks
    Monday, May 6, 2013 5:27 PM
  • I want to copy a vhd to a logical drive how do i do it
    Saturday, August 31, 2013 5:35 AM
  • Hi,
     
    is there a Version available for convert vhdx2disk?
     
    Thorsten
    Saturday, January 18, 2014 1:54 AM
  • No, there isn't (as of yet), but I managed to convert a vhdx to vhd with Virtualbox:
    Download and install Virtualbox: https://www.virtualbox.org
    Open a command line in your Virtualbox directory (shift, right-click on the directory), syntax is
    vboxmanage clonehd --format vhd path-to-vhdx path-to-vhd
    Example
    vboxmanage clonehd --format vhd c:\image.vhdx c:\image.vhd

    In the future just deactivate "Use vhdx" in Disk2VHD to avoid having to convert the image.

    Worked almost like a charm for me, there was just one glitch: vhd2disk reported an error while dumping, saying the disk was mounted and I should try setting it offline (and yes, I deleted all partitions on the destination drive prior to dumping). I put the drive into the destination machine anyways, and it turned out that the dump had been successful.

    Friday, March 14, 2014 2:22 PM
  • The following operations are performed on knoppix (live linux) from terminal.

      su 
      modprobe nbd
      qemu-nbd -r -c /dev/nbd0 -f vpc <vhd_file_name>
    

    if VHDX fromat

      qemu-nbd -c /dev/nbd0 -f VHDX <vhdx_file_name>
      ddrescue -v -f /dev/nbd0 /dev/sda  >>>> image to /dev/sda writing
    

    only one partition writing

      qemu-nbd -P 2 -r -c /dev/nbd2 -f vpc <vhd_file_name> 
      ddrescue -v -f /dev/nbd2 /dev/sda2 >>>> part2 of image to /dev/sda2 writing
    

    partition mount

      qemu-nbd -P 2 -r -c /dev/nbd2 -f vpc <vhd_file_name> >>> -P 2 part2 of image 
      mount /dev/nbd2 /mnt 
    

    unmount and disconnect image file

      unmount /mnt 
      qemu-nbd -d /dev/nbd2
    
    Friday, May 22, 2015 6:13 AM
  • Virtual Disk Recovery Tool is an advanced utility that has the potential of repairing corrupt, damaged, or inaccessible VHD files with utmost ease and accuracy. It is created for Windows 8, Windows 7, Windows Server 2008/R2 and 2012/R2 and Hyper-V Server and hence it is capable of repairing both FAT and NTFS file system of Virtual Hard Disk. VHD Data Recovery software is also capable of efficiently handling all issues related to accessibility of Windows Hyper-V VHD files.

    Read more :-   http://www.vhd.recoverydeletedfiles.com/

    Tuesday, August 18, 2015 9:53 PM
  • Hi,

    some people asked me for the source code to improve the tool.

    Here it is:
    https://github.com/wooxo/Vhd2Disk

    Cheers,

    Orkblutt
    Thursday, September 10, 2015 1:21 AM
  • Hello,

    Does this work also for windows 2000 server? :)
    Thursday, September 10, 2015 10:50 PM
  • Trying to get a VHD created with disk2vhd to an SSD physical disk.  64 bit download doesn't work, trying the 32 bit version:

    Sees the created VHD.
    Sees the physical drive 3 (the new SSD)
    Tells me the drive is mounted - turn offline.  Done that and even restarted the VHD2disk program - still sees it as mounted.
    Friday, March 18, 2016 11:51 AM
  • Bump.

    Anything for converting vhdx to physical disks yet?

    I have a number of vhdx images and it's impractical to convert them to vhd. Being able to go straight from vhdx to physical disk would be a huge time saver, something my company might even be interested in buying from a reliable programmer.
    Tuesday, July 19, 2016 10:54 AM
  • Bump.

    Anything for converting vhdx to physical disks yet?

    I have a number of vhdx images and it's impractical to convert them to vhd. Being able to go straight from vhdx to physical disk would be a huge time saver, something my company might even be interested in buying from a reliable programmer.
    Hello, yesterday I just used : https://www.starwindsoftware.com/converter to convert my VHDX to VHD
    Wednesday, July 27, 2016 7:31 AM
  • Hello, how can I use vhd2disk from a bootable USB stick? 

    I would like to re-image my main Windows drive using a VHD file I have on an external USB drive. I tried to copy your file to a Hiren's USB but the program doesn't run from it :( 
    Wednesday, July 27, 2016 7:35 AM
  • I wrote:
    I have a number of vhdx images and it's impractical to convert them to vhd.

    matrixebiz replied:
    Hello, yesterday I just used [some program] to convert my VHDX to VHD.


    Let me clarify:
    I have a number of vhdx images and it's impractical to convert them to vhd.
    That means I don't want to convert them to vhd.

    I want to convert a vhdx to a physical disk.
    Wednesday, July 27, 2016 11:10 AM
  • I wrote:
    I have a number of vhdx images and it's impractical to convert them to vhd.

    matrixebiz replied:
    Hello, yesterday I just used [some program] to convert my VHDX to VHD.


    Let me clarify:
    I have a number of vhdx images and it's impractical to convert them to vhd.
    That means I don't want to convert them to vhd.

    I want to convert a vhdx to a physical disk.
    Woops, I didn't read your question fully.
    Wednesday, July 27, 2016 11:45 AM
  • Can anyone help Disk2vhd to run from the command line to copy all units minus the D :?
    If I put Disk2vhd * c:\vhd\copia.vhd copy all units and just want to copy c: and the system partition (which has no name unit)
    How you can add the unit system partition on the command line?

    Thank you very much

    Friday, September 23, 2016 10:17 AM
  • If the vhd file using by Hyper-v
    Can I convert it to physical disk?
    Thursday, October 27, 2016 2:31 AM
  • I'm having a problem writing a VHD to my USB stick. It keeps saying I need to take the drive offline before it can write to it. And it provides me no method to do so in the program. Nor does it have any documentation that comes with it that tells me how to take the drive offline. Nor can I find info online on how to take it offline. All I can find are some things saying that in Windows you CAN'T take a drive offline (at least not using the Diskpart tool that comes with Windows). This leaves me to assume I'm supposed to use the tool in Linux (which maybe allows you to take a drive offline), but of course the actual program VHD2DISK is a Windows program, so using Linux as the OS for running the software is impossible.

    And yes, I've spent HOURS using Google searching for how to take a drive offline in Windows. And I can't find ANY information on how to do it, leaving me to assume that it's impossible to do in Windows.

    If it is actually possible, PLEASE post step-by-step directions on how to take a drive offline in Windows.
    Friday, December 30, 2016 10:45 PM
  • I have succeed to restore vhd to usb stick on win 7 by follow step:
    1. Use win7 control panel/disk manage to check your usb stick number.
    2. Use usbit tool to reset usb stick, you can download from http://www.alexpage.de/usb-image-tool/download/
    3. Run disk2vhd.exe, my ver is 0.2 32bit.
    4. If you get a message: "Can't write on physical drive. .....", when disk2vhd run a while, it's because windows detect a new usb disk, created by disk2vhd. I have try mountvol /E, but not working.  you must let diskvhd not to detect new disk by following step 5.
    5. Use binary tool to find and change disk2vhd.exe 32bit ver 0.2:
        find:           8b f8 85 ff 74 1b 8b 4c 24 3c 83 44 24 20 04   
        change to: 8b f8 85 ff 90 90 8b 4c 24 3c 83 44 24 20 04
        then rerun step 2 to 4

    good lock!
    Friday, December 15, 2017 12:34 AM
  • To all those who find this from google, and get the:

    Can't write on physical drive. It's probably mounted.
    You need to put it off line before to be able to write on it.
    Microsoft choose this way for security reason...
    It's nice for us and avoid to overwrite a non wanted drive.

    Message. I think I have figured out how to get this working. First my setup.
    Used Disk2VHD to (accidentally create a vhdx) backup a drive.
    Used Powershell to convert the VHDX to a VHD, thanks to this post.
    From an elevated PS prompts:
    Convert-VHD –Path c:\test\MY-VM.vhdx –DestinationPath c:\test\MY-NEW-VM.vhd

    Next I hooked up my physical 500GB SSD to my physical disk 1 slot (this replaced my CDROM for this test)

    In Windows (10 for me) use Disk Management to clear it off. 
    Remove all volumes. 
    Create 1 new volume 
    full size, 
    no drive letter, 
    don't format.

    Right click on the disk and set it to offline.
    Open an elevated CMD prompt. Type: diskpart
    Hit enter, this will put you into another kind of prompt that should look like:

    Microsoft DiskPart version ##.#.#####

    Copyright (C) Microsoft Corporation
    On computer: #ComputerName#

    DISKPART> _

    Now enter: list disk
    You should see the target disk listed as offline
    Now enter: select disk #NumberForDiskToWriteTo#
    eg: select disk 1

    Now enter: attributes disk clear readonly
    It should report: Disk attributes cleared succesfully

    Now try to run the VHD2Disk utility selecting your VHD file and the offline physical disk (disk 1 for me)
    Click start ("Vhd to disk"), acknowledge the warning and you should be good to go now.

    There may be a better way to check/set the readonly property on the drives that I wasn't able to find. It seems odd that the drive came in as readonly even through I had thoroughly wiped it, over and over and over again,....repeatedly wiped it. I would imagine these same steps should hold true back through windows XP as they all should have Disk Management and DiskPart but I can't guarantee it. If someone has a more user friendly way to handle that last part, as I couldn't find a way through Disk Management, it would be helpful if they posted it here for others in the future.
    Friday, February 2, 2018 7:55 AM
  • Disk2vhd crashes on Win10x64 Enterprise 1709, unfortunately.
    Thursday, February 8, 2018 7:15 AM