Additional Virtualization Discussions

How to "MBRAlign" a vhd running under XenServer ?



I would like to align a .vhd file ? how can I do that ?

Mbralign works only for .vmdk file of ESX.






For Xen the file system on the guest VM should align with the NetApp storage blocks

Section 4.3 of this TR talks about alignment in Xen Server environments





Thanks for this link. I read that I can use MBRScan to check alignment of a .vhd file.

But MBRAlign, which allow to correct aligment works only on .vmdk files, not .vhd files.

In my case, I P2V a Windows XP workstation, and I have an unaligned .vhd file. I would like to align it.




Hi -

The mbralign tool has not been ported to work in the XenServer environment.  The best way to get your p2v VM aligned is to use the host based tools.  You'll need to create a second vhd, present it and the misaligned vhd to a second VM, create a properly aligned partition on the new vhd, then use robocopy/xcopy/etc to copy the data from one vhd to another.  You'll then need to replace the misaligned vhd with the one you just created.  The TR Amrita pointed out has the details on how to create an aligned vhd.

Another option you might explore is gparted (Note: NetApp does not support or endorse this).  It is a bootable linux distribution that might be helpful.  A customer pointed it out to me, but I haven't used it. 
Hope this helps,


I have read that MBRscan works under Citrix Xenserver hosts, unlike MBRAlign does. Accordding to TR3747 I must log into dom0 in order to run MBRScan. But after log in, if I try just installing by the install command it says that is  not a VMware supported version (of course, I am on a Xenserver 5.5), if I untar the file which  contains the tools and do ./mbrscan file.vhd it says "Unknown format,  skipping..". So, my questios is, how must that tool run on Citrix Xenserver?


It will only work on "fixed" vhd format disks.  The tool does not understand the "differencing" nor the "dynamic" format.


I am sorry, but I do not understand what do you mean with "fixed", "differencing" or "dinamic". I am trying to scan vhd files corresponding to stopped VM or snapshots, but it fails.


The VHD specification lists three formats.  They are explained here:

I think (may be out dated info) the default format for XenServer in NFS storage repositories is dynamic.


Ok, now I understand your previous reply. Since I am able to raise the size of disks, I must assume that are dinamic type, and of course, snapshots and machines built from them are differencing type, so the issue is clear.

Do you know if  there is a newer version of TR 3747 with complete information about xenserver?. TR 3747 seems incomplete on citrix sections, it refers to missing  points or do not  talk about it is suppose to do.

Thanks for your help


While I contributed to the TR, I don't know when the next version will be available or if it will contain an update for XenServer.


NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner