Convert a Hyper-V 2012’s vhdx to VMware’s vmdk

文章就是转载的了,不过我的需求是将有快照的vhdx+avhdx转为vmdk,所以下面的方法对我来说,还是不可以,VMM也不支持带avhdx的转换到vhd的,唉,,,导出来用vmware conventer试试。或者实在不行就ghost出来了,


I have been searching for ways to convert a Hyper-V VM to VMware. I have not having good luck with this. We (at work) are not trying to migrate from Hyper-V to VMware… it is just that sometimes we have to send out one of our virtual servers to another datacenter who run VMware there.

Of course, there is a simple way to install a client and do a P2V kind of conversion which spits out a VMDK created out of a running VM. I was not interested in that type of conversion. I had a VHDX, lets just convert it to VMDK!

Here is what I have tried and does NOT work:

  • Using Hyper-V OVF export tool.

I blogged about it here.

  • Using VMware Converter standalone 5.1

It does not recognize .vhdx or .vhd files.

Here is what people in the ‘net are saying:

  • Use WinImage

A software called WinImage is reported to work but it is not free. It does have a 30 day trial.

  • Use XenConvert

I tried using XenConvert to convert the VHD to OVF. Then I tried to import it into VMware using the vSphere client. Alas, that did not work, the importer failed saying “Could not parse the document: ‘encoding specified in XML declaration is incorrect’. I guess the OVF XenConvert spat out is not compatible with VMware.

  • Use StarWind V2V Converter

I found people recommending StarWind V2V Converter. It is free, but does require (free) registration.

My approach to this conversion problem {this really works!}:

I downloaded StarWind V2V Converter. After installing it (yes, it needs to be installed), I used it to convert a VHD to VMDK. I chose the option IDE when it prompted me to choose what kind of disk do you want in the VMDK.

After the conversion finished, I created a new VM in vSphere with no hard disk. Then I uploaded the VMDK file to the datastore of the vSphere server. I added that vmdk to the settings of the VM. The VM booted up just fine. Just needed to add VMware tools and configure the IP address etc.

So the last option worked fine for me. To reiterate the steps I took to convert a .vhdx VM file on Hyper-V to a .vmdk file on VMware:

  1. Using VMM stop they Hyper-V VM

  2. Make a copy of the .vhdx file locally on the Hyper-V server

  3. Use Hyper-V manager to convert that .vhdx to vhd.

  4. Copy that .vhd to your workstation’s local HDD (or where ever you have StarWind converter installed.

  5. Use the StarWind converter to convert that .vhd to .vmdk. Make sure you choose the correct “Image Format”. For ESX server hosts (including free ones) the correct one is VMware ESX server image. The other ones do NOT work for ESX. I found that out the hard way, hoping to create a thin provisioned image.

  6. Using vCenter client, create a blank VM

  7. Upload that .vmdk to the datastore

  8. Link that vmdk to the VM

  9. Boot that VM

  10. Configure VM

  11. Enjoy!

Tip: if there is not enough space on the Hyper-V server itself to hold the converted vhd, you can use PowerShell cmdlet “Convert-VHD) to send the vhd to a UNC path. I have tried it and it works fine. In my case both the source and destination were on UNC paths and the conversion still worked fine. Note that you will have to run the cmdlet from the Hyper-V server itself OR any other workstation which has the Hyper-V 2012 role installed. I did not have any workstation which had Windows 8 + Hyper-V so I ran the cmdlet directly on one of my Hyper-V 2012 hosts (which have  no GUI installed). Worked like a charm Smile

Be Sociable, Share!


你可能感兴趣的:(转换,convert,vmdk,VHDX)