none
unable to import from hyper v R2 to 2012

    问题

  • I have succesfully exported a virtual machine from a 2008R2 Hyper-V host and I want to import the VM to a 2012 hyper-v host but I get an error:

    "Hyper-V did not find virtual machines to import from location blahblahblah"

    Not sure why this occuring, I have tried the procedure with more than one VM. I have tried it with different R2 hosts and different 2012 hosts. I am not sure how to start trouble shooting this one.

    Thanks,


    davidh

    2012年11月12日 19:52

答案

  • Hi ,

    This error message might be caused by occur if the registry location of the service account logon password is corrupted. From the history there may be many problems on this host. If you export the vm from Windows Server 2008 R2 and import it on another Windows server 2012 host, does it work? Do yo have any Domain Group Policy applied? 

    Please use Process Monitor to monitor creating new vm process. Download link:

    Process Monitor
    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

    When issue reoccurs, stop process monitor and find Access denied in result. Check if there is any permission issue. 

    Also suggest the following:

    1. Add domain admins group into local server’s administrators group.

    2. Modified the Default Domain Policy (as mentioned below) to grant < Log on as a service > User Right to < NT Virtual Machine\Virtual Machines > group.

    1) On the DC, navigated to c:\windows\sysvol\domain\policies\{GUID for Default domain policy}\machine\microsoft\windows NT\SecEdit folder and edited GptTmpl.inf file.
    2) For the right ServiceLogonRight added "NT Virtual Machine\Virtual Machines" towards the very end and did <gpupdate /force>.

    Thanks. 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    2012年11月29日 12:58
  • Hi Aaron,

    Thanks for the response. I gave up on trying to move the VM's from the old R2 server, I think after all the manipulation they may have become corrupt, so I was trying to simply create a new VM on the 2012 host. I found this blog post (link below) that seemed relative and I tried it and it worked. In a nutshell, using gpedit to modify the local server group policy I added the domain admins group to 'logon as a batch job' (Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Log on as a batch job) and I was then able to create the new VM. Not sure why this is required in 2012 but it works.

    http://rmlinar.net/blog/2012/06/19/cant-create-virtual-machine-in-windows-8-rp-hyper-v-error0x80070569-logon-failure-the-user-has-not-been-granted-the-requested-logon-type-at-this-computer/


    davidh

    • 已标记为答案 DAH69 2012年11月29日 14:51
    2012年11月29日 14:51

全部回复

  • It would have been a little more helpful to specify what 'blahblahblah' was on your system. 

    With 2012, you can import directly.  No longer needed to first export like was required in 2008.


    tim

    2012年11月12日 22:35
  • Hi,

    I did some test, I don’t encounter such issue.

    How your export this VM, and where did you export it, local disk or a network share?

    Hyper-V need read and access permission to folders which store Hyper-V files, check it and make sure Hyper-V host computer account has such permission.

    Also the other thing to check is folder "%ProgramData%\Microsoft\Windows\Hyper-V\Virtual Machines" for symbolic links.  If there is a <SYMLINK> to the <guid>.xml file for the same machine, the import will fail. Delete SYMLINK to resolve the issue.

    If issues still occurs, you may create a new VM on the Windows Server 2012 Hyper-V host, and then use the exported VHD file, you just need to reconfigure the VM.

    And one thing to note is that an exported VM can only be imported one time, unless your copy an exported VM template every time. Once you import the VM, .exp file should be gone, you can’t import it again.

    Check that and give us feedback, provide us more information for further troubleshooting.

    For more information please refer to following MS articles:

    Receive Import failure error on Export/Import of Hyper-V Virtual Machine
    http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/ffd2150b-a986-46d6-bba8-494b13b5130b
    Hyper-V Import\Export question
    http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/95f95113-5501-42d6-a096-d0bdd686a658
    You cannot import a virtual machine by using Hyper-v Manager or System Center Virtual Machine Manager (SCVMM) on a Hyper-V server
    http://support.microsoft.com/kb/968968

    Hope this helps!

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.


    Lawrence

    TechNet Community Support

    2012年11月13日 2:44
    版主
  • blahblahblah is the UNC path to the location where the R2 VM was exported , sorry for the amibiguity.

    davidh

    2012年11月13日 10:46
  • Thank you for your helpful response Lawrence.

    How your export this VM, and where did you export it, local disk or a network share?

    - I used the export option from the R2 Hyper-V manager and I exported to a network share, I input the unc path to this share when I attempted to import (\\server\share\folder)

    Hyper-V need read and access permission to folders which store Hyper-V files, check it and make sure Hyper-V host computer account has such permission.

    - OK, I directly assigned the 2012 computer account full control permissions for the purpose of this test. Unfortunately the import threw the same error.

    Also the other thing to check is folder "%ProgramData%\Microsoft\Windows\Hyper-V\Virtual Machines" for symbolic links. If there is a <SYMLINK> to the <guid>.xml file for the same machine, the import will fail. Delete SYMLINK to resolve the issue.

    - hmm... there were indeed symlinks in this location on the R2 host, I deleted them and retried the import. Again the same error was thrown.

    If issues still occurs, you may create a new VM on the Windows Server 2012 Hyper-V host, and then use the exported VHD file, you just need to reconfigure the VM.

    - I will try this later today after I have had a chance to read the MS articles you reference. I will post my results.

    And one thing to note is that an exported VM can only be imported one time, unless your copy an exported VM template every time. Once you import the VM, .exp file should be gone, you can’t import it again.

    - the VM was previously exported from an older R2 host and imported into the current R2 host. Yesterday, I exported from the current R2 host to a different network location than previous. It is from this location and using this export of the VM that I am now trying to import into 2012. The .exp file does exist in the new location.


    davidh

    2012年11月13日 11:15
  • I tried something different and got a different error.

    When the VM is exported three sub folders are created, ..\VMname\Snapshots, ..\VMname\Virtual Hard Disks, and ..\VMname\Virtual Machines.

    In the 2012 Hyper-V Manager Import wizard there are three basic steps in the process 1) locate folder 2) select virtual machine and 3) chose import type.

    In the locate folder process if I point the import wizard to the Virtual Machines folder (vs. its immediate parent folder, ..\VMname) the wizard progresses past the point where it was failing earlier. I am then prompted to select the virtual machine, and then to choose the import type.

    There are three import types to choose from :

    Register the virtual machine in-place (use the existing unique ID)

    Restore the virtual machine (use the existing unique ID)

    or

    Copy the virual machine (create a new unique ID)

    it does not matter which of these options I choose the wizard throws the following error:

    Hyper-V encountered an error while loading the virtual machine configuration from \\server\share\folder\guid.exp

    Failed to import the virtual machine from import directory \\server\share\folder

    The scope could not be found in authorization store

    Failed to import the virtual machine from import directory \\server\share\folder
    Error: Logon failure: the user has not been granted the requested logon type at this computer. (0x80070569)

    The scope 'f07c29b4-9314-400b-a388-f9cd6e0bfcb9' could not be found in authoriization store.

    After reading the MS article suggested by Lawrence (http://support.microsoft.com/kb/968968) I edited the .exp file as directed in the article and tried again. It still throws an error message but it a little different.

    Hyper-V encountered an error while loading the virtual machine configuration from \\server\share\folder\guid.exp

    Failed to import the virtual machine from import directory \\server\share\folder
    Error: Logon failure: the user has not been granted the requested logon type at this computer. (0x80070569)

    I am not sure what type authentication this is looking for. My user account is a member of the domain adminstrators group. A little confused on this part.

    I have not tried creating a new VM and attaching the .vhd yet. That will be next. At this point I am more curious about this import process and why it is failing. I can see this being a potential production issue in the future as we migrate all our VM's to hyper-v 2012.

    Thanks again guys,


    davidh




    • 已编辑 DAH69 2012年11月13日 16:03
    2012年11月13日 15:59
  • Hi,

    > In the locate folder process if I point the import wizard to the Virtual Machines folder (vs. its immediate parent folder, ..\VMname) the
    > wizard progresses past the point where it was failing earlier.

    We should specify the exported VM root folder, that’s why you encounter above issue.

    > it does not matter which of these options I choose the wizard throws the following error:

    Please check “Effective Permission” on folder \\server\share\folder for your Hyper-V host, make sure the Hyper-V host computer account has proper permission.

    Hyper-V does a lot of operations using local service accounts on the Hyper-V computer.  So the network share needs to have permission granted for both the user account that you are using and for the computer account for the Hyper-V server.

    There is no more extra configuration for that.

    For test reason, you may export the VM through default network share to the Windows Server 2012 local disk, then import the VM from the local disk. Check that and give us feedback for further troubleshooting.

    For more information please refer to following MS articles:

    Exporting to / Importing from a network share
    http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/03/15/exporting-to-importing-from-a-network-share-hyper-v.aspx
    Exporting Hyper-V VMs Over the Network
    http://blogs.technet.com/b/enterprise_admin/archive/2009/11/02/exporting-hyper-v-vms-over-the-network.aspx

    Hope this helps!

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.


    Lawrence

    TechNet Community Support


    2012年11月14日 6:08
    版主
  • For test reason, you may export the VM through default network share to the Windows Server 2012 local disk, then import the VM from the local disk. Check that and give us feedback for further troubleshooting.

    >error thrown - Hyper-V did not fin virtual machines to import from c:\share\folder. and I did assign both the R2 and the 2012 machines full control permissions to the folder before the export. The folders are there from the export including the .exp file. I am baffled and more curious than before now.


    davidh

    2012年11月14日 20:22
  • Hi,

    That’s really stranger issue, I did many tests, but I can’t reproduce your issue.

    > Hyper-V did not fin virtual machines to import from c:\share\folder.

    So the VM was exported to folder “c:\share\folder”? As we discussed above, you should specify root folder of the exported VM.

    Hyper-V in Windows Server 2012 supports all Hyper-V features in Windows Server 2008 R2. Evan you can directly import a VM runs in Windows Server 2008 R2 without export it, just copy its whole VM files to Windows Server 2012.

    You may try copy VM from Windows Server 2012 and then import them. Or you may try Hyper-V migration:
    Migrate Hyper-V to Windows Server 2012
    http://technet.microsoft.com/en-us/library/jj574113.aspx

    If issue still occurs, you can create a new VM and attach the copied VHD file. A virtual machine=VHD + configuration

    For more information please refer to following MS articles:

    Migration of VM from HyperV2 to HyperV3
    http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/357fb89b-aab5-4b0a-bc86-bd17794a51d0

    Hope this helps!

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.



    Lawrence

    TechNet Community Support

    2012年11月15日 7:29
    版主
  • Thanks again Lawrence. I appreciate your patience and persistence with this problem.

    >So the VM was exported to folder “c:\share\folder”? As we discussed above, you should specify root folder of the exported VM.

    Actually I created a share and exported to the share \\server\share\folder, where server is the same as the c:\, I tried importing from both this UNC path and the local drive path. And yes I did specify the root folder.

    I am able to succesfully import this same location into another R2 host but not into the 2012 host. I don't understand that.

    >You may try copy VM from Windows Server 2012 and then import them.

    I tried that this morning. I get this error "Hyper-V did not find virtual machines to import from location c:\Program Data\Microsoft\Windows\Hyper-V\Virtual machines"

    >If issue still occurs, you can create a new VM and attach the copied VHD file. A virtual machine=VHD + configuration

    I copied the .vhd from the R2 machine to the 2012 machine and ran the new virtual machine wizard. At the "connect virtual hard disk" step I chose "Use an existing virtual hard disk", I used the default location c:\users\public\documents\hyper-v\virtual hard disks\testvm.vhd.

    It throws the following error:

    The server encountered an error while creating testvm.

    The operation failed.

    An unexpected error occurred: Logon failure: the user has not been granted the requested logon type at this computer. (0x80070569).

    The operation failed.

    The Hyper-V Virtual Machine Management service enountered and uncexpected error: Logon failure: the user has not been granted the requested logon type at this computer (0x80070569)

    Again, I am working as a domain admin.


    davidh

    2012年11月15日 18:42
  • Hi,

    Error Message: The user has not been granted the requested logon type at this computer, this problem typically occurs when the user does not have the permissions to log on locally on the computer.

    By default, members of the Users group have the ability to log on locally, but an administrator can deny the right to specific user or group accounts. An explicitly denied right always overrides an allowed right.

    This can be caused by either of the following:

    • Neither the user account nor any of the groups it belongs to has been granted the Allow log on locally user right.
    • The user account or one or more of the groups it is a member of has been listed in the Deny log on locally user right.

    Ensure that the user, or a group the user belongs to has the right to log on locally. Ensure that the user, and all groups that the user belongs to, are not denied the right to log on locally.

    Have you tied to restart the Hyper-V host server? Restart it and check the result, you may also try local Administrator account.

    By the way, how your manage Hyper-V in the Windows Server 2012, directly logon or remote management tools?

    For more information please refer to following MS articles:

    Error Message: The user has not been granted the requested logon type at this computer
    http://technet.microsoft.com/en-us/library/cc732593(v=WS.10).aspx
    Windows 8 Hyper-V Virtual Machine Management Service
    http://social.technet.microsoft.com/Forums/lv/winserverhyperv/thread/4b3e7582-dc20-4dcb-8e71-fef9fecce19c

    Hope this helps!

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.


    Lawrence

    TechNet Community Support

    2012年11月16日 5:54
    版主
  • Hi Lawrence,

    Thanks again for the response. At this point I think the VM's themselves may have become corrupt, so I am going to start from scratch and recreate them. I am also going to be out of the office next week so I will not be working on this until the week after but I will pick this back up at that time.

    Thank you again for your help. I'll back in touch in a week.


    davidh

    2012年11月16日 13:57
  • Now I am confused more than ever. I tried to create a new VM and I get this error....

    The Opertaion failed.

    An unexpected error occurred: Logon failure: the user has not been granted the requested logon type at this computer. (0x80070568).

    I am a domain admin so I am not sure what logon type it is looking for.


    davidh

    2012年11月27日 20:15
  • Hi ,

    This error message might be caused by occur if the registry location of the service account logon password is corrupted. From the history there may be many problems on this host. If you export the vm from Windows Server 2008 R2 and import it on another Windows server 2012 host, does it work? Do yo have any Domain Group Policy applied? 

    Please use Process Monitor to monitor creating new vm process. Download link:

    Process Monitor
    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

    When issue reoccurs, stop process monitor and find Access denied in result. Check if there is any permission issue. 

    Also suggest the following:

    1. Add domain admins group into local server’s administrators group.

    2. Modified the Default Domain Policy (as mentioned below) to grant < Log on as a service > User Right to < NT Virtual Machine\Virtual Machines > group.

    1) On the DC, navigated to c:\windows\sysvol\domain\policies\{GUID for Default domain policy}\machine\microsoft\windows NT\SecEdit folder and edited GptTmpl.inf file.
    2) For the right ServiceLogonRight added "NT Virtual Machine\Virtual Machines" towards the very end and did <gpupdate /force>.

    Thanks. 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    2012年11月29日 12:58
  • Hi Aaron,

    Thanks for the response. I gave up on trying to move the VM's from the old R2 server, I think after all the manipulation they may have become corrupt, so I was trying to simply create a new VM on the 2012 host. I found this blog post (link below) that seemed relative and I tried it and it worked. In a nutshell, using gpedit to modify the local server group policy I added the domain admins group to 'logon as a batch job' (Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Log on as a batch job) and I was then able to create the new VM. Not sure why this is required in 2012 but it works.

    http://rmlinar.net/blog/2012/06/19/cant-create-virtual-machine-in-windows-8-rp-hyper-v-error0x80070569-logon-failure-the-user-has-not-been-granted-the-requested-logon-type-at-this-computer/


    davidh

    • 已标记为答案 DAH69 2012年11月29日 14:51
    2012年11月29日 14:51
  • Hi David,

    Yes, we published a quick KB for this. 

    This issue occurs because the NT Virtual Machine\Virtual Machines special identity does not have the Log on as a Service right on the Hyper-V host computer. Usually, the Virtual Machine Management Service (VMMS) replaces this user permission at every Group Policy refresh to ensure it is always present. However, you may notice that Group Policy refresh does not function correctly in certain situations. 

    Starting or Live Migrating Hyper-V virtual machines may fail with error 0x80070569 on Windows Server 2012-based computers
    http://support.microsoft.com/kb/2779204

    Logon Failures Involving Virtual Machines in Windows Server 2012 - Ask the Core Team - Site Home - TechNet Blogs
    http://blogs.technet.com/b/askcore/archive/2012/10/31/logon-failures-involving-virtual-machines-in-windows-server-2012.aspx

    Please help mark this as answered as well for more users can refer to. Thanks a lot. 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    2012年11月30日 3:10
  • Thank you Aaron! great information as always.

    davidh

    2012年11月30日 11:03