Run .VHD on Hyper-V?

Is there a way to run the backup .VHD image files for machines in Hyper-V? I have been unsuccessful after trying the follwoing.

  • I have tried using “assemble_disk_image.bat” to combine the SYSVOL and C VHD files together and tried booting, keeps saying please insert Windows Repair disk to fix but it will not repair after doing that.

  • I have tried running BOOTICE on both the SYSVOL and C VHD images and repairing the mbr separately and trying to run each one separately in Hyper-V but it states missing operating system for both VHD files.

  • I have tried combining the 2 VHD file (SYSVOL and C) and then running BOOTICE to repair the mbr. This gives me the missing operating system error as well.

Any other suggestions would be great. Thanks!

If you took a backup of the machine that runs the Hyper-V, pull the .VHD from the backup files of it.

You’d have to either re-write it over the previous disk, and possibly even re-map it in your Hyper-V console; don’t know if this does work or not in this scenario, but I’ve been able to pull practically any file from the backups and they work just fine.

There is probably a better idea out there, but… have to start somewhere, I suppose.

I think you misunderstood. The VHD file i am trying to run in Hyper-V is a backup of a physical machine on my network created by Urbackup.

What i am trying to do is I have a user who is having a problem on their physical machine that is being backed up using UrBackup. I want to take their physical machine and work on it but i want to have the user still be able to work without downtime. My plan is to run the VHD backup of their computer that UrBackup created on Hyper-V and give the user a spare laptop to use that they can then remote desktop into the Hyper-V of their machine to continue to work while i actually work on their physical machine.

Yeah, no… I completely misunderstood. Haha.

I have tried using assemble_disk_image in the past, but it was only once and I did not get it to work.

There may be a freeware software out there that can convert a disk image into a .VHD file, but you never know if the program is legitimate or not, and whether or not it will be compatible with the formats UrBackup uses.

Not sure how to help you, but good luck to you non-the-less.

If you have a reproducible way to create images with which assemble_disk_image does not work, or can send them to me I would be able to fix that. It currently does not support GPT partitioning.

I’m not sure I’m understanding what you are asking for? I can create a bootable VHD of the users machine using the Disk2VHD program but UrBackup is already doing a great job of backing up the systems and creating the VHD files but the problem is they are not created to be able to be booted virtually. What is it that you would like me to send to you?

What OS are you running UrBackup on? I assume Windows Server, as you are asking about Hyper-V? If so, there is ‘assemble_disk_image.bat’ that will reassemble the disk images in order to make them bootable for you. Try running that, then booting the VHD.

I am running UrBackup Server on a Windows 7 Pro 64-bit machine. I have another server that has Windows Server 2012 with Hyper-V that we are currently testing because we are going to be moving to that server in the future.

I have tried using the “assemble_disk_image.bat” to assemble the SYSVOL and C in that order together. I then take that single VHD file and try to create a Virtual Machine in Hyper-V and point it to use that VHD file. The VM will start but then goes into the Windows Repair Screen and asks to insert the Windows Repair Disk to try and repair the drive. I have tried then mounting the Windows Repair Disk in the VM and repairing the VHD but every time it states it cannot repair the drive.

Also when I use the “assemble_disk_image.bat” and I mount the combined VHD file in Disk Management i see the “System Reserved” as 100MB NTFS but the C Partition is showing as RAW and i do not see any files on that drive.

The output of the assembling perhaps helps in finding the issue.

Where is the output log for “assemble_disk_image.bat” stored?

I’d start it in cmd.exe and redirect the output with

assemble_disk_image.bat > log.txt

log.txt (1.2 KB)

Attached is the log file. I combined the SYSVOL and C, choosing SYSVOL first and then C when prompted.

I then mounted the newly combined VHD file using Disk Management and attached a screenshot of what the Volumes look like when mounted. The SYSVOL is showing as Letter “L” and the C Volume is showing as Letter “M”.
The SYSVOL is showing as formatted as NTFS but the C Volume shows as being RAW data which is not accessible so when i try to boot this VHD the SYSVOL volume is booting fine but nothing the C volume can be read as it is RAW data. How can i use the “assemble_disk_image.bat” to make both volumes NTFS and readable?

You did not select the C volume so it only puts the SYSVOL into the output VHD.

I did choose the C Volume, please see the screen shots below.

When the machine KWCLIFFORD was backed up it created 2 folders.

Those are the only 2 VHD files created from the backup of machine KWCLIFFORD.

Image_SYSVOL_161018-1701.vhd is the SYSVOL and Image_C_161018-1701.vhd is the C Volume.

When you look at the first line of the log.txt file i posted you can see both VHD files listed there.

Cannot see that. Are we looking at the same file?

When i ran “assemble_disk_image.bat” I am prompted with Windows Explorer to choose the first VHD, i navigate to “Image_SYSVOL_161018-1701.vhd” and choose that file. Then the Windows Explorer box pops back up again and i navigate to “Image_C_161018-1701.vhd” and choose that file. It then says assembling VHD file and then says “Press any key to continue” and i do and then the batch file exits. If i then go the “Image_C_161018-1701.vhd” file i can see the file was modified to the time i ran the “assemble_disk_image.bat” file.

If you look in at the time in the log and then look at the “Date Modified” of the “Image_C_161018-1701.vhd” file you can see the timestamp matches up with when i ran the “assemble_disk_image.bat” file so that would tell me it is outputing to the C VHD file.

I can see what your saying that it doesn’t show the Image_C_161018-1701.vhd as being selected but i am selecting both files when prompted by the batch file. Again look at the timestamp in my log.txt file and the timestamp on the file “Image_C_161018-1701.vhd” in the screenshot above, they match as the batch file is making a change to the “Image_C_161018-1701.vhd” file.

Also, if the 2 VHD files weren’t being combined why would i see both the SYSVOL and C volume listed in Disk Management when i mount the “Image_C_161018-1701.vhd” file?

Any updates on this? When i assemble both the SYSVOL and C VHD files and mount the VHD i see the SYSVOL partition just fine but the C partition shows as RAW data. Is there an issue with the “assemble_disk_image.bat” file while assembling the 2 images?

Any updates on this? I have tried using the Assembly batch file every different way but still cannot get the image to boot. Is there any way a feature can be included to create bootable VHD images from the Image backups created by UrBackup?