While we create a new VM with VMware Workstation, you can see the external drive we will add it to. To do so, open the VirtualBox GUI, select the desired VM, click Settings, click Storage, click Add Hard Disk button, select Choose existing drive, and then select the VMDK file you just created. You can now run the VM that will boot from the physical drive you defined when creating the VMDK file.
How To Perform Windows P2V using Disk2Vhd for VirtualBox
As with a previous article on creating a P2v for use by VirtualBox using VMware’s vCenter Converter for Windows, we will continue and describe how to complete the task using Microsoft’s Disk2Vhd (SysInternal Suite).
What is Disk2Vhd?
Disk2vhd is a utility that creates VHD (Virtual Hard Disk – Microsoft’s Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). The difference between Disk2vhd and other physical-to-virtual tools is that you can run Disk2vhd on a system that’s online. Disk2vhd uses Windows’ Volume Snapshot capability, introduced in Windows XP, to create consistent point-in-time snapshots of the volumes you want to include in a conversion. You can even have Disk2vhd create the VHDs on local volumes, even ones being converted (though performance is better when the VHD is on a disk different than ones being converted).
Download Disk2Vhd from http://technet.microsoft.com/en-us/sysinternals/ee656415
Create VHD
Run Disk2Vhd tool on a physical machine , you wish to convert to virtual . This tool list the all available drives on a system and the required disk space for storing virtual disk (VHD).
After selecting the required options , select Create
Now that the VHD file is created , we will copy the result VHD and copy it to the machine where VirtualBox is running.
Create new VM in VirtualBox ( Machine->New ). In the “Create New Virtual Machine” dialog, enter name and select OS. In this case my build system was in Windows 7 , I selected the same.
Select Next and provide memory for new VM.
Select Next. In this dialog un-check “Start-up Disk” option. This allows us to attach existing VHD to VM instance.
Select Next , Following warning message is show, click “Continue”
Select Next,
This will complete the creation of new Virtual machine. But still we have not configured it to use VHD file got from the P2V conversion. From the VirtualBox Manager select the newly created VM ( win7) from the pane and select “Settings” options , as shown below.
In “Settings” dialog select “Storage” option on the left pane and click “+” button on IDE controller to add existing VHD . Once this option is select VirtualBox brings up dialog to choose existing disk.
Once VHD is selected, you can modify other settings such as memory, processors and video memory from this dialog.
Now Virtual machine creation is complete , you can stat the VM, you have replica of your physical setup inside VM.
Related Posts
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Learning has never been so easy!
How-to convert a (UEFI-based) Windows 10 physical installation into an Oracle VirtualBox guest.
You will need Windows 10 installation .iso to complete this guide. Don't forget to make sure you are licensed properly as well.
5 Steps total
Step 1: Create a VHDX/VHD
You will need to run (as administrator) SysInternal's Disk2vhd on the computer you are converting Download Disk2vhd from https://docs.microsoft.com/en-us/sysinternals/downloads/disk2vhd
Virtualbox Use Physical Disk Games
Simply select where you want to save the file to and click 'Create'
Step 2: Convert VHDX to VDI
On the computer you have Oracle VirtualBox installed run the following command in Powershell (as administrator). You will need to run this command from the directory that VirtualBox is installed to i.e. C:Program FilesOracleVirtualBox
./VBoxManage clonehd .vhdx .vdi --format VDI
Step 3: Create a Virtualbox VM
Create a New VM from within VirtualBox Manager and choose 'Use an existing virtual disk file' which points to your newly created VDI file.
After it is created open Settings for the VM.
Under System > Motherboard make sure only Hard Disk and Optical is selected, Optical is at the top of the boot order and 'Enable EFI (special OSes only)' is ticked.
Under Storage, point the optical drive to the Windows 10 installation ISO.
Configure the rest as you please.
Step 4: Boot VM to Optical Media
Once you have booted to the installation media and it is asking for 'Language to install,' etc, press Shift+F10. This will open a command prompt.
In the command prompt run 'diskpart'
Enter the command: 'list vol'
This will list off the volumes and should show Volume 3 as a RAW FS. You will need to format this EFI partition. Use the following commands
'sel vol 3' 'format quick fs=fat32 label='System'
If you enter 'list vol' again you will see the changes made.
Exit diskpart by entering command 'exit'
Run the command 'bcdboot C:Windows' which will add the required boot records.
Step 5: Restart VM to Disk
You can now close out of the installation media and restart. On restart make sure you don't boot from the Optical drive again and it should boot into Windows as expected.
You have now converted your physical Windows 10 UEFI device to an Oracle VirtualBox VM.
Virtualbox Use Physical Disk Drive
Below I have added a reference to doing this in Hyper-V, which is part of what I followed to create the above guide. I have also added a reference to licensing requirements as suggested by a comment.
Published: Nov 27, 2017 · Last Updated: Nov 28, 2017
Logical Disk
References
Don't forget licensing requirements!
Hyper-V - Create and Use VHD of Windows 10 with Disk2VHD
Virtualbox Use Physical Disk Usb
14 Comments
Virtualbox Use Physical Disk
Ghost Chili
PatrickFarrell Nov 27, 2017 at 04:27am
Make sure it's licensed properly when you do this.
I was just about to write my own tutorial on this same subject. We still have some Fire Control Panels that MUST talk to a Win XP for programming and nothing else. I have been converting a Win XP dual boot to a VHD for use in Oracle VM for this issue. Great write up.
Cayenne
jhTech86 Nov 27, 2017 at 07:42pm
Just read the licensing post. I didn't realize that Chris spoke Chinese. I assume the licensing info was written in Chinese because I couldn't make heads or tails from it.
Jalapeno
nexus0000 Nov 28, 2017 at 02:11pm
This is a neat guide, VMware has a free software that can do this as well.
https://www.vmware.com/products/converter.html
Serrano
WarKraft Nov 28, 2017 at 03:06pm
Cool article thank anyone out there know how to do this to create a vm box on vmware host?
Serrano
ScarInt Nov 28, 2017 at 03:13pm
This was my missing step (diskpart and bcdboot) for migrating a bare metal server (Server 2012) to KVM. Volume names were different, but that was easy to re-interpret.
Jalapeno
SadTech0 Jan 19, 2018 at 08:05pm
I did this step by step in a lab environment and it went perfect. Good to learn for future use. Thanks!
Mace
bbigford Feb 23, 2018 at 04:27pm
Nice write up. I'm assuming this is just a test machine, or maybe something being used for OS deployment/builds?
Datil
Simon Matthews Apr 4, 2018 at 01:55am
This was originally a request from a customer because they needed to be able to access an old database for a piece of hardware they were replacing. In the end it turned out we only needed to backup the database and keep a copy. The person installing the new piece of hardware had no idea about how the software (they were supposed to be experts with) worked.
Anaheim
dtrade84 Feb 12, 2019 at 06:33pm
I have Windows 10 running on VirtualBox, but it seems to be running a little slow. Any tips on how I can speed it up? I'm running Windows 7 on a dual boot MacBook Pro late 2011, with an i7 and 8GB of ram. I tried it on Workstation Pro 15, and still slow. Any help will be appreciated.
Thank you.
Serrano
Tony2065 Apr 21, 2019 at 02:35pm
Good article. I haven't used Virtualbox in a while. I'l take another look at it.
Serrano
Rich8790 May 23, 2019 at 01:39pm
Feeling embarrassed... having an brain freeze...I am not seeing anything about step 4. It looks like the virtual is running, but I do not see any display, just a black screen.
Serrano
ShanePlus Aug 6, 2019 at 12:14am
@dtrade84 Your laptop will support 16GB of RAM. I would consider maxing it out and running the Windows 10 instance with 8GB of RAM.
Pimiento
spicehead-vbpyc Nov 14, 2019 at 01:56pm
Thanks, just perfect and works like it should. Regards, Aym