He's talking about scanning, not aligning. When a VM is running, the VMDK is locked to the process that actually executes the VM. Nothing else can read or write. So, you either power off the VM, or take a VMware or NetApp snapshot. The VMware snapshot makes the VMDK read-only and readable by any process with sufficient permissions, and VM writes go into the delta file. So, you can scan the VMDK just fine. You can also read it to align. The problem is, while you fix the VMDK, the snapshot delta file also has blocks with addresses (LBA) and those LBA are relative to the original alignment. If you halt, swap VMDK, and start it back up, whether you consolidate (a.k.a. delete) the VMware snapshot before or after you boot, the VMDK and delta are not aligned the same and the guest panics, detects corruption or some other unpredictable behaviour. I've tested this a few times.
We've also looked at making mbralign able to align both the base VMDK and the snapshot delta files, and while technically possible, it's very tricky.
As for virtual appliances, yeah, they are usually misaligned - including the brand-new vSphere 5 vCenter Appliance. :-/
Peter
From: Fletcher Cocquyt [mailto:fcocquyt@stanford.edu] Sent: Friday, August 26, 2011 4:47 PM To: Chris Muellner; Eugene Vilensky Cc: toasters@teaparty.net Subject: Re: Sources of unaligned IO other that Vmware? - pw.over_limitpersists
Holy Shnikies - does this actually work? And is it supported? (running mbralign with a snapshot, then (presumably) deleting the snapshot to merge the delta files back into the newly aligned vmdk - brilliant!) We took downtime on all VMs to align them - the big ones took hours...even with 10gig networking - can't believe I had not seen mention of this before. How do you deal with the linux VMs which need boot file modification post alignment to (re)boot successfully?
FWIW, all our VMs are aligned now - we run a daily mbrscan report to pickup any stray misaligned vmdk files (usually they are virtual appliances)
On 8/26/11 1:05 PM, "Chris Muellner" chris@northlandusa.com wrote:
If you take a NetApp snapshot of the datastore then you can run the mbralign scan against the snapshotted -flat.vmdk(s) without having to power off the virtual machines.