After getting on linux I realized virtualbox doesn't support vhdx. I had to boot a windows 10 VM, move the files over, install hyper-v and all associated components, just to convert the damn file and move it back.
Earlier we published a guide about VirtualBox P2V in Windows 10/11 by VMware converter. In this guide, we will learn more about how to do a VirtualBox P2V with a Microsoft utility called disk2vhd. disk2vhd is an excellent virtual hard disk tool to clone the physical disk partitions of a computer (Physical or virtual). It can output the virtual hard disk in VHD format. This VHD file can be converted to other several virtual disk formats or attached to virtualization software like Hyper-V and VirtualBox.
Migrating a working physical Windows computer to the VirtualBox platform is very easy in this way. Once it has been converted to VHD format, we can use it with VirtualBox which can run on any OS like Linux or macOS. Since VirtualBox supports VHD file format natively, we do not need to convert the VHD to VDI in this case.In this example, I converted my physical computer that is having two Operating Systems (Windows 7 and Windows XP). I will be converting and moving only Windows 7 to VirtualBox by P2V here.
Initially, I converted only Windows 7 boot partition (normally the C drive) to save space and time. I know this is not the system partition with the boot recorder, but I thought I can repair it and make it work if it fails to boot later.No matter how many partitions you select and convert, VirtualBox will detect the VHD as the size of a full physical disk with all partitions. When the boot loader/recorder is not found on any of the partitions, OS will not boot.
4) So before starting the conversion, go to disk management and check the partition structure.Always you must convert the system and boot partitions by disk2vhd to be able to use with Virtualbox or any other platform.
Once you power on the VM, it should boot and work fine if the partition structure is converted properly.Here is another problem I encountered. The converted Windows 7 machine kept on restarting in VirtualBox. Do you know why? My physical hard disk is connected via the SATA port on the host computer. So I attached the VHD file to the SATA port on VirtualBox too, but that was wrong.It started working after I removed the disk and re-attached it to the IDE port of the virtual machine.
Update: This demonstration was done many years ago with the older VirtualBox and Windows OS versions. By the time you read this guide, VirtualBox and Windows OS would have improved the features and auto fix the errors we faced so far.Try the Following Steps to Solve disk2vhd Errors with VirtualBoxIn summary, here are some of the solutions you can try if the virtual machine is not booting after doing P2V with disk2vhd.
After the migration, install the latest guest additions to get more features and performance boost.This will be an ideal way to move your working physical computer to VirtualBox or Hyper-V on a different host computer to get maximum portability.Even though we demonstrated these steps in older versions of products, still, it will work on Windows 10, Windows 11 and the latest versions of Oracle VirtualBox.
Sometimes you may need to keep an old computer for the programs and files it contains. In such a case you can either keep the old computer (if it has no hardware problems), or convert the physical computer into a virtual machine that you can open using VirtualBox.
In this tutorial you will learn how to turn a physical Windows XP machine into a VirtualBox machine. The same instructions can be used to convert any physical machine running Windows 7, 8 or 10 OS to VirtualBox.
The first step to convert a physical machine to a VirtualBox machine, is to convert the physical machine's hard disk to a Virtual Hard Disk image file (VHD or VHDX). To do that, the only you need is the disk2vhd utility from www.sysinternals.com.*
* Info: Disk2vhd is a utility that can create a Virtual Hard Disk image file (VHD or VHDX) from a physical disk for use in VirtualBox, Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs).
1. Download and extract the Disk2vhd.zip file on the computer that you want to convert to a VirtualBox machine, or on another computer where you have attached the disk of the physical machine that you want to convert to virtual.
* Notes:
1. VirtualBox supports VHD files but not VHDX.
2. If you are running Disk2vhd on the same machine that you want to convert to virtual, then save the virtual disk file to another drive and not in disk C:
We're looking for part-time or full-time technical writers to join our team! It's about a remote position that qualified tech writers from anywhere in the world can apply. Click here for more details.
I have a very old Dell Windows 2003 Server with a PERC RAID card set up for storage. We are trying to convert this old server into a virtual machine, then migrate to Windows Server 2016. I tried using the utility Disk2VHD to image the C drive into a .VHD file, then run the .VHD file using Oracle VirtualBox. Unfortunately, I keep getting 'a disk read error occurred' every time I try to boot the virtual machine. I have read your credentials and am very impressed with your knowledge, and was wondering if you could help us convert this server? Any help would be appreciated! "
Converting an old Windows Server 2003 to a virtual machine is not always an easy task for a few reasons. First, many Windows disk imaging / p2v (physical to virtual) programs I came across simply would not work on Windows Server 2003 or required insane licensing fees. Secondly, Fabian was using a PERC RAID card, which complicated the issue greatly because most virtual machine software runs off either IDE or SATA, with limited support for SCSI (or RAID).
After researching disk2vhd 'a disk read error occurred', it was suggested that the MBR (master boot record) was not copied during the disk2vhd conversion. I believe this was likely an issue with older releases of disk2vhd; I made sure everything was selected the second time around, but the conversion still did not work. I also booted from Windows Server 2003 media to fix the MBR (master boot record) but that did not work, either.
At this point, I took the .VHD file and placed it onto a Windows 10 machine and attempted to mount the .VHD using Disk Management, which then reported that the drive was in RAW format (as opposed to NTFS). RAW format basically means the MFT (master file table) or the entire drive is corrupted. This should not happen, obviously.
I decided on Macrium Reflect because it was the only option that allowed me to convert Fabian's server by remote without having to reboot the machine. To get the job done, I made a regular disk image backup (archive) of the server's C drive into .mrimg files, then used 'Other Tasks -> Convert image to VHD' option inside of Macrium Reflect. IMPORTANT: when I selected the 000.mrimg file to convert to .VHD, the img2vhd reported it was "unable to convert." I chose the 001.mrimg file and it worked. I am not sure why - but if this happens, try the next file in the series.
After the .VHD was created, I used Oracle VirtualBox to boot the virtual machine. Windows Server 2003 started to boot as normal, but after about 10 seconds I was greeted with a blue screen of death (BSOD) boot error 0x0000007b.
After much research I discovered that this error was related to the Dell PERC RAID card. Basically, VirtualBox set the boot drive to use a SATA port, and Windows Server 2003 was expecting it on the PERC RAID configuration. When it was not found, Windows Server 2003 failed with boot error 0x0000007b.
If you are trying to convert a Windows 2003 Server - or any machine for that matter - to a virtual machine, I can help using my remote desktop support service. Simply contact me, briefly describing the issue and I will get back to you as soon as possible.
I need more computer questions. If you have a computer question -- or even a computer problem that needs fixing --please email me with your question so that I can write more articles like this one. I can't promise I'll respond to all the messages I receive (depending on the volume), but I'll do my best.
About the author: Dennis Faas is the owner and operator of Infopackets.com. With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the websitecontact form.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
after playing with virtual hard drive in windows 7 (first time) this is a recap on how you do it in case you are a newbie. I use two steps: disk2vhd.exe and then oracle VMI used disk2vhd(from system internals) to convert the physical PC to a virtual Hard Drive (VHD) when running disk2vhd.exe you can choose what drive you want to have, I did checked my c:\ and the system reserved (there is one more PQService drive which I did not select, but so far am working fine as of dec 12,2013) a note: if you don't select/check the system reserved drive the VHD won't work under virtual box).once the disk2vhd.exe finished I started my oracle VM virtual box and click new button, a wizard poped; enter the name(myPC), type(Microsoft windows), version(windows 7 64bit),Memory size (at least 4096mb) ,Hard Drive - select "use an existing virtual hard drive file" select the vhd image created by disk2vhd.exe, continue and finish the wizard... once the VM is created here is the tricky part, click the setting button and go to storage under storage tree add your VHD to the controller IDE and under attributes- Hard disk: IDE primary master (at this point was able to start my VM. it did run couple check disks but, started fine. Please feel free to add to this post if I missed something important....thanks.good luck!
64591212e2