16 September 2010

Disk management options missing from SCVMM hardware configuration

I recently had an interesting experience.  One of my Hyper-V machines was running low on disk space.  I wanted to expand the disk so that more space was available.  However when I looked at the machine properties I found that the disk management options weren't grayed out - they were missing all together.

So this got me looking into the different states of the machines and how they affect the GUI the I see.

When a virtual machine is running you would normally see this screen when looking at the disk properties.

This is expected since the machine is currently running.  If you shut the machine down the options become available.

When I looked at my low disk virtual machine I was somewhat surprised to see this. Or should I say not see what I am looking for.

Interesting enough this also was the view when the machine was shut down.  I figured  - let me check it out in Hyper-V manager.  This is what I saw:

"Do not edit a virtual hard disk when it is used by a virtual machine that has snapshots, or when it is associated with a differencing virtual hard disk."

Now it makes sense.  It would have been handy / nice to have this same warning in SCVMM.   The other odd thing that struck me is the reported disk usage. According to this there should still be 10+ GB of space left.  I log onto server to check it out. And there is 120MB of free disk space left.

I also have the Self service portal available to the server owners.  If the log in they see the hard drive only being 1GB

So I figure the only thing to do is to remove the checkpoint and then expand the disk.  I remove the check point and shut the machine down.  But still there are no option in SCVMM.  This is because the disk merge is currently happening.  The Hyper-V manager will tell you this -SCVMM does not. 

If you check out the file structure for the virtual machine you will still see that there is a .vhd file and a .avhd file.  The .avhd file will only disappear once the merge is complete.  This can take a while sometime a longs while.  It is therefore handy to have a place where you can check on the progress of the merge.  One other thing I have noticed.  Sometimes it appears that a restart and shutdown are required to force the merge to happen.

Finally after the disks are merged you can perform your normal disk management options.

The moral of the story is what everyone keeps saying about snapshots and checkpoints.  They are a really handy feature if used correctly, but they do come with penalties.  Don't use them unless you have to.

No comments:

Post a Comment