-->
The only things you'll need to make this work are: VirtualBox version 6.0 or newer. Some ISO images to add. How to use the Virtual Media Manager. The tool we'll be using is called the Virtual.
By Mark Russinovich
Published: January 21, 2014
Download Disk2vhd(879 KB)
Run now from Sysinternals Live.
Disk2vhd is a utility that creates VHD (Virtual Hard Disk - Microsoft'sVirtual Machine disk format) versions of physical disks for use inMicrosoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). Thedifference between Disk2vhd and other physical-to-virtual tools is thatyou can run Disk2vhd on a system that’s online. Disk2vhd uses Windows'Volume Snapshot capability, introduced in Windows XP, to createconsistent point-in-time snapshots of the volumes you want to include ina conversion. You can even have Disk2vhd create the VHDs on localvolumes, even ones being converted (though performance is better whenthe VHD is on a disk different than ones being converted).
The Disk2vhd user interface lists the volumes present on the system:
It will create one VHD for each disk on which selected volumes reside.It preserves the partitioning information of the disk, but only copiesthe data contents for volumes on the disk that are selected. Thisenables you to capture just system volumes and exclude data volumes, forexample.
Virtual PC supports a maximum virtual disk size of 127GB. Ifyou create a VHD from a larger disk it will not be accessible from aVirtual PC VM.
To use VHDs produced by Disk2vhd, create a VM with the desiredcharacteristics and add the VHDs to the VM's configuration as IDE disks.On first boot, a VM booting a captured copy of Windows will detect theVM's hardware and automatically install drivers, if present in theimage. If the required drivers are not present, install them via theVirtual PC or Hyper-V integration components. You can also attach toVHDs using the Windows 7 or Windows Server 2008 R2 Disk Management orDiskpart utilities.
Do not attach to VHDs on the same system on which you createdthem if you plan on booting from them. If you do so, Windows willassign the VHD a new disk signature to avoid a collision with thesignature of the VHD’s source disk. Windows references disks in theboot configuration database (BCD) by disk signature, so when thathappens Windows booted in a VM will fail to locate the boot disk.
Disk2vhd does not support the conversion of volumes with Bitlocker enabled. If you wish to create a VHD for such a volume, turn off Bitlocker and wait for the volume to be fully decrypted first.
Disk2vhd runs on Windows Vista, Windows Server 2008, and higher,including x64 systems.
Here's a screenshot of a copy of a Windows Server 2008 R2 Hyper-V systemrunning in a virtual machine on top of the system it was made from:
(click image to zoom)
Disk2vhd includes command-line options that enable you to script thecreation of VHDs. Specify the volumes you want included in a snapshot bydrive letter (e.g. c:) or use '*' to include all volumes.
Usage: disk2vhd <[drive: [drive:]...]|[*]><vhdfile>
Example: disk2vhd * c:vhdsnapshot.vhd
Physical-to-virtual hard drive migration of a Windowsinstallation is a valid function for customers with Software Assuranceand full retail copies of Windows XP, Windows Vista, and Windows 7.Software Assurance provides users valuable benefits—please contactMicrosoft Corporation for further information. Windows XP, WindowsVista and Windows 7 installed by Original Equipment Manufacturers(OEM) using OEM versions of these products may not be transferred to avirtual hard drive in accordance with Microsoft licensing terms.
Download Disk2vhd(879 KB)
Run now from Sysinternals Live.