Monthly Archives: March 2009

Citrix eDocs – online documentation

This one is just for reference.  Citrix has published a much more interactive model for finding documentation.  On the support site is a web-hosted documentation system.

Navigation is much easier and it looks like all the products are included.  It should be easier than having to download pieces or looking at printed copies.  It even supports searching.

Fast Creation for Fixed Size VHD

Search, and you shall find.  One of the many problems of dealing with VHDs is that they can take ages to create.  More specificly, the fixed VHDs can be very slow.  This is due to clearing the entire VHD with zeroes.  Creating any file that is gigabytes long is bound to be painful.

The Virtual PC Guy (Ben Armstrong from Microsoft) has come up with a solution.  It entails not zeroing out the file and creating the VHD footer at the end.  Very fast and just what most people want.  The only concern is security related to the VHD claiming deleted data since it was not cleared.  For most people this would not be a major concern under certain conditions (like a new disk).  However, this sounds like more a file system problem.  When files are deleted, they should be cleared then.  There might even be a NTFS option to do this.  Let me know, please?

Virtual PC Guy has also been nice enough to provide the binary and source for his tool.  This is a very kind gesture and I say thanks.

VHD Snapshots Revealed

Microsoft produced a series of videos about Hyper-V last year from the Program Managers.  Based on recent investigations, I found a good explanation of how snapshotting works.  The VHD snapshotting video is a bit casual but captures the essence of the engineering design.  

The implementation does seem a bit rough in places compared to competing products.  Persistence will pay off.

My overall biggest concern is that the snapshotting mechanism should have built into the VHD spec.  Currently the implementation is expressed as code that manipulates VHDs for the purpose of snapshots.  The difference is subtle but enough to make this a Hyper-V only way of looking at things.  Unfortunately this will lead to other vendors to consider doing their own snapshotting technology around the weakness of the native VHD format.

VHD Documentation for Windows 7

If you look hard enough on the web, you are bound to find something good. It might not be what you started with but the distraction is worth it.  This time it is the official “unofficial” documentation from Microsoft for Windows 7 for VHD support.  This is key information about how to program to the VHD subsystem which is built into Windows 7.  

There is a great summary about Win7 VHD and here is the diagram from that section:

Don’t miss the actual API reference.  Key in mind that Microsoft is allowed to change the API before shipping Windows 7 but after that it is set in stone.  They have tried hard to match it up with the existing Windows API model so it should be very comfortable to most of you.

There are not that many API overall but some of them sound very promising.  For example, there are APIs related to creating new VHDs, compacting existing ones, and merging child VHDs with parents.  It also has the ability to grow VHDs apparently.

All this was brought to my attention by LeeL at work by referring me to an article about using the new VHD API with Windows 7.  This article brings it all together and shows examples of how to use the new API.  Things are moving along quickly with Windows 7 and the VHD support.  It’s good to see this much focus being put on VHDs for the sake of better management and flexibility.  The easier it is to manipulate, the easier it is to deploy and use.

ICA File Setting Reference

Lately there are only posts if I find interesting information.  This time it was the rediscovery of the ICA File Setting Reference.  This guide includes the explanation of what the different fields mean.  I had forgotten how DesiredColor worked.  It was easy to see the values once found.

This is mostly good for administrators trying to debug connections or just the curious out there.

Windows Virtual Memory Explained

Mark Russinovich certainly knows his stuff.  He has posted a blog from late last year about “Pushing the Limits of Windows: Virtual Memory“.  Again, I was searching for stuff related to pagefiles and found this highly technical information about how Windows memory works.

It is possible to figure out the best pagefile size from this article but it is more of an art than a science:

So how do you know how much commit charge your workloads require? You might have noticed in the screenshots that Windows tracks that number and Process Explorer shows it: Peak Commit Charge. To optimally size your paging file you should start all the applications you run at the same time, load typical data sets, and then note the commit charge peak (or look at this value after a period of time where you know maximum load was attained). Set the paging file minimum to be that value minus the amount of RAM in your system (if the value is negative, pick a minimum size to permit the kind of crash dump you are configured for). If you want to have some breathing room for potentially large commit demands, set the maximum to double that number.

You will need to understand the basics of virtual memory and commit limit before it will start to make sense.  In general it helps to overestimate but not necessarily too much.  As memory grows to be several GB, it make good sense to not use the old formulas and instead focus on what would really be useful.  Otherwise you will end up wasting GB of space on your disk for a pagefile that does not need to be that big.

VHD FAQ

Microsoft has published a new FAQ on VHDs. There is some surprising information in here and it is very recent.  There are guidelines for using VHDs with Windows 7.

It was unexpected advice to use Fixed VHDs.  The reasons sound good but at the same time very wasteful.  It might be more from the angle of supporting a local non-virtualized Windows.  Dynamic VHDs would make more sense in a data centre where the power and disk space is highly managed.

I searched for subjects related to pagefiles and found this gem.  The interesting news with mounted/booted VHD drives in Windows 7 is:

 

Are paging files supported in VHDs, and doesn’t that affect the performance of systems using native VHD boot?

Windows does not support locating paging files on virtual disks of attached VHDs. This would include pagefile.sys, hiberfile and crashdump files. Native VHD boot performance would not meet our system responsiveness goals if the paging file were located inside the VHD. If Windows 7 starts using native VHD boot, the operating system locates space on the host volume outside the VHD file for a paging file. The paging file can be approximately 2-4GB or more in size, depending on how much physical RAM memory is configured on the system. Plan the host volume free disk space to support the VHD file and paging file required for native VHD boot. If the host volume for the VHD does not have enough free space for a paging file, Windows attempts to locate the paging file on another volume with sufficient free space available. Note that when Windows is running in a Hyper-V virtual machine, a paging file is created inside the VHD because the virtual disk is used as a normal system volume.
 

VHDs seem to be gaining traction having been used extensively by Microsoft and also documented.