VirtualBox P2V with Disk2vhd, Possible Errors and How to Fix Them

After I have published a post about VirtualBox P2V, physical to virtual environment by VMware converter, this post shows you how to do a VirtualBox P2V with Microsoft utility disk2vhd. This method gave few errors and issues after the conversion but I managed solve it and boot the virtual machine successfully. Let’s see how to solve these possible errors and do VirtualBox P2V with Microsofts’s disk2vhd successfully. Unfortunately this method works on Windows Operating Systems only since disk2vhd is from Microsoft.

This utility converts the physical hard disk partitions to VHD (Microsoft Virtual Disk) format which can be used on Oracle VirtualBox. Migrating a working physical Windows computer to VirtualBox platform is very easy by this way. Once it has been converted to VHD format, it can be used with VirtualBox which runs on any OS like Linux or Mac OS X.

In this example, I converted my physical computer which is having two Operating Systems (Windows 7 and Windows XP), but Windows 7 to VirtualBox P2V.

Steps for VirtualBox P2V with disk2vhd and Fix Errors.

1) Download the latest version of disk2vhd (2.01 version)

2) Installation is not required, run the program directly.

3) It will pick up the physical hard disk partitions from host OS.

VirtualBox P2V with Disk2vhd

Important Note: My mistake

Before go to next step, let’s understand something clearly!

If you want to convert your entire physical disk (for example 500GB with 5 partition) to VHD, then select the all partitions and start the conversion. This will not cause any issues while attaching the VHD to VirtualBox or Virtual PC, except space issue because the converted VHD file will take the same size as 500GB.

But, if you want to P2V only specific Operating System and partitions from physical computer, then you must do it properly to avoid problems later.

In this example, I like to convert my working Windows 7 host to VirtualBox. So, I must convert the System and boot partitions which are mostly different.

Here is my working Windows 7 physical computer.

VirtualBox P2V with Disk2vhd

Initially I have converted only Windows 7 boot partition (normally C drive) to save space and time. I know this is not the system partition with boot recorder, but I had the confident to repair and boot virtual machine if it fails to boot later.

No matter how many partitions you select and convert, VirtualBox will detect the VHD as the size of full physical disk with correct partitions. When boot loader/recorder not found on any of the disks (Normally its on first partition – E drive for me) OS will not boot.

So, my first method returned the following error

A disk read error occurred
Press Ctrl+Alt+Del to restart

It’s because of system partition is missing. I tried several methods to write the MBR and do a repair with Windows 7 installation CD but all failed for me.

4) So before start the conversion , go and check in disk management.

VirtualBox P2V with Disk2vhd

Always you must convert the system and boot partitions by disk2vhd to able to run on Virtualbox or Virtual PC.

5) Now press Create button and start the process. Make sure each partitions are having enough space to create snapshots. It’s recommended to do nothing while running.

6) After successfully completed, create a new virtual machine with correct OS type and add the existing disk VHD. Boot the virtual machine now.

You are lucky if it boots without any issues.

Here I got stuck again, converted Windows 7 keep on restarting in VirtualBox. You know why? my physical hard disk connected via SATA port on the host computer, so I thought that it should be attached to SATA port on VirtualBox too, but that was wrong.

It started working after I removed the disk and attached to IDE of virtual machine.

Try the Following Steps to Solve disk2vhd Errors with VirtualBox

1) Make sure that you are converting system and boot partitions

2) Remove and attach the converted VHD disk to IDE ( if not, SATA)

3) Change the storage type in virtual machine settings and try

4) Enable or disable IO APIC and PAE/NX

5) Insert Windows installation medium and do a repair.

Changing disk to IDE from SATA did the trick and I managed to boot on VirtualBox. Here is the successful P2V with disk2vhd

VirtualBox P2V with Disk2vhd

Install the latest guest additions to get more features and performance boost. It took around one hour to convert 60 GB data (included required two partitions).

This will be an ideal way to move your working physical computer to VirtualBox on different host computer and give more portability options.

I hope this guide would be helpful, even though it had been demonstrated on Windows 7 host computer with older versions of VirtualBox and Disk2VHD, still it will work for Windows 8.1, Windows 10 and latest versions of Oracle VirtualBox.

21 thoughts on “VirtualBox P2V with Disk2vhd, Possible Errors and How to Fix Them”

  1. Hi ,
    One addition from my side , With P2V its always better to remove the AV before the conversion to avoid unexpected issues in the VHD. I have experienced this.many times. 🙂

  2. Thanks – this tip saved me and fixed my problem. I may try and create a new VDI file from virtualbox and clone the Windows partition to it and make it the primary just so I know. Who knows what may be introduced in the disk2vhd process.

  3. Successfully virtualized a Vista machine under Win7.
    Just had to switch the chipset from PIIX3 to ICH9.

    What’s AV in the above post?

    • AV- Anti Virus Software
      Its better to remove from Physical computer before conversion, just a suggestion.
      Thanks for your comment.

      • Silly me 😉
        That should be clear.
        I had the AV running in the background and it was working.
        Thanks

  4. I converted a WIN 7 64-bit physical machine to VM using disk2vhd. Then created VM using virtualbox and MS VPC, but in both cases I get a common message at boot up “Missing Operating System”.
    Any suggestions

  5. When I open Disk2VHD I have 2 options in the List 1. Recovery Disk and 2 C:\ OS. I checked only C: and continued.

  6. Very useful information!

    For me was this step the problem solver:
    1) Make sure to convert system and boot partitions

    Thanks for this great post 🙂

    • That was the issue for me as well. I had a 2GB system partition that I did not include in the VHD conversion. I am recreating the image with this partition and the boot partition and will report back with my results.

      Thanks for the post!

  7. Thanks, I had a Disk2VHD 2008 R2 server guest giving me a stop error 7b. Removing SATA and replacing with IDE worked for me.

    Thanks for the tip

  8. P2V Win7 from a notebook to VirtualBox 4.1 worked when I virtualized system & boot partition. Thanks!

  9. Having some problems booting.

    Created a VHD and mounted in onto a Vbox VM.

    Starting the machine brings a “Windows is loading files…” screen which runs through twice before the system reboots and repeats the process. Pressing F8 to select advanced booting options does the same thing. Running the system repair utility brings up the following info:

    File: \windows\system32\boot\winload.exe
    Status: 0xc000035a
    Info: Attempting to load a 64-bit application, however this CPU is not compatible with 64-bit mode.

    Any help would be much appreciated.

  10. HI Dan,
    it seems that your have tried converting a 64BIt OS image & host on Virtual Which has a 32Bit Processor in its host . Correct?

    64 Bit Virtual can only host on 64Bit Host. I believe that’s the issue you are facing. Also make sure to enable VT option in BIOS ( in Host)

  11. I cloned a phisical machine Windows 7 64 bit with vmware converter ; I wanted to start it up with Virtualbox becuase with vmware player cpu was 100% in a linux host. I had to create a new controller (scsi controller instead of sata), attach the vmx file to this new controller and it worked without any other tip!!!!

  12. “In fact I virtualized my home PC and, running and taking screen prints on office PC. VHD is connected via external hard disk. This is another cool way to carry your computer always in a pocket,isn’t it?”

    That’s exactly what I have in mind. I was downloading VMw converter when found this article (obviously I was killing time to easy the download waiting). Could you explain a bit more? I know we can figure it out after a few try/error but I’m going on vacations and want have this done on time. My concern is the ability to have a VM in two hosts and have both synchronized, kinda like the old-school windows brief-case thing, remember?

    Thanks for your experience.

    Laura

Comments are closed.