none
Moving virtual machine cross Windows 8 / Windows Server

    Question

  • Hi,
    I have Windows 8 desktop PC with a lot of RAM, and my idea is test something on my laptop, and then move virtual machines (not just VHD) to physical server machine.
    On Windows 8 I can see these folders for Hyper-V settings:
    Virtual Hard Disks: C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks
    Virtual Machines:   C:\ProgramData\Microsoft\Windows\Hyper-V

    I want to be 100% sure that my desktop-created virtual machines should be exported on server. What should I export on laptop, which folder from 2 above or both of them? Or do you suggest me other folder structure for hyper-v settings on my laptop?

    Second question:
    - when I import virtual machine on server, should it save all settings?
    - can I import virtual machines created on Windows 8 to Server 2008 R2 ?

    Thnx!

    Friday, September 21, 2012 11:52 AM

Answers

  • Hi!

    Export/import is the traditional way of moving VMs between Hyper-V servers. When you export a virtual machine it exports Everything, vhd files as well as configuration. Hyper-V 2012 also allow you to fix small things that may differ on hyper-v hosts during import, such as connecting vm to an existing network, if the external virtual network specified in configuration is absent on the new host (no network with that name).

    Importing VMs created in Windows 8 on a Hyper-V 2008 R2 server is not a good idea. Windows 8 and Server 2012 runs a new version (V3) of Hyper-V, which allows you to configure settings that does not exist in previous versions of Hyper-V. The other way around is fine, to import a VM created on 2008 R2 to Windows 8.

    If you must run a VM created in Wndows 8 on an older Hyper-V server (2008 R2), make sure that you are not using the new vhdx format, convert to vhd if you do, and attach it to a new 2008 R2 VM.

    Friday, September 21, 2012 12:19 PM
  • You do not need to convert the current vhd files, WS2012 is capable of using vhd files as well, but you should convert them to vhdx if you want to take advantage of the new features in vhdx.
    • Marked as answer by Marc Lopez Thursday, September 27, 2012 4:15 AM
    Monday, September 24, 2012 11:22 AM
  • new update: VMs doing well! Probably I should have waited to raise all services. However, the question is for existing VMs (created on W2k08R2 and now imported as new VMs machine with used VHD): do I need to convert the disks into VHDX?

    As far as actually the key issue of this topic: the export from WM8 and the import to WS2012 works great and I was very pleased for that!!!! Thanks a lot for your help and advices.
    • Marked as answer by Marc Lopez Thursday, September 27, 2012 4:15 AM
    Tuesday, September 25, 2012 4:58 AM

All replies

  • Hi!

    Export/import is the traditional way of moving VMs between Hyper-V servers. When you export a virtual machine it exports Everything, vhd files as well as configuration. Hyper-V 2012 also allow you to fix small things that may differ on hyper-v hosts during import, such as connecting vm to an existing network, if the external virtual network specified in configuration is absent on the new host (no network with that name).

    Importing VMs created in Windows 8 on a Hyper-V 2008 R2 server is not a good idea. Windows 8 and Server 2012 runs a new version (V3) of Hyper-V, which allows you to configure settings that does not exist in previous versions of Hyper-V. The other way around is fine, to import a VM created on 2008 R2 to Windows 8.

    If you must run a VM created in Wndows 8 on an older Hyper-V server (2008 R2), make sure that you are not using the new vhdx format, convert to vhd if you do, and attach it to a new 2008 R2 VM.

    Friday, September 21, 2012 12:19 PM
  • Hi,

    export on Windows8 was created three folders: Snapshots, Virtual Hard Disks and Virtual Machines. First and third folders are empty, second folder contains .VHDX file. As I understood you correctly, now I can use that "exported folder" to import that VM on Server 2012? Is it OK procedure?

    Well, in 90% I will create VMs on Windows 8 and then export it on server. Server could be 2012 or 2008R2SP1. Question for export on Server 2012 is above, but please provide me advice to convert VHDX to VHD and import it on Server 2008R2.

    Thnx.

    Friday, September 21, 2012 12:42 PM
  • Yes, you can use the "Edit disk" tool in Hyper-V manager, choose the vhdx file and select convert.

    Don't forget to update the integration services when you've imported a VM to another Hyper-V host.

    Friday, September 21, 2012 12:48 PM
  • Do I need to specify the same Virtual network names on all hosts?

    So, for Windows8 to WS2012 move, I will use just Export setting.
    For Windows8 to W2k08R2, I should use Edit disk. my question: what if I move virtual machine few times between Windows 8 and W2k08R2, then I need to Edit disk once from W8 to WS2008, reverting back to VHDX when move back to W8, or is better keep VHD for W8-Server2008 moving?

    Ok, thnx for hint about integration services, but should that keep network seetings or I will lose it?

    Friday, September 21, 2012 1:23 PM
  • Yes, if you know that you will migrate virtual Machines between W8-2008R2, it would definitely save time if you keep it in vhd format, instead of converting back and forth.

    When you attach a vhd to a new VM, the guest OS will most likely detect the NIC as "new hardware", and will have to be configured.

    Friday, September 21, 2012 1:46 PM
  • Mike, a have a problems with procedure moving VM from Windows8 to Server 2008R2. Well, I have did Edit disk, convert VHDX to VHD. New VHD works fine on Windows8. After copying VHD (and whole folder structure) it says: "a server error occured while attempting to import the virtual machine. Can you please help me with that? Can I import machine on Server2008R2 or should I create new VM and attach used VHD?

    Sunday, September 23, 2012 9:54 PM
  • Yes, create a new VM and attach the existing vhd file, don't forget to update the integration services.

    Simply copying the VM folder is not enough to import a VM to 2008 R2, it must be properly exported before it can be imported, and importing a VM created in a later version of Hyper-V into an earlier version of Hyper-V, will most likely always fail.

    Monday, September 24, 2012 5:27 AM
  • "importing a VM created in a later version of Hyper-V into an earlier version of Hyper-V, will most likely always fail." - that is my case. OK, in my scenario I will probably upgrade my host to WS2012.

    When I export VM from Windows 8 to WS2012, do I need:
    - upgrade integrated services everytime on everyside?
    - should export on first side and import on other side will save VM settings?

    That is my last question on this topic, I promise :-)

    Monday, September 24, 2012 8:18 AM
  • You should make a habit of updating integration services inside your VMs whenever they've been migrated to another Hyper-V server, so that they always match the version on the current host.

    Windows Server 2012 Hyper-V does not require that the VM is exported before being imported. It should automatically identify configuration and vhd files available in the VM folder.

    Feel free to continue posting questions and experiment on your own, and you'll soon get the hang of it...

    Monday, September 24, 2012 8:25 AM
  • Ok, you persuaded me, I will replace W2k08R2SP1 to WS2012 on my host TODAY (later in the evening, now need to do backup). then I will test VM created on Windows8 and starting it on WS2012.

    Question: current I have 8-9 VMs created od W2k08R2SP1. When host will be upgraded to WS2012, do I need to do Edit disk on current VMs from VHD do VHDX or
    it is not essential to the daily work? New VMs (created on Windows8 or WS2012 will be on VHDX format).

    Monday, September 24, 2012 11:11 AM
  • You do not need to convert the current vhd files, WS2012 is capable of using vhd files as well, but you should convert them to vhdx if you want to take advantage of the new features in vhdx.
    • Marked as answer by Marc Lopez Thursday, September 27, 2012 4:15 AM
    Monday, September 24, 2012 11:22 AM
  • So, I successfully did a clean install of WS2012 on the same HW where it was Wk08R2. I've created a new VMs and added their previous VHD disks. After several hours of work in the new VMs, I can say that the VMs is obviously slower in operation?! I installed Integration Services on VMs. Can you comment on why the new VMs WS2012 are slower in operation? Perhaps I should have edit the discs in VHDX or ?
    Tuesday, September 25, 2012 3:33 AM
  • new update: VMs doing well! Probably I should have waited to raise all services. However, the question is for existing VMs (created on W2k08R2 and now imported as new VMs machine with used VHD): do I need to convert the disks into VHDX?

    As far as actually the key issue of this topic: the export from WM8 and the import to WS2012 works great and I was very pleased for that!!!! Thanks a lot for your help and advices.
    • Marked as answer by Marc Lopez Thursday, September 27, 2012 4:15 AM
    Tuesday, September 25, 2012 4:58 AM
  • do I need to convert the disks into VHDX?" --- No, you do not need to convert your vhd files, unless you feel the need to do so. It would be a smart move to make use of the new vhdx format, but that is entirely optional.
    Tuesday, September 25, 2012 5:19 AM
  • On a side note about the VHDX format, converting them into VHDX is a necessity if you're using 512e disks or (more than unlikely, but could change) native 4k disks.

    Most server and consumer grade hard drives I've seen made in the past 2 years are using the new 4K sector format which the regular VHD doesn't really scale well on.


    All posted advice may not be all that accurate. As always, test it in a lab before you try my advice! Best of all, the documentation is your friend.

    Tuesday, September 25, 2012 7:25 AM
  • well, I have SATA-II disks originaly formated during W2k08R2 installation. I have checked, both disks are 4k formated. What do you suggest for?
    Thursday, September 27, 2012 4:19 AM