Pour les professionnels de l’informatique > Forums - Accueil > Hyper-V > How to convert VMWare image to Hyper-V images?
Poser une questionPoser une question
 

TraitéeHow to convert VMWare image to Hyper-V images?

Réponses

  • mercredi 14 mai 2008 18:59Steen Kirkby Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    Here's a small how-to based on my experiences:

     

    1)     Uninstall VM tools from your VM

     

    2)     Shutdown the VM

     

    If your VMs are based on SCSI drives (like mine were – because VMware recommends SCSI) and the operating systems are Windows XP, 2003 or earlier then you have to add the IDE driver to your VM before you shut it down in VMware.

    Otherwise you will end up with a converted VM that starts up in Hyper-V with a blue screen of death (BSOD) and 0x0000007B – “Inaccessible Boot Device” error. This is due to the fact that your converted VM will have no Primary IDE Channel and Hyper-V will presume that your converted disk is IDE type and located on the Primary IDE Channel.

    Doing a Windows Repair Install can fix the 0x7B Inaccessible Boot Device error – but it’s both time consuming and the result might not be good. (Believe me – I had to redo a migration of a SharePoint installation because a Windows Repair Install messed it up. Luckily I then came up with the solution described below instead).

    Please note that adding a temporary IDE disk to your VM is not necessary with VMs running Windows Vista or Windows 2008 – they seem to detect the Primary IDE Channel during initial boot phase.

     

    3)     Add a new IDE disk drive to your VM: (any size will do)

     

    Make sure that you select “Adapter: IDE 0 Device: 0” under “Virtual Device Node” while creating the new disk (otherwise you might end up with yet another SCSI disk)

     

    4)     Boot up your virtual machine with both drives connected and check that it detects your new IDE drive (along with a primary IDE channel and a disk device driver). You should be able to see the new drive as "not initialized" in Disk Management.

     

    5)     Power off your virtual machine and remove the newly created IDE disk from your VM (you can delete it from disk as well). Do not power on your VMware Machine again!

     

    6)     Now convert your VMDK file to VHD format using the newest Vmdk2Vhd utility (currently version 1.0.13) that can be downloaded from http://vmtoolkit.com.

     

    7)     You can now uninstall VMware Server and install Hyper-V + current Windows Updates on your host server

     

    8)     Create a new Virtual Machine in Hyper-V. Make sure you select “Use an existing virtual hard disk” and select the VHD file that you just created.

     

    9)     Power it on, Install “Integration Services” and reboot when prompted:

      

    10)     Assign the original IP address(es) to your new network card(s)

     

    11)     Check device manager

     

    12)     Do another reboot

     

    13)     Check that all your applications and services are running

     

    14)     Done!

     

    Note: if you have Win2008 VM’s then it’s not necessary to add a temporary IDE disk during migration but you might want to copy the relevant KB949219 (http://support.microsoft.com/kb/949219) update package to your VM before converting it. Otherwise it will start up with three warnings in the Device Manager for “Microsoft VMBus Video Device”, “Microsoft VMBus HID Miniport” and “Microsoft VMBus Network Adapter” - hence you will have no network access. I worked around it by “burning” the KB949219 updates to an ISO file using “ISO recorder“ (http://isorecorder.alexfeinman.com) and mounting the ISO file to my VM.

     

  • lundi 11 février 2008 01:58Tim Cerling Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    Microsoft's System Center Virtual Machine Manager provides the ability to convert VMware virtual machines into the VHD format.  Yes, SCVMM only works with Virtual Server 2005 R2 SP1 today, but the VHD format is common between Virtual Server and Hyper-V.  After using SCVMM to convert, you can load the virtual machine into Virtual Server and remove the VM additions.  Then you can move the VHD file over to Hyper-V.  If the virtual machine is either Windows Server 2008 or Windows Server 2003 SP2, you can add the integration components under Hyper-V.

     

     

Toutes les réponses

  • vendredi 8 février 2008 09:00Torsten Berg Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Vmdk2Vhd is a simple utility to convert virtual hard drive images from VMWare's VMDK format into the Microsoft's VHD format. This is a sector by sector copy operation from one format to the other and the source file remains unaltered.
  • lundi 11 février 2008 01:58Tim Cerling Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    Microsoft's System Center Virtual Machine Manager provides the ability to convert VMware virtual machines into the VHD format.  Yes, SCVMM only works with Virtual Server 2005 R2 SP1 today, but the VHD format is common between Virtual Server and Hyper-V.  After using SCVMM to convert, you can load the virtual machine into Virtual Server and remove the VM additions.  Then you can move the VHD file over to Hyper-V.  If the virtual machine is either Windows Server 2008 or Windows Server 2003 SP2, you can add the integration components under Hyper-V.

     

     

  • lundi 11 février 2008 22:16Stephen Edgar Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Tim,

    You can also add the IC's to Suse Enterprise 10 with the Hyper-V Beta Linux IC's available from http://connect.microsoft.com

    Cheers,

    Stephen Edgar
  • vendredi 25 avril 2008 16:25KX3 Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    FYI - Once you have converted the VMWare files into .VHD format, here is a simple How-To for importing into Hyper-V

     

     

    http://www.groovypost.com/howto/microsoft/windows-server/migrate-microsoft-virtual-server-2005-r2-vm-to-windows-server-2008-hyper-v/
  • mercredi 14 mai 2008 18:59Steen Kirkby Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    Here's a small how-to based on my experiences:

     

    1)     Uninstall VM tools from your VM

     

    2)     Shutdown the VM

     

    If your VMs are based on SCSI drives (like mine were – because VMware recommends SCSI) and the operating systems are Windows XP, 2003 or earlier then you have to add the IDE driver to your VM before you shut it down in VMware.

    Otherwise you will end up with a converted VM that starts up in Hyper-V with a blue screen of death (BSOD) and 0x0000007B – “Inaccessible Boot Device” error. This is due to the fact that your converted VM will have no Primary IDE Channel and Hyper-V will presume that your converted disk is IDE type and located on the Primary IDE Channel.

    Doing a Windows Repair Install can fix the 0x7B Inaccessible Boot Device error – but it’s both time consuming and the result might not be good. (Believe me – I had to redo a migration of a SharePoint installation because a Windows Repair Install messed it up. Luckily I then came up with the solution described below instead).

    Please note that adding a temporary IDE disk to your VM is not necessary with VMs running Windows Vista or Windows 2008 – they seem to detect the Primary IDE Channel during initial boot phase.

     

    3)     Add a new IDE disk drive to your VM: (any size will do)

     

    Make sure that you select “Adapter: IDE 0 Device: 0” under “Virtual Device Node” while creating the new disk (otherwise you might end up with yet another SCSI disk)

     

    4)     Boot up your virtual machine with both drives connected and check that it detects your new IDE drive (along with a primary IDE channel and a disk device driver). You should be able to see the new drive as "not initialized" in Disk Management.

     

    5)     Power off your virtual machine and remove the newly created IDE disk from your VM (you can delete it from disk as well). Do not power on your VMware Machine again!

     

    6)     Now convert your VMDK file to VHD format using the newest Vmdk2Vhd utility (currently version 1.0.13) that can be downloaded from http://vmtoolkit.com.

     

    7)     You can now uninstall VMware Server and install Hyper-V + current Windows Updates on your host server

     

    8)     Create a new Virtual Machine in Hyper-V. Make sure you select “Use an existing virtual hard disk” and select the VHD file that you just created.

     

    9)     Power it on, Install “Integration Services” and reboot when prompted:

      

    10)     Assign the original IP address(es) to your new network card(s)

     

    11)     Check device manager

     

    12)     Do another reboot

     

    13)     Check that all your applications and services are running

     

    14)     Done!

     

    Note: if you have Win2008 VM’s then it’s not necessary to add a temporary IDE disk during migration but you might want to copy the relevant KB949219 (http://support.microsoft.com/kb/949219) update package to your VM before converting it. Otherwise it will start up with three warnings in the Device Manager for “Microsoft VMBus Video Device”, “Microsoft VMBus HID Miniport” and “Microsoft VMBus Network Adapter” - hence you will have no network access. I worked around it by “burning” the KB949219 updates to an ISO file using “ISO recorder“ (http://isorecorder.alexfeinman.com) and mounting the ISO file to my VM.

     

  • dimanche 25 janvier 2009 17:38ABENTZEN Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    Hi!

    I'm going to ask a dummy question...

    Why can't the Virtuak machine in Hyper-V use SCSI disk and the problem is solved?

    Is the answear as simple that Vmdk2Vhd utility simply make an "IDE" disk?

    -Alexander

  • dimanche 25 janvier 2009 20:25John Paul CookMVP, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    VMware can boot from SCSI and Hyper-V can only boot from IDE. Hyper-V supports SCSI disks as extra disks. If you have a VMware vm with multiple SCSI disks, only the boot disk has to be converted to IDE. The rest can be left as SCSI.

  • dimanche 25 janvier 2009 21:48Powershell Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    scsi disk also perform a little better onder hyper-v because of the  context switches in the vmwp.exe process (wich runs in user mode) when using an ide controller

    best advice: boot from ide (the only possible way) and the rest on a scsi controller with scsi disks

  • dimanche 25 janvier 2009 22:00ABENTZEN Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    Ahhhh, this was great news and very helpful.

    So the VMware SCSI-disk which is only data disk/Extra disks I can use as-is in Hyper-V. Mayby change name from xxx.vmdk to xxx.vhd?

    If so, this is very time-saving since I have some TB with disk.

    -Alexander

  • dimanche 25 janvier 2009 22:24John Paul CookMVP, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    You can't simply rename VMware SCSI disks. VMware vmdk and Microsoft vhd are different formats. You'll still have to convert from vmdk to vhd.
  • dimanche 25 janvier 2009 22:42ABENTZEN Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    I see.

    ALL disk must be converted, and the boot disk must be set at IDE in the VM i Hyper-V, the other disk can be set at SCSI.

    This was very helpful and saved me for a lot of time googling around.

     

    -Alexander

  • vendredi 17 juillet 2009 19:40brogahn Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    I had some test Virtual Machines on our ESXi server that I wanted to test on Hyper-V, (Version 3 doesnt' give me the correct driver for clustering 2008 Servers). I exported them as a virtual Appliance, and then use the VmWare Standalone Converter to change it to a Workstation  6.5 VM, during that process I had the option to change the Hard Disk to IDE. I then used the vmdk to vhd converted and then opened the Virtual Machine in HyperV - R2...

  • dimanche 19 juillet 2009 05:46Bill GrantMVPMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
      The only thing I would add to that is to remove the VM Tools before you start. See the checklist above by Steen Kirkby.

     
    Bill
  • jeudi 23 juillet 2009 11:37elminster13 Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    I have been trying to get this going for a while without success. i followed your advice but when I start the VHD in virtual PC (im on the move at the moment and can't use my hyper-v server) i get the following message;
    "Reboot and select a proper Boot device
    or insert boot media in selected boot device"

    any ideas? or must i use hyper v?
  • samedi 28 novembre 2009 05:11Manoj Batchu Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Thanks Steen for your step by step process. Even we have both VMware and Microsoft Hyper V platforms setup. I want to convert a VMware .vmdk file to vhd file....................... I tried with the Vmdk2Vhd utility, but it is throwing me a error "Invalid Vmdk file, please select another"..

    I am using VMWare ESX 3.5, please help
  • samedi 28 novembre 2009 08:12Mike Pfeiffer Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    I recently converted some vmdk files to vhd using this tool:

    StarWind (V2V) Converter
    http://www.starwindsoftware.com/converter

    It's free and it worked well.
  • il y a 3 heure(s) et 59 minute(s)Hockeytown Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    I've created an OS X Leopard VM in VMware and I am wondering if the processes in this thread will work to convert this VM to be usable in Hyper-V? I was not able to find a way to create an OS X VM directly with Hyper-V? Has anyone tried what I am proposing to do and were you successfull at it?