Sunday, October 28, 2012

Microsoft Virtual Machine Converter

Microsoft release a new free tool, "Microsoft Virtual Machine Converter (MVMC)". It allows administrators converting a VMware-based virtual machines and vmdk disks to Hyper-V based virtual machines and VHD disks.

MVMC supports to convert a virtual machine from VMware vShpere 4.1, 5.0 to Windows Server 2012, Windows Server 2008 R2 SP1, Microsoft Hyper-V Server 2012 and Microsoft Hyper-V Server 2008 R2 SP1.

Remark: To convert a virtual machine from VMware vShpere 4.0, you have to connect to vCenter 4.1 or 5.0 through MVMC to convert a virtual machine on vSphere 4.0.

The following operating systems are supported to be converted.
  • Windows Server 2003 Standard Edition with SP2 x86 
  • Windows Server 2003 Standard Edition with SP2 x64
  • Windows Server 2003 Enterprise Edition with SP2 x86
  • Windows Server 2003 Enterprise Edition with SP2 x64
  • Windows Server 2003 R2 Standard Edition with SP2 x86 
  • Windows Server 2003 R2 Standard Edition with SP2 x64
  • Windows Server 2003 R2 Enterprise Edition with SP2 x86
  • Windows Server 2003 R2 Enterprise Edition with SP2 x64
  • Windows Vista Enterprise x86
  • Windows Vista Enterprise x64
  • Windows 7 Professional x86
  • Windows 7 Professional x64
  • Windows 7 Enterprise x86
  • Windows 7 Enterprise x64
  • Windows 7 Ultimate x86
  • Windows 7 Ultimate x64
  • Windows Server 2008 Enterprise x86
  • Windows Server 2008 Enterprise x64
  • Windows Server 2008 Datacenter x86
  • Windows Server 2008 Datacenter x64
  • Windows Server 2008 R2 Standard
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Datacenter

I will try to use MVMC to convert a virtual machine from ESXi 4.1 to Windows Server 2012 Hyper-V environment.

Lab environment
  • 1 ESXi 4.1 server
  • 1 Windows Server 2012 with Hyper-V named HVSVR02 joined test.contoso.com domain
  • 1 Windows 7 named WS01 installed vSphere Client and join test.contoso.com domain
Goals
Convert a VM which is installed Windows Server 2003 from ESXi 4.1 to Windows Server 2012 Hyper-V environment.

Prerequisites

Converting a VM by Microsoft Virtual Machine Converter Solution Accelerator
1. On WS01, log in as Domain Administrator.
2. To install "Microsoft Virtual Machine Converter Solution Accelerator" in Windows 7 and Windows Server 2008 R2, you need to install Microsoft .NET Framework 3.5 and .NET Framework 4.0 in WS01.

Remark: If you install "Microsoft Virtual Machine Converter Solution Accelerator" in Windows Server 2012, I need to install Microsoft .NET Framework 4.5.

3. Install "Microsoft Virtual Machine Converter Solution Accelerator" in WS01.
4. Launch "Virtual Machine Converter".


5. On "Before You Begin" window, click "Next".
6. On "Source" window, next to "Address", type the IP address or DNS name of the ESXi server.
7. Provide the "User name" and "Password" of the ESXi server.



8. Click "Next".
9. On "Virtual Machines" window, select the VM which you want to convert.


Remark: If the VMware tools isn't installed in the VM, the VM cannot be converted.

Remark: If the VM isn't running, the VM cannot be converted.


10. Click "Next".
11. On "Connection" window, un-check "Use my Windows user account".
12. Provide the local administrator "User name" and "Password" of the VM which is installed Windows Server 2003.

Remark: Because the VM hasn't been joined domain, you need to provide the local administrator "User name" and "Password" of the VM.

13. Next to "Final state of source virtual machine" and "Final state of destination virtual machine", select "Off".


14. Click "Next".
15. On "Workspace" window, click "Browse".
16. Select a folder which you want to store a temporary virtual hard disk.


Remark: Make sure the location is enough disk space to store the double size of the source virtual hard disks.

17. Click "Next".
18. On "Hyper-V Host" window, next to "Address", type "HVSVR02".
19. Next to "Path", click "Browse".
20. Select "VM" folder, click "OK".
21. Next to "Choose the type of virtual hard disk to use for the converted disk", select "Dynamically expanding" in my test environment.


22. Click "Next".
23. On "Summary" window, click "Finish".


Then Microsoft Virtual Machine Converter will do the following steps.
  • Creating snapshot of the source virtual machine
  • Uninstalling VMware tools on source virtual machine
  • Shut down the source virtual machine
  • Download the VMware virtual disk from source virtual machine to temp location
  • Restoring the source virtual machine to original state
  • Converting VMware virtual disks and injecting drivers
  • Copying converted disks to destination VM host, HVSVR02
24. On "Completion" window, click "Close".


25. Go to "HVSVR02", log in as Domain Administrator.
26. Launch "Hyper-V Manager".



27. Right-click "Windows 2003", select "Settings".
28. Next to "Network Adapter", by default, the virtual switch hasn't applied to the VM.


29. Select a virtual switch for the VM, click "OK".
30. Connect and Power-on "Windows 2003".
31. On "Windows 2003", log in as Administrator.
32. Now, the "Hyper-V Integration Services" is installing in the VM.


Then the VM will restart automatically.

Remark: After the VM was converted, you need to reassign the IP address in the VM.

Converting a VM by Microsoft Virtual Machine Converter Plug-in for VMware vSphere Client
Prerequisites
  • Remove Windows 2003 in HVSVR02

33. Go to WS01, install "Microsoft Virtual Machine Converter Plug-in for VMware vSphere Client".
34. In vSphere Client, right-click "Windows 2003", select "Convert to Hyper-V virtual machine".


Remark: If the VMware tools is not ready, you get the following error.


35. On "Before You Begin" window, click "Next".
36. On "Connection" window, un-check "Use my Windows user account".
37. Provide the local administrator "User name" and "Password" of the VM which is installed Windows Server 2003.
38. Next to "Final state of source virtual machine" and "Final state of destination virtual machine", select "Off".


39. Click "Next".
40. On "Workspace" window, next to "Folder", type "C:\Temp".


41. Click "Next".
42. On "Hyper-V Host" window, next to "Address", type "HVSVR02".
43. Next to "Path", type "\\HVSVR02\VM".
44. Next to "Choose the type of virtual hard disk to use for the converted disk", select "Dynamically expanding".


45. Click "Next".
46. On "Summary" window, click "Finish".


As a result, the VM was converted.

Converting a VMDK to VHD
To convert a vmdk to vhd, make sure the disk is offline.

Prerequisites 
  • Copy the vmdk file to a computer which is installed "Microsoft Virtual Machine Converter Solution Accelerator"
The vmdk files were copied in C:\Temp folder of WS01.


1. On WS01, launch "Command Prompt".
2. Navigate to the installation path of "Microsoft Virtual Machine Converter Solution Accelerator".


3. Perform "MVDC.exe "C:\Temp\Windows 2003.vmdk" "C:\Temp\Windows 2003.vhd" /Dyn" to convert a VMware hard disk to a Virtual hard disk with dynamic format.


As a result, the vmdk was converted to a vhd format.


Remark: If the VMware tools of this disk hasn't uninstalled. you need to uninstall it by yourself.

Remark: The tool converted a vmdk disk to vhd disk with full size. If you select dynamic format, you may need to compact the vhd to reduce the disk size.

Reference:
Microsoft Virtual Machine Converter Administration Guide

This posting is provided “AS IS” with no warranties, and confers no rights!

No comments:

Post a Comment