disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

disk2vhd

Do you wish there was a hassle free way to migrate physical machines to VMs for testing and consolidation? Today we take a look at Disk2VHD from Sysinternals which is a simple solution for turning physical Windows machines into VM’s–even while they’re up and running.

您是否希望有一种轻松的方法将物理机迁移到VM以进行测试和整合? 今天,我们来看看Sysinternals的Disk2VHD,它是一种将物理Windows计算机变成VM的简单解决方案,即使它们已经启动并正在运行。

Running Disk2VHD

运行Disk2VHD

Disk2vhd allows you to create a Virtual Hard Drive (VHD) of a physical machine even while the machine is up and running using volume snapshot technology. This small utility doesn’t require installation and you can run it from a flash drive if you want. Just open up the Disk2vhd folder and run the executable.

Disk2vhd允许您使用物理卷快照技术在物理机启动和运行时为物理机创建虚拟硬盘(VHD)。 这个小实用程序不需要安装,您可以根据需要从闪存驱动器中运行它。 只需打开Disk2vhd文件夹并运行可执行文件即可。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

Agree to the EULA…

同意EULA…

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

Now select the physical drive you want to turn into a VHD, give it a name and location to create and store it. You’ll need to select a location that is large enough to store the VHD you’re creating. In this example we’re creating a VHD from an IBM ThinkPad running XP. Notice the space required under the Volumes to include section shows 6.48GB and the E:\ drive is actually an 8GB travel drive. Also, If you’re creating a VHD from XP or Server 2003 and will be running it on Microsoft Virtual PC, check the box Fix up HAL for Virtual PC. After everything looks correct, click on the Create button.

现在,选择要转换为VHD的物理驱动器,为其指定名称和位置以创建和存储它。 您需要选择一个足以存储要创建的VHD的位置。 在此示例中,我们从运行XP的IBM ThinkPad创建VHD。 请注意,“ 要包括卷”部分下所需的空间显示为6.48GB,而E:\驱动器实际上是8GB的移动驱动器。 另外,如果要从XP或Server 2003创建VHD,并将在Microsoft Virtual PC上运行它,请选中“ 为Virtual PC修复HAL ”框 一切看起来正确之后,单击“创建”按钮。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

You’re shown the progress bar while the VHD is created. The XP VHD from an older IBM ThinkPad G40 used for this test took about an hour to complete. The amount of time it takes to create the VHD will vary from system to system.

创建VHD时会显示进度条。 用于该测试的较旧的IBM ThinkPad G40的XP VHD大约需要一个小时才能完成。 创建VHD所需的时间因系统而异。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

Setup on Windows Virtual PC

在Windows Virtual PC上安装

Here we’ll take a look at running the newly created VHD on Virtual PC in Windows 7.  We need to create a new machine first, so open Windows Virtual PC from the Start Menu.

在这里,我们将研究在Windows 7中在Virtual PC上运行新创建的VHD。我们需要首先创建一台新计算机,因此从“开始”菜单中打开Windows Virtual PC。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

In the Virtual Machine folder click on Create virtual machine to launch the wizard.

在“虚拟机”文件夹中,单击“ 创建虚拟机”以启动向导。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

Name the machine something that helps you identify it, where in this case we gave it the name of the physical machine it came from.

为机器命名,以帮助您识别它,在这种情况下,我们为它指定了来自其的物理机器的名称。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

Decide the amount of memory to give to the virtual machine and select network settings.

确定要分配给虚拟机的内存量,然后选择网络设置。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

In the next step of the wizard we need to point to the location of the VHD and click Create.

在向导的下一步中,我们需要指向VHD的位置,然后单击“创建”。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

The created virtual machine will be placed in the Virtual Machines folder.

创建的虚拟机将放置在“虚拟机”文件夹中。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

There are a few things to point out on this XP virtual machine. Because we moved it from another computer, we need to reactivate the XP license.

在此XP虚拟机上有几点要指出。 由于我们将其从另一台计算机上移走,因此需要重新**XP许可证。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

The new hardware wizard will come up as XP starts pointing out different hardware detected on the virtual machine. We found that cancelling out of those wizards worked the best.

XP开始指出虚拟机上检测到的其他硬件时,将出现新的硬件向导。 我们发现,取消这些向导的效果最佳。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

Then we ran Enable Integration Features form the Tools menu on Virtual PC.

然后,我们在Virtual PC上的“工具”菜单上运行“启用集成功能”。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

A wizard will start on the virtual computer and just follow each step until it’s done, then restart the VM.

向导将在虚拟计算机上启动,并按照每个步骤进行操作直到完成,然后重新启动VM。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

After the machine launches from the reboot you can start using it. This example is cool because I’m fond of the ThinkPad for nostalgia sake, and can bring it along with me to other  machines.

从重新启动计算机启动后,您就可以开始使用它了。 这个示例很酷,因为出于怀旧的缘故我喜欢ThinkPad,并且可以将其与其他机器一起使用。

disk2vhd_如何使用Disk2vhd将物理计算机变成虚拟机

Conclusion

结论

You can also run the VHDs on Microsoft Hyper-V virtual machines on Server 2008, and we successfully ran one on VirtualBox as well. There are a lot of scenarios where Disk2vhd would come in very handy, especially for consolidating older machines into one. It can be used to create images of other machines for testing, without having to worry about damaging them. Also it could be used for simply creating a backup of your computer. It’s completely free, doesn’t require installation, and will create the VHD while the computer is up and running. It will run on Windows XP SP2 and higher.

您还可以在Server 2008的Microsoft Hyper-V虚拟机上运行VHD,我们也成功在VirtualBox上运行了VHD。 在很多情况下,Disk2vhd会非常方便,特别是对于将较旧的计算机合并为一个的情况。 它可用于创建其他机器的映像以进行测试,而不必担心损坏它们。 它还可以用于简单地创建计算机的备份。 它是完全免费的,不需要安装,并且会在计算机启动和运行时创建VHD。 它将在Windows XP SP2和更高版本上运行。

Download Disk2vhd

下载Disk2vhd

翻译自: https://www.howtogeek.com/howto/8054/how-to-turn-a-physical-computer-into-a-virtual-machine-with-disk2vhd/

disk2vhd