Need a Server? Build it in the cloud for free

       

Blue Screen Booting to VHD–You May Be Out Of Space On The Underlying Drive

When you are using Boot to VHD you must have enough capacity on the underlying disk to fully expand the VHD. If you do not have enough capacity you will get a blue screen (aka Screen of Death). If you have this problem, try booting to a windows 7 or windows Server 2008 DVD. When you get to the first screen (asks for keyboard) press Shift-F10 to drop to a command prompt. Look for the underlying drive…

Dir c:

Dir d:

dir e:

dir f:

etc… until you find the underlying drive. Once you find the drive, make sure the VHD file is not read only using the attrib command

Attrib e:\path\filename.vhd

If there is an “R” to the left of the file, you will need to change it using the following command…

Attrib e:\path\FileName.vhd –R

Why would it be read-only? Looks like windows may mark it as read-only if a boot fails due to out of disk space? If it was not read-only, look for files on that physical drive you can delete (you may also want to have an extra USB drive plugged in so you can move the files to that USB drive instead of deleting).

Using Diskpart you can (usually) mount the VHD to manipulate the contents of the VHD. You can confirm that the capacity available on disk is the problem. If you cannot mount using disk part (you get “access denied” message)

Commands to mount… from the command prompt

Diskpart <ENTER>

This will launch DiskPart utility. You will need the drive letter, path and filename of your VHD file. you can get this by doing a series of dir commands as indicated above. replace the drive, path and filename of your vhd file in the command below. You can eliminate the path if it is on the root of the drive… At the DISKPART> prompt…

Select VDISK FILE=E:\MyPath\YourFileName.vhd << This opens the VHD (full drive and path to the file are required)

LIST VDISK << This lists the drive. The * means it is selected

ATTACH VDISK << if you get Access is denied the disk cannot be expanded

Exit << Exit from diskpart utility

 

If you have confirmed you cannot mount the disk, you will have to change the size of the vdisk or move some files off the underlying disk to get the machine to boot.

Another Tip… You can open two (or more) command windows at the same time by clicking on the background installation screen and pressing Shift-F10 again. This way you can be at a command prompt and in diskpart at the same time.

Yet Another Tip… You can run bcdedit from the command prompt to list all all of the boot configuration data which may help you find the drive and path of your vhd.

Happy Hunting Smile

  • rainer
    30 Aug 2011 7:19 AM

    Hi!

    I have a question for really experts.

    I boot directly from vhd (windows 7 ultimate) without any other system installed. I divided my hdd 320 gb into two partitions/volumes 100 gb and 197 gb

    (remaining place 23 gb may be used by fat). the vhd was set to (i do not remember in detail) – i think – to 97 gb. after some updates for windows the blue

    screen of death appeared with “VHD you must have enough capacity on the underlying disk to fully expand the VHD”. so i did a look on the facts. booting with

    dos showed me the the vhd is about 18 gb large. i changed the two volume sizes with acronis disk director suite to 150 gb and 147 gb. after that the pc

    started up normal without blue creen of death. then i opened the windows explorer and look at the free and occupied space of the started vhd and the two

    volumes. and here i found something very interesting:

    started vhd: free 78,4 gb /total 95,7 gb which compares to 100.000.000 mb which had to be set in diskpart

    volume 1: free 47,5 gb / total 148 gb

    volume 2: free 142 gb / total 149 gb

    now my question: under dos the vhd only occuppy 18 gb which expand after starting from it to the set 95,7 gb,. that is ok. but on volume 1, where the vhd

    lies, the started vhd uses 100,5 gb (148-47,5=100,5)!!! and 100,5 gb is larger than my set 100 gb for volume 1. that should be the reason for the blue

    screen. but what i not understand is:

    why expand the vhd over 100 gb when there is only 18 gb occupied under dos. i expected that the vhd file expands when the 95,7 gb runs full, not that it

    expands when nearly 80 gb are free in the vhd. can someone explain this because this is not the purpose of a vhd?

    another questions is: where are the 4,8 gb, difference between 100,5 gb (if vhd is startet, occupied on volume 1) and the shown size of 95,7 gb of vhd in

    windows explorer? or i misunderstood something or mismatch some figures.

    if someone can explain me this facts this may help a lot of other people to set the size of the vhd more sensible.

    with kind regards

    Rainer

This entry was posted in Uncategorized and tagged , , , , , , , by Dan Stolts ITProGuru. Bookmark the permalink.

About Dan Stolts ITProGuru

Dan Stolts (The "ITProGuru") is a technology expert who is a master of systems management and security. He is proficient in many Microsoft products especially in the server area (Windows Server, System Center, Exchange, SharePoint, Virtualization, Etc) and holds many certifications including MCT, MCITP, MCSE, TS, etc. Dan is currently specializing in System Management and Security and is also very passionate about virtualization technologies. Dan is and has been a very active member of the community. He is president of Boston User Groups, Founder of Virtualization Group Boston, Founder of North East Leaders and serves on many IT Community group boards. He is in the process of writing his first book on building technology communities. He is a believer in social networking and can be reached on twitter @ITProGuru. He has participated in many non-technology community groups such as: Rotary Club, Lions Club, local Chambers of Commerce and is a mentor for the local high schools. Dan is an enthusiastic advocate of technology and is passionate about helping others. Dan's lifelong passion has been and continues to be to help and teach others!

Leave a Reply