Sumber : http://gabrielbeaver.me/2012/09/migrate-from-vmware-vms-to-hyper-v-windows-8/
[worked]
In a previous post I described how to setup Hyper-V on your Windows 8 desktop. If you decided to install Hyper-V on your Windows 8 desktop, but you have VMware VMs you want to run on this same machine, you’ll be unable to import VMDK files into Hyper-V and you’ll also be unable to install VMware Workstation on this same computer. You’ll get this error:
[worked]
In a previous post I described how to setup Hyper-V on your Windows 8 desktop. If you decided to install Hyper-V on your Windows 8 desktop, but you have VMware VMs you want to run on this same machine, you’ll be unable to import VMDK files into Hyper-V and you’ll also be unable to install VMware Workstation on this same computer. You’ll get this error:
If you had System Center Virtual Machine Manager, we could convert this file with that. But what if you don’t have that? What if you have a bunch of VMware VMs you want to convert to Hyper-V that you have customized and don’t want to rebuild from scratch? Don’t worry, we can get your VMware VMs into Hyper-V.
*Very Important – This process will not work on compressed files. Make sure that the VMDK you are working with is NOT compressed. Right click on the VMDK file > Properties, then click the Advanced button. Make sure that “Compress contents to save disk space” is NOT checked. If it is, uncheck this and wait for this to finish before proceeding. Further, it is important to remind everyone that you should always backup any data to another source before modifying or making these types of changes as a safeguard.
Here is what we will need to do:
– You need to convert your VMDK file(s) to a VHD
– Then convert the VHD file to VHDX.
– Then convert the VHD file to VHDX.
There will be two scenarios for your VMDK file(s):
– Your VMDK is one single file
– Your VMDK was split into multiple files
– Your VMDK was split into multiple files
In order to proceed with converting your VMDK to VHD format, we need to have your VMDK as one single file. If it is already in a single file, head on down to Convert VMDK to VHD further below.
If your VMDK is in multiple files we will need to convert it to one single file first. Head over to VMware’s site and download the VMware vSphere 5.0 Virtual Disk Development Kit. We need the vmware-vdiskmanager.
Once downloaded and installed, you will need access vmware-vdiskmanager utility which will be in this folder: C:\Program Files (x86)\VMware\VMware Virtual Disk Development Kit\bin
Launch a command prompt as an Administrator. Navigate to the directory where where vmware-vdiskmanager executable is, then we’ll begin the conversion process to a single VMDK.
Here is the format:
vmware-vdiskmanager.exe /r “PATH TO SOURCE” –t 0 “PATH TO DESTINATION” in my example it looks like this:
vmware-vdiskmanager.exe /r “D:\VM\VMWare\Windows\TEST-SCCM01\TEST-SCCM01.vmdk” -t 0 “D:\VM\VMWare\Windows\TEST-SCCM01\TEST-SCCM01-SINGLE.vmdk”
The conversion process should begin immediately. Once finished, we’ll convert your VMDK in a single file now, to a VHD.
Convert VMDK to VHD
You need to download a VMDK to VHD converter named 2Tware Convert VHD 1.0.3. I picked this up on CNET. Install the software, run it, and enter the source and destination in these fields:
*Note – I have used Vmdk2Vhd in the past; however, I have ran into errors with the application saying the VMDK is invalid. The utility below, has worked on every try thus far for me.
Once that is done you should have the VHD file that you need now. Let’s get this working in Hyper-V.
Launch the Hyper-V console, instead of importing a virtual machine, we are going to create a new virtual machine and use an existing disk. Import function only works for Hyper-V VM configuration files.
Select New > Virtual Machine. Enter the name of the VM and place the virtual machine in the same directory as your VHD (you don’t HAVE to do that, but it is my recommendation to keep things clean).
Set memory as you would like, select your Network Connection, then on the Connect Virtual Hard Disk, “select Use and existing virtual hard disk” and point to your VHD file:
Finish out the wizard, then you will see your VM in the list of Hyper-V machines. Connect to the console of your server and power it on. We want to make sure it boots correctly, before upgrading it to a VHDX file.
Success!!!
Now, power off the VM. Once the VM is down, then select Edit Disk…
Then browse to the source VHD file:
Then select Convert:
Then select VHDX:
Then I recommend using Dynamically Expanding, then set the destination of the VHDX, and Finish the wizard.
It will being Editing the virtual disk…
This conversion will take some time to complete, depending on the size of your VHD file. This progress bar will close when completed and will not tell you its done. However, you can confirm by checking the directory you set in the conversion process, and you’ll see it worked.
Now edit your VM and change the VHD path by simply adding an “x” to the end of the Virtual hard disk path, click Apply and OK. Then Power On your VM.
Success again!!!
Now all that remains is to install Hyper-V Guest Additions and uninstall VMware tools. I’m guessing if you’ve been following this blog to this point, this is probably something you can handle from here You can also delete the old VHD file and VMDK files once you are certain this process is complete and there are no outstanding issues.
We have successfully converted our VMware ESXi 5.0 Virtual Machine to a Windows 8 Hyper-V desktop host by:
– Converting our VMDK into a single file (as necessary)
– Converting our VMDK file to a VHD
– Converting our VHD file to a VHDX
– Converting our VMDK file to a VHD
– Converting our VHD file to a VHDX
No comments:
Post a Comment
have a question, just spill it :D