none
Importing and exporting VM

    Question

  • i want to export virtual machine and then import it to another server. i want to use same configuration file as previous is it possible???
    Saturday, September 25, 2010 4:17 AM

Answers

  • Hi

    if I understand you correctly then "yes you can" :-)

    "....i want to export virtual machine and then import it to another server. i want to use same configuration file as previous is it possible???..."

    When you have the OS sysprepped and exported afterwards you can always create a copy of this MASTER image and use all times the same configuration file (import->copy). I think the important thing here is the VM Guid and MAC adresses which can be new created during the import.

    1. Prepare OS and Sysprepped (shutdown)

    2. rename VM name a.e. "Master-W2K8R2" and export to a MASTER location -> d:\MASTER

    3. copy these files to Hyper-V server where you want to import this VM

    4. Hyper-V manager -> Import VM-> copy the VM (create a new unique ID)

    NOTE: you cannot use "move or restore VM (use existing unique ID) more than 1 time on the same host!

    of course these are high level steps ;-)

    Please correct me if this is not your scenario.

    PS: also have a look at -> http://social.technet.microsoft.com/wiki/contents/articles/hyper-v-how-to-find-vm-files.aspx & http://support.microsoft.com/kb/968968/en-us 

    Regards

    Ramazan

    Sunday, September 26, 2010 6:54 PM

All replies

  • Hi.

    If you do an export of your vm, your vm configuration file will be included.

    The export process will gather all the vm-spcific files (vhd files, xml configuration files, and snapshots) into the target folder, and creates a folder with the exact name of the vm.

     

     


    Kristian
    Saturday, September 25, 2010 5:14 AM
  • yes u r ryt but when we importing the VM to other server config.xml changes. all configuration will change. i want to use same xml file.
    Saturday, September 25, 2010 8:43 PM
  • Why do you want to use the exact same xml file ?

    Perhaps you could try these steps : http://srvcore.wordpress.com/2010/01/15/how-to-recover-hyper-v-virtual-machine-manually-unsupported-ways/

    But still, I would like to recommend the export/import in Hyper-V-manager.

     


    Kristian
    Sunday, September 26, 2010 6:12 PM
  • Hi

    if I understand you correctly then "yes you can" :-)

    "....i want to export virtual machine and then import it to another server. i want to use same configuration file as previous is it possible???..."

    When you have the OS sysprepped and exported afterwards you can always create a copy of this MASTER image and use all times the same configuration file (import->copy). I think the important thing here is the VM Guid and MAC adresses which can be new created during the import.

    1. Prepare OS and Sysprepped (shutdown)

    2. rename VM name a.e. "Master-W2K8R2" and export to a MASTER location -> d:\MASTER

    3. copy these files to Hyper-V server where you want to import this VM

    4. Hyper-V manager -> Import VM-> copy the VM (create a new unique ID)

    NOTE: you cannot use "move or restore VM (use existing unique ID) more than 1 time on the same host!

    of course these are high level steps ;-)

    Please correct me if this is not your scenario.

    PS: also have a look at -> http://social.technet.microsoft.com/wiki/contents/articles/hyper-v-how-to-find-vm-files.aspx & http://support.microsoft.com/kb/968968/en-us 

    Regards

    Ramazan

    Sunday, September 26, 2010 6:54 PM
  • The export takes a long time since it will copy the VHD. If your VHD file is large, the export takes longer

    If you are using fixed size VHDs, you may want to use the free trial version of vhdcopy at vmutil dot com - will shorten the time for export

    Import is very fast


    www.msftmvp.com and VHD tools at www.VMUtil.com
    Tuesday, September 28, 2010 11:31 PM
  • Ramazan,

    Is the method you described applies to Windows Hyper-v server (NOT windows server 2008 r2 with hyper-v)? I used Hyper-v manager on a remote server to execute export-import on the host Hyper-v server.

    When I tried, I got warning saying "Import completed with warnings. Please check the Admin events in the Hyper-V-VMMS event log for more information."

    I see following errors in  Hyper-V-VMMS (under Event Viewer-> Application and Services Logs ->Microsoft -> Windows) event log.

    Log Name:      Microsoft-Windows-Hyper-V-VMMS-Admin
    Source:        Microsoft-Windows-Hyper-V-VMMS
    Date:          5/13/2011 12:43:01 PM
    Event ID:      18430
    Level:         Error
    Keywords:     
    User:          SYSTEM
    Description:
    Import task failed to fix up connection information for connection 'C:\Windows\system32\vmguest.iso'.
    --

    'Sp10FarmServer': The file name '' is invalid. You cannot use the following names (LPTn, COMn, PRN, AUX, NUL, CON) because they are reserved by Windows. (Virtual machine ID E2479D68-AC4A-4C8D-AF12-4E6553F5580A)

    <What Should I've selected as folder in "Import ..." dialog box?>

     

    --

    'Sp10FarmServer' failed to add device 'Microsoft Virtual CD/DVD Disk'. (Virtual machine ID E2479D68-AC4A-4C8D-AF12-4E6553F5580A)

    --

    Failed to import correctly the device '{ResourceType=21, OtherResourceType="<null>", ResourceSubType="Microsoft Virtual CD/DVD Disk"}' for 'Sp10FarmServer' (Virtual machine ID E2479D68-AC4A-4C8D-AF12-4E6553F5580A). Error: Invalid parameter (0x80041008) .

    --

    Log Name:      Microsoft-Windows-Hyper-V-VMMS-Admin
    Source:        Microsoft-Windows-Hyper-V-VMMS
    Date:          5/13/2011 12:43:01 PM
    Event ID:      18250
    Level:         Error
    User:          SYSTEM
    Description:
    Import completed with warnings. Please check the Admin events in the Hyper-V-VMMS event log for more information.

    ----

    Are those errors critical in nature. Should I have set DVD drive to None before exporting the original VM?

    I've started the machine and it appearts to be working fine. No error in system log but two errors in the event log as follows:

    - Installation of proof of purchase failed .... (Security error)

    - Event filter with query ... (WMI error)

    Friday, May 13, 2011 6:18 PM