none
VM Folder cannot be renamed? RRS feed

  • Question

  • Hi,

    All my hyper-v vms are stopped and located in c:\vm.

    I made a backup (copy) this afternoon of directory c:\vm\ad (holding a vm) to a NAS. The vm was turned off.

    Now I made mistake and want to revert to my backup.

    Problem: After restoring the folder I can't start the vm:

    [Window Title]
    Gestionnaire Hyper-V

    [Main Instruction]
    Une erreur s’est produite lors de la tentative de démarrage des ordinateurs virtuels sélectionnés.

    [Content]
    Échec du démarrage de 'AD'.

    Synthetic SCSI Controller (ID d’instance 741D1FE9-E428-4A2C-A2EF-B066392F82CE) : échec de la mise sous tension avec l’erreur « Erreur d’accès général refusé ».

    Le compte  ne dispose pas des autorisations nécessaires pour ouvrir la connexion C:\VM\AD\AD\Virtual Hard Disks\AD_90BABAC1-A93C-47AA-A530-86B130C38E63.avhdx. Erreur : Erreur d’accès général refusé.

    [Expanded Information]
    Échec du démarrage de « AD ». (ID d’ordinateur virtuel AC6267AA-B4B4-43C2-ABFF-BFF6DC8888D9)

    « AD » Synthetic SCSI Controller (ID d’instance 741D1FE9-E428-4A2C-A2EF-B066392F82CE) : échec de la mise sous tension avec l’erreur « Erreur d’accès général refusé » (0x80070005). (ID d’ordinateur virtuel AC6267AA-B4B4-43C2-ABFF-BFF6DC8888D9)

    AD : le compte  ne dispose pas des autorisations nécessaires pour ouvrir la connexion C:\VM\AD\AD\Virtual Hard Disks\AD_90BABAC1-A93C-47AA-A530-86B130C38E63.avhdx. Erreur : Erreur d’accès général refusé (0x80070005). (ID d'ordinateur virtuel AC6267AA-B4B4-43C2-ABFF-BFF6DC8888D9)

    [V] Voir les détails  [Fermer]

    Any hint?

    Thanks.


    I tried to import the vm. It didn't work:

    [Window Title]
    Assistant Importation

    [Main Instruction]
    Hyper-V a rencontré une erreur lors du chargement de la configuration d’ordinateur virtuel à partir de \\NAS29F517\Public\AD\AD\Virtual Machines\AC6267AA-B4B4-43C2-ABFF-BFF6DC8888D9.vmcx.

    [Content]
    Échec de l’importation. La tâche d’importation n’a pas réussi à copier le fichier.

    [Expanded Information]
    Échec de l’importation. La tâche d’importation n’a pas pu copier le fichier de « \\NAS29F517\Public\AD\AD\Virtual Machines\AC6267AA-B4B4-43C2-ABFF-BFF6DC8888D9.VMRS » vers « C:\ProgramData\Microsoft\Windows\Hyper-V\Planned Virtual Machines\AC6267AA-B4B4-43C2-ABFF-BFF6DC8888D9.VMRS » : Erreur d’accès général refusé (0x80070005).

    [^] Masquer les détails  [Fermer]

    Alain Bourgeois



    Saturday, July 20, 2019 4:56 PM

All replies

  • This tool may help you know what holds the lock.

    https://docs.microsoft.com/en-us/sysinternals/downloads/handle

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Saturday, July 20, 2019 5:07 PM
  • I found what holds the lock. If I stop The hyperv service from hyperv manager I can put folder back in place. However I cannot restart vm!!!!!

    Alain Bourgeois

    Saturday, July 20, 2019 5:26 PM
  • I'd try creating a new VM with an identical configuration, then when you get to step Connect Virtual Hard Disk choose Use an existing and point to the backup VHD.

     

    (please don't forget to mark helpful replies as answer)

     

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.


    Saturday, July 20, 2019 6:14 PM
  • The issue is that the VM doesn't have correct permissions to access the VHD now you've copied it back.

    Have a look at this Microsoft KB article on how to resolve the issue by applying the correct permissions: https://support.microsoft.com/en-ca/help/2249906/hyper-v-virtual-machine-may-not-start-and-you-receive-a-general-access

    Or you could try the script here that should do it for you: https://www.altaro.com/hyper-v/free-script-fixing-hyper-v-folder-security/

    In future, if you're making changes, rather than copy out the whole VM, try using Checkpoints. They're much faster to roll back and use less space.

    Or if you need backups, have a look at something like Veeam, which has a free community edition for protecting up to 10 VMs. If automates the backup and restore tasks so that permission issues like this don't happen.


    Cheers, Ben Thomas Microsoft Certified Professional Microsoft MVP Cloud and Datacenter Management Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Sunday, July 21, 2019 4:12 AM
  • Meanwhile I found how to.

    I have to copy files in place on the local hard disk, then in Hyperv import vm from local hard disk. The hyperv import doesn't copy files, it just registers them.


    Alain Bourgeois

    Sunday, July 21, 2019 6:43 AM
  • Hi ,

    >>I have to copy files in place on the local hard disk, then in Hyperv import vm from local hard disk. The hyperv import doesn't copy files, it just registers them.

    Thanks for your posting here and sharing the resolution in the forum as it would be helpful to anyone who encounters similar issues.

    If there is anything else we can do for you, please feel free to post in the forum.

    You could mark the useful reply as answer if you want to end this thread up.

    Best Regards,

    Candy



    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   

    Monday, July 22, 2019 3:00 AM