Hyper-V VM Won't Start after File Move

Posted on 2011-03-23
Last Modified: 2012-06-27
I have a Windows 2008 R2 Standard host running Hyper-V with four guests.  I ran out of space on my data drive, so I shut down one guest VM and moved the directory containing all the files for that VM to another drive temporarily.  I then freed up space on the data drive and moved the VM directory back to its original location.  Now when I try to start the VM I get the error:

'Unnamed VM' could not initialize.  An attempt to read or udpate the virtual machine configuration failed because access was denied.

Comparing permissions on the directories with a working VM, I found no differences except the presense of a "Virtual Machines" security group present in the working VM's permissions.  I cannot find this group in either the local machine or the domain.  Can anyone tell me why this is not working and how to find this phantom group?
Question by:jduehmig1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4

Author Comment

ID: 35207895
LVL 15

Expert Comment

ID: 35208334
The phantom group you are referring to, is managed and included in the security by the Hyper-V Manager when the VM is created. You would not be able to add it using security Tab in the properties of the folder.

Author Comment

ID: 35208502
How do I go about getting the VM to start?
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

LVL 15

Expert Comment

ID: 35209596
I am assuming that you only a one VHD and no snapshots in the VM.
You can use the VHD of the Previous VM (i will call it pVM) in a new VM. Create a new VM and attach the VHD of the pVM to this new VM. But you will have to provide configuration (RAM, vCPU, NICs) from scratch. Also since the new VM will have NIC with  a different MAC, therefore when you start the VM, a network card will be detected as new NIC and previous NIC will go hidden. You will have to give it IP address and other info.
In order to avoid issue with VM IP configuration, go into device manager in the VM, go to view drop down menu and select hidden devices. Delete the phantom NIC card if present.
It is advised to save a copy of the VHD before using in the new VM

Hope that helps.

Author Comment

ID: 35214539
Correct, one VHD and no snapshots.  I'm still very confused as to why simply moving the directory and then moving it back would cause this problem.
LVL 15

Accepted Solution

msmamji earned 500 total points
ID: 35215258
Hyper-V uses XML files to keep track of VMs (stored in C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines) and snapshots (stored in C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots). When you moved/restored the folder, the security on folder changed. Hyper-V is now unable to access it because Virtual Machine entity doesn't have right on the folder anymore.
The folders I mentioned also have Virtual Machine in their security settings.

If you wish to move the VM, use the export and import feature.

Author Comment

ID: 35215976
I created a new VM, pointing to the same directory and the same VHD files.  (I was incorrect before.  There are two VHD's with this VM.)  When I tried to start the new VM I got the errors:

Microsoft Emuldated IDE Controller (Instance ID {....}: Failed to Power on with Error 'The process cannot access the file because it is being used by another process.'

Failed to open attachment 'E:\VirtualMachines\NewVM\NewVM.vhd'.  Error: 'The process cannot access the file because it is being used by another process.'

Any thoughts on what is causing this?
LVL 15

Expert Comment

ID: 35216968
Copy the VHD to another directory ... your current VM is still using the VM but unable to access the folder files... so it is still locked.

Author Closing Comment

ID: 35217283
That seemed to do the trick.  Thanks for your help.

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question