Using BGInfo to help determine VM Guest partition alignment (Starting offset and allocation unit size)

Posted on Updated on

We use BGInfo quite a bit to help us with basic VM guest information (IP Address, name, HD Space, etc)

Today I was thinking about the partition alignment (Starting offset and allocation unit size) on my Windows guests and wondered about their alignment.

There are programs made for this, some are quite good, but it wouldn’t be more convenient to have it come up with BGinfo?

I thought it would be especially handy because we have multiple templates some are aligned differently, and I could use this as a double check to those programs which correct this issue.

By adding the Starting Offset and volume block size(aka allocation unit size) to our BGinfo.bat file we can now see how are VM guest partitions are aligned!

From this screenshot we see 3 Volumes..

C: has a 32K Offset / 4K Allocation | D: 64K offset / 32K Allocation | E: 64K offset / 4K Allocation

The only volume that is optimal is our D: volume, the rest need some work…

Want to know more about alignment?

Go here >> and here >>

Here’s how to setup BGInfo…

  1. Download BGInfo from sysinsterals
  2. Create your *.bgi file (this file contains all the fields you want displayed, see below for the offset)
  3. Create a simple batch file to launch your *.bgi file on logon
  • @echo off
  • cd\
  • CALL “C:\Files\bginfo.exe” “C:\Files\YOUR.bgi” /timer:0 /nolicprompt


  1. Place all the files in a simple folder like c:\Files
    1. Files Needed
      1. Bginfo.exe
      2. YOUR.bgi
      3. Startbgi.bat
  2. In Windows 2003 – Copy Startbgi.bat into “c:\Documents and Settings\All Users\Start Menu\Programs\Startup”

Every time you logon to the server, bginfo will launch and update your background with useful information..

Once you have created your basic *bgi file, then it’s time to add the WMI Query for Starting Offset and volume block size(aka allocation unit size)

  1. In BGInfo click on Custom, then New, Enter a name under Identifier, Choose WMI Query, then click on Browse
  2. Under WMI Class Choose Win32_DiskPatition and under Class Property choose StartingOffset
  3. Save it up and add it to your *.bgi file

Follow the same steps as above only this time…

Under WMI Class Choose Win32_Volume and under Class Property choose BlockSize (aka allocation unit size)

I hope this works for you as well as it did for me!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.