Badges

gestaltitbadge

follow-me-twitter

Subscribe to me on FriendFeed

Comments / DISQUS
Feedjit.com

Opting for VMDK Alignment? Options for VMDK Alignment.

It’s inevitable. If you are a virtual infrastructure administrator, architect, or blogger you will eventually talk about VMware VMFS and virtual disk alignment. I’m not going to try to explain the concepts in this post. My goal is to discuss whether to align VMware virtual disks (VMDKs) and what options are available for performing the alignment.

Bottom line is that if you are deploying new VMs from a template you should do so from an aligned master, but VMs created from physical to virtual migrations (P2Vs) present some practical challenges and don’t have to be treated as urgently.

Recommendations

First things first. My interpretation of VMware’s stance on alignment is that they do not advocate aligning every P2V-ed VM to the VMFS due to the administrative effort, disk space requirements, potential VM down time, and in most cases a nominal VM performance increase. On the other hand, it is crystal clear that VMware does recommend always formatting VMFS LUNs with the VI Client and always taking the time to align Gold Image templates so new servers deployed will automatically be aligned.

For reference here’s VMware’s PDF on the topic:

I’ll admit my perspective as a consultant may be a bit different than the normal VI admin. After all, I am mostly involved in the


planning, implementation and migration phases of VMware infrastructure, and I am always limited by the time budgeted to perform a statement of work. Personally, I make it a point to discuss the benefits of alignment in detail with clients (often aided by my storage engineers), but then have to move on after demonstrating alignment only on the gold image template. This leaves the decision to schedule VMDK alignment up to the client during routine outage windows or possibly multiple outages if they have a large environment.

All that being said, understand that the storage device benefits tremendously from the VMFS and VMDK alignment. Especially storage devices that provide other application data to servers outside of the virtual infrastructure. An example would be a non virtualized Exchange or SQL server with FC or ISCSI volumes. Obviously, your VI benefits as well from a storage device that doesn’t have to work as hard.

Options

There are 3 options for accomplishing VMDK alignment that I am aware of.

  • Manually with diskpart or fdisk before adding data.
  • NetApp’s ESX Host Utilities – mbrscan and mbralign
  • Vizioncore’s vOptimizer Pro

Some brief information about these tools and methods:

Diskpart or fdisk

  • Must run from a command prompt on a VMDK before formatting and any data
  • Do not run for boot partitions
  • Step by step process explained in VMware .pdf linked above

NetApp Host Utilities

  • Requires NetApp NOW account to download
  • Requires VM downtime
  • Requires free space on the VMFS LUN equal to the size of the .vmdk + 20% (100 GB .vmdk needs an extra 100 GB for copy made during alignment) 20% is for health of ESX
  • Manual script run on the ESX hosts
  • does not automatically clean up after itself. If you align a 50 GB VMDK there will be a 50 GB copy of the VMDK that needs to be manually removed after completion
  • multiple disk VMs need to have alignment on each VMDK performed separately

I seem to remember reading a blog post or Twitter conversation where it was discussed that the NetApp mbrscan and mbralign tools work for VMs on any vendor’s storage but I could not find a link. I’ve personally never done it, and I question a decision to use these tools in non NetApp environment – especially production. I am eagerly awaiting version 6 of the Host Utilities that will be installed as a plugin to vCenter.

NetApp also has a PDF about alignment.

Vizioncore vOptimizer Pro

  • Requires VM downtime
  • Automated process that can be scheduled
  • Can scan VMs first to determine tool’s total impact
  • For windows VMs only, but does more than alignment – storage reclamation and guest optimization See user guide for more info.
  • Requires VM Tools to be installed
  • Requires VMs have network connectivity to vOptimizer server
  • vOptiizer Pro server can be a VM
  • Doesn’t work with RDMs, open ESX snapshots, or thin provisioned VMs
  • Storage vendor agnostic
  • Only works with ESX 3.0.1 or later and cannot be used with ESXi

There is a vOptimizer Pro demo that provides a great visual of all the features, and you can get a trial version that allows for 2 VM optimizations.

Related Posts

  • Pingback: Posts about Free Trial Posts as of August 5, 2009

  • http://deinoscloud.wordpress.com/ PiroNet

    You are missing a 4th option, migrate your templates to Windows 2008. Disk is aligned by default, boot disk (C:) as well.

    Cheers,

  • Pingback: VMFS Alignment, VMDK Alignment « DeinosCloud

  • http://vmetc.com rbrambley

    PiroNet,

    Thanks. I was not aware that 2008 aligned by default. Do you know if an OS upgrade to 2008 aligns a VM too?

  • Tom

    It would be nice to have a blog post about whether it's possible to convert ESX 3.x thick/pre-allocated disks to thin-provisioned disks. Not everyone has an unlimited storage budget.
    I set up all my current templates as aligned, even the boot disk, it doesn't seem to make any difference except if I ever have to grow the C: drive, hopefully I don't have to do this.
    Also, what is the difference between migrating templates to Windows 2008 vs. an OS upgrade to Windows 2008??
    Thank you, Tom

  • Tom

    Another blog suggestion for someone experienced like you would be on what kinds of things are good to align and when aligning doesn't matter a whole lot.

  • http://deinoscloud.wordpress.com/ PiroNet

    No it doesn't unfortunately…

  • http://vmetc.com rbrambley

    Tom,

    Migrating thick provisioned vmdks to thin in ESX 3.x is a good idea for a post, but in short it would involve having to migrate apps and data to a new VM that had thin disks pre created with vmkfstools. Not exactly a painless migration. Now, if you can migrate to an NFS datastore then VMware Converter can help you via a V2V because new VMs on NFS are thin by default. Of course, you could get your vSphere licenses and upgrade, and then start changing your VMs to thin.

    As far as what kinds of VMs to align – this post touches on that. VMs with heavy I/O are the best alignment candidates and will show the most performance increase. The rest of the VMs will not show significant performance increase, but once all aligned as a group will reduce the amount of reads and writes your storage device has to perform. I.E. You might not see VM application performance improvement, but you should see improvement in your storage management / monitoring / performance reports

  • http://blogs.vmware.com/vmtn/ jtroyer

    Rich — thanks for shedding some light on this subject. This topic always seems to be somewhat mysterious, because the devil's in the details — *and* the details are often storage vendor dependent, which makes it even a tougher topic to overview.

  • Pingback: Twitted by paulsjmartin

  • Dracolith

    As a NFS user, it would seem that one of vOptimizer's limitations “Doesn’t work with … thin provisioned VMs”, would be a show-stopper, otherwise it would be great to have a tool handle it….

    That leaves Diskpart/Fdisk on the data drive before putting data on it.
    I'm curious why VMware advises against aligning the boot drive, before installing the OS; it would seem like better read/write performance to the OS page file/swap file could effect guest operation…

  • http://vmetc.com rbrambley

    Dracolith,

    My take is that VMware's statement about the boot drive is merely for practical reasons. In other words, the amount of effort and down time is not worth the return. Fact is that NetApp and Vizioncore's tools handle the boot partition alignment with data already on it just fine.

    I believe vOptimizer's short term roadmap includes support for thin provisioned VMs. It makes sense since vSphere makes thin provisioning so easy now on VMFS. I'll clarify this at VMworld in a couple of weeks.

  • http://vmetc.com rbrambley

    FYI for readers: Another post for reference with a great discussion about vmdk / vmfs alignment that follows is Scott Lowe's post http://blog.scottlowe.org/2009/03/31/storage-al

  • http://www.boche.net/blog/ Jason Boche

    We align our VMFS volumes as well as all .vmdk files using NetApp's MBRALIGN and MBRSCAN utilities.

    I used to think inside the box with the mentality of “the pain of aligning individual VMs isn't worth the effort”.

    But now I think with a global approach and I see the big picture. .vmdk alignment is about gaining storage subsystem efficiency overall which in turn benefits the disk performance of every .vmdk on that storage. In other words, aligning .vmdk files benefits all VMs, not just individual VMs. Or alternatively, it allows for more VMs per SAN LUN or NAS volume. Or a 3rd option is it allows for a combination of both.

    I've got a few blog posts on alignment as well.

    Jas

  • chouse

    we have used mbralign on HP storage with no issues. the utility is not aware of the array.

  • http://vmetc.com rbrambley

    Thanks for confirming it works on other vendor storage!

  • http://vmetc.com rbrambley

    Jason,

    Well said. It is about the big picture and overall benefits. You have an excellent post explaining the technical details of what vmdk alignment really means.

    http://www.boche.net/blog/index.php/2009/03/20/

  • http://vmetc.com rbrambley

    Jason,

    Well said. It is about the big picture and overall benefits. You have an excellent post explaining the technical details of what vmdk alignment really means.

    http://www.boche.net/blog/index.php/2009/03/20/

  • rickyelqasem

    Can I suggest another way to acheive something similar using freely available tools? If so please see read this blog thread > http://read.virtualizeplanet.com/?p=8

  • http://vmetc.com rbrambley

    Ricky,

    Thanks for the alternate option for VMDK alignment. I'm a big fan of GParted, and it's good to see more uses for the LiveCD in a virtual environment.

Get My Podcast On iTunes!
Support VM /ETC
Support VMETC.com

Support VMETC.com

Free Business and Tech Magazines and eBooks
@rbrambley tweets
VMTN Roundtable Podcasts
Subscribe



Add to Google Reader or Homepage
Subscribe in NewsGator Online
Add to netvibes
Add to Plusmo