Showing posts with label Failed. Show all posts
Showing posts with label Failed. Show all posts

Friday, November 5, 2010

Hyper-V Virtual Machine Failed to Start after Copying VHD

Hyper-V Virtual Machine Failed to Start after Copying VHD


On Windows Server 2008 R2 running Hyper-V, I copied a VHD to an external drive using Windows Explorer. After compacting the drive, I copied the VHD back to its original location and tried to start the virtual machine. I got a long message telling me that the virtual machine failed to start due to an access denied error.


The Message

Here are the important bits of the message, along with the corresponding event IDs in the Hyper-V-Worker Admin event log:



‘VM01’ failed to start.


Microsoft Emulated IDE Controller (Instance ID {…}): failed to Power on with Error ‘General access denied error’ (0×80070005). [Event ID 12010]


IDE/ATAPI Account does not have sufficient privilege to open attachment ‘D:\Virtual Machines\VM01\Virtual Hard Disks\DRIVE01.VHD’. Error: ‘General access denied error’ (0×80070005). [Event ID 12290]


‘VM01 failed to start. (Virtual machine ID 6B78D45F5-71DF-4725-B4B2-E651800BE80EF) [Event ID 12030]


Okay, so I understand that it can’t access the VHD file. But what is the “IDE/ATAPI Account”? I see no such account in the list of available users and groups when I try to modify the VHD file’s permissions using the GUI. What I do see, when I examine the permissions of a working VHD, is what looks like a GUID as a user name with Read and Write permissions:


Hyper-V VHD Permissions GUI

Virtual Machine SID

It turns out that the virtual machine’s unique identifier (SID) actually needs direct access to the file. The details are in this Microsoft knowledge base article:


Hyper-V virtual machines may not start, and you receive an error: “‘General access denied error’ (0×80070005)”
http://support.microsoft.com/kb/2249906

Update the Permissions

The solution is to give the SID Full control of the VHD using the command line.


Tip: Rather than type (or mistype) the SID by hand, cut and paste it from the event log message or from the XML file name in the Virtual Machines folder.


The command:


icacls /grant "NT VIRTUAL MACHINE\":F


Note that there is no space before the :F. For example:


icacls "D:\Virtual Machines\VM01\Virtual Hard Disks\DRIVE01.VHD" /grant "NT VIRTUAL MACHINE\6B78D45F5-71DF-4725-B4B2-E651800BE80EF":F


Once that permission has been added, you should be able to start the virtual machine.

Thursday, November 4, 2010

Hyper-V Failed to Compact VHD

Hyper-V Failed to Compact VHD | MCB Systems office 619-523-0900
toll-free 888-4-MCBSYS
toll-free 888-462-2797MCB SystemsYour Small Business Technology Specialist HomeServicesServices OverviewProactive I.T. ServicesMCB Proactive WatchMCB Proactive CareI.T. Services ComparisonI.T. Services Case StudySoftware ServicesCustomization Case StudyProgramming Case StudyConsulting ApproachAboutContactBlogUser BlogTech Blog Home \ Tech Blog \Hyper-V Failed to Compact VHD Hyper-V Failed to Compact VHDMark BerryOctober 8, 2010

On Windows Server 2008 R2 running Hyper-V, I’m trying to compact a (dynamically expanding) VHD on an external hard drive (USB drive, NTFS format). The drive is 59GB and there is 103GB free on the drive. I keep getting the message, "The system failed to compact .VHD. Error code:  The requested operation could not be completed due to a file system limitation." Why can’t I compress the VHD?

In the Hyper-V-Image-Management-Service Admin log, we have Event ID 15054:

Log Name:  Microsoft-Windows-Hyper-V-Image-Management-Service-Admin
Source:  Microsoft-Windows-Hyper-V-Image-Management-Service
Event ID:  15054
Level:  Error
User:  SYSTEM
Description:  ‘The system failed to compact ‘F:\.VHD’. Error Code: 2424869

I thought maybe the physical drive was too fragmented, but a defrag ran quickly and made no difference.

This blog post provides the answer:  the VHD contains VSS shadow copies. (It’s a Server 2003 with Volume Shadow Copies enabled.)

Start up the virtual machine and log on to the guest. Run vssadmin list shadows to check for shadow copies. Run vssadmin delete shadows /all to delete the shadow copies. Then shut down the virtual machine guest and try compacting again.

Tags: hyper-v
This entry was postedon Friday, October 8th, 2010 at 4:28 pmand is filed under IT Administration.You can follow any responses to this entry through the RSS 2.0 feed.You can leave a response, or trackback from your own site. Leave a ReplyClick here to cancel reply.
Name (Required)
E-mail (will not be published) (Required)

Website

About

Welcome to the Tech Blog!

MCB Systems is a San Diego-based provider of information technology and software services.

We are based in Point Loma, close to downtown San Diego, Ocean Beach, Pacific Beach, and Mission Valley.

This Tech Blog is geared towards I.T. professionals, but end users may be interested to glimpse what goes on "behind the scenes" in keeping their computing environments stable and secure. A User Blog is also available.

Mark BerryBlog author Mark Berry owns MCB Systems.

Contact MCB Systems.

Recent PostsHow to Repair the SBSMonitoring Database Where to Find CHKDSK Results VSS Errors While Formatting Drive PowerEdge 1500SC: Bogus Memory and Linux Errors Activate Windows 7 Enterprise with a MAK Key – GUI Method Windows 7 UAC Blocks DRAC II Web Console Hyper-V Virtual Machine Failed to Start after Copying VHD Hyper-V Failed to Compact VHD How to Duplicate Administrator Permissions on Server 2008 R2 Reset Roaming Profile and Folder Redirection Permissions SubscribeSubscribe to the MCB Tech Blog with RSSApply to be a Chitika Publisher!