5333 private links
This article is presented to you as a tool for performing virtual-to-physical conversions because it is universally applicable to any target hardware environment. However, because it is target-neutral, the steps presented here could very easily be adapted to other situations. For instance:
- Virtual-to-virtual conversions for which there is no applicable tool
- Physical-to-virtual conversions
- VHDX-to-physical conversions //
Virtual-to-Physical Conversions are Not Ideal
My first recommendation is: find another way. Even though V2P is possible, it has a fairly high chance of being unsuccessful even with your best effort. A preferred approach would be migration. Install the desired operating system on the new hardware and migrate settings and applications. Most software vendors have a documented method for performing this. You are almost guaranteed to prefer the process and results over a V2P.
If you’re using Hyper-V Server and you’re converting a VM running a recent version of Windows, you could install the OS on the physical hardware and then mount the VHDXs directly inside the new operating system and transfer files via copy, xcopy, robocopy, Windows Explorer, etc.. //
The very first thing you must do is take a complete backup of the machine to be converted. You are going to absolutely rework this machine from bottom to top, things are almost definitely going to go wrong, and your sole saving grace will be a good backup. //
Your virtual machine should be off before proceeding. You’ve got a clean virtual machine, but what you need is a clean image. The easiest way to proceed from here will be to use some form of imaging software. There is any number of solutions available, but these directions will use Clonezilla Live. If you have some other product, the process should be similar.
There are two basic methods to perform a clone. One is over the network, the other is is by hard drive transfer. I’ll show you the basic setup operations for each method, and then in the next section, I’ll go through running Clonezilla with appropriate branches to fit your method.
One of the many benefits of virtualization is portability, meaning that you can easily move selected virtual machines (VMs) from one location to another without experiencing downtime or service disruption. Portability within a Hyper-V environment is ensured through the Hyper-V Export and Import functionality, which allows you to easily copy and move a Hyper-V VM to a target location and then restore the VM to how it was at the time of export.
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).
It will create one VHD for each disk on which selected volumes reside. It preserves the partitioning information of the disk, but only copies the data contents for volumes on the disk that are selected. This enables you to capture just system volumes and exclude data volumes, for example.
Virtual PC supports a maximum virtual disk size of 127GB. If you create a VHD from a larger disk it will not be accessible from a Virtual PC VM. ///
Hyper-V does not have the 127GB limitation (?)
Disk2VHD is a practical free tool by Sysinternals, since 2006 a subsidiary of Microsoft Corporation. Sysinternals is well known of their wide range of free tools to manage, troubleshoot and diagnose Windows systems and applications. As the name already tells Disk2VHD is a tool to create a Virtual Hard Disk (VHD) file of an existing Windows system. This VHDfile can then be used to create a virtual machine in Windows Virtual PC (Windows 7) and Hyper-V (Windows 8 and later).
In this tutorial we will download and install Disk2VHD on an existing Windows 10 computer, use it to create a VHD of the current Windows 10 installation on that computer and use the resulting VHD to create a virtual machine on Windows 10 Hyper-V. The virtual machine will be an exact copy of the original Windows installation apart of some hardware and drivers, Hyper-V replacing some hardware with its own virtual devices.
The virtual machine will be fully functional and contain all software, user profiles and settings which were installed and present on the real physical computer and Windows when the VHD creation process was started.
Failed to open the disk image file /tmp/tde-ubuntu-14.04-desktop-latest-amd64.iso.
Could not get the storage format of the medium '/tmp/tde-ubuntu-14.04-desktop-latest-amd64.iso' (VERR_NOT_SUPPORTED).
Result Code: VBOX_E_IPRT_ERROR (0x80BB0005)
The problem is that the file size is not a multiple of 2048.
Padding it with
printf '%1536s' ' ' >> tde-ubuntu-14.04-desktop-latest-amd64.iso
makes VBox happier about that image.
///
2048 - (.iso size mod 2048) = printf size