This post details the process for aligning VMDK files properly. There’s a great post from Duncan Epping on why you need to do this here. In these notes, we’re dealing with NetApp storage. Duncan’s post details some other tools for other storage vendors (like UberAlign from Nick Weaver).

Before beginning this process, ensure that:

– VM with misaligned VMDK is powered off

– VM has no snapshots



Acquire the file “mbrtools_esxi.tgz” and SCP it to the host the VM lives on at /tmp

SSH to the host at unarchive the file, then copy the folder to the /opt directory



Change directory to /opt/ontap/ and view the files



Change directory to the datastore where the misaligned VM lives



Run /opt/ontap/mbrscan -flat.vmdk and note that the VMDK is misaligned



Run the alignment command – “/opt/ontap/mbralign -flat.vmdk



Say ‘y’ to the prompt to confirm that no snapshots exist



When operation completes (time will vary based on size of disk) run ‘mbrscan’ again to confirm that the disk is now aligned





Linux VMs

If the VM being aligned is a Linux VM, this tool will mess up the bootloader. Grub needs to be repaired.

Mount System Rescue CD ISO to VM before powering on. Once booted, run ‘grub’



In the grub prompt, run ‘root (hd0,0)’





Then run ‘setup (hd0)’





Type ‘quit’ to exit, then reboot the VM