Copying a Hyper-V vhd server to a VMWare vmdk machine the ‘easy way’

First: there isn’t a quick and easy tool to migrate a Hyper-V machine to a vSphere ESXi machine… but luckily it’s doable if following the rules. Reserve enough time for the conversion and upload process. We will call the source and destination virtual machine w12a in this example. The VmWare datastore is called ds1.

  1. Make sure you have enough free space to store a fixed size hard disk copy of the source vm. USB storage will work too.
  2. Shut down the source Hyper-V VM. When this guest runs MS Exchange make sure to first stop and disable all MS Exchange services.
  3. Convert the VHD file with StarWind V2V Convertor to a “VmWare ESX Server image”. Do not choose “VmWare growable image” because you can’t edit the size of a vm workstation virtual hard disk on ESXi! The time this will take depends…  in my case a 200 GB file took 31 minutes (6.45 GB/min). A 5.12 GB growable VHD took 16 minutes. This is  because it’s configured at 100 GB size (makes 6.25 GB/min)… So take into account the configured total size. The convertor will create fixed size hard disks. This also means you can speed up the process by temporary making your VHD hard disks smaller if possible.
  4. Upload the resulting .vmdk (very small) and -flat.vmdk (big) file to a new VmWare datastore folder named after the destination VM (/vmfs/volumes/ds1/w12a/). You can use the datastore browser for this (vSphere Client/host/Configuration/Storage/right click ds/Browse Datastore). Again, this will take time!
  5. Enable SSH access to your ESXi host (vSphere Client/host/Configuration/Security Profile/Properties/SSH/Start).
  6. Open a SSH session (for windows: just copy putty.exe to c:\windows and run it and login as user root).
  7. cd /vmfs/volumes/ds1/w12a/ (change folder, use tab to autocomplete)
  8. ls -l (list contents)
  9. vi w12a.vmdk (edit w12a.vmdk)
  10. Temporary change the line ddb.adapterType = “lsilogic” to “ide” (use arrows and del key for delete, i key for insert mode, type ide, esc for exit edit mode, type :wq for write&quit). This is because HyperV uses IDE disks and Windows expects a IDE boot disk. Otherwise you will see the famous STOP: 0x0000007B blue screen.
  11. Create new custom VmWare vm named w12a, choose existing disk and point to the uploaded vmdk file on datastore ds1. This drive will be added as IDE drive. Also add one temporary SCSI disk of 1 GB size. This makes sure Windows installs the needed SCSI drivers after it’s booted up.
  12. Startup your new VmWare VM.
  13. Login and wait for new SCSI hardware to be detected.
  14. Install VmWare tools
  15. Check the IP address and gateway
  16. Shutdown VM
  17. Again edit w12a.vmdk with vi. This time change “ide” back to “lsilogic”. This is the best hard disk type for VmWare and makes it possible to increase the size later if needed.
  18. Remove the IDE drives (both HDD and DVD) and any temporary SCSI drive you added.
  19. Add hard disk, choose existing, point to w12a.vmdk. This time it will add it as SCSI.
  20. Add a DVD drive (node should be IDE (0:0)
  21. Start VM and check ip and gateway again.
  22. Activate Windows (shouldn’t cause any troubles in my experience) and you’re done!

About Stoomkracht

Scripter, programmer, Windows administrator, network/wifi engineer, thinker

4 comments

  1. Quintin

    you saved my day. i got it working some other way that took all day and half of that was chkdsk spewing out fixes

  2. Loki

    2 years later and this post was a godsend. Thanks so much for figuring it out. I had converted the disk using Starwind but couldnt easily resolve the 0x7b error. This worked great. Thanks again!

  3. Pingback: Copying a Hyper-V vhd server to a VMWare vmdk machine the ‘easy way’ — rlufe.kz

  4. sriram

    This is a big saver. Thanks a lot for putting this.
    I bow down to the person whoever created this!!!!

Leave a comment