mbralign - Device or resource busy

My setup:

- ESX 4.1

- Host Utilities for ESX 5.2 installed

- mbrscan/mbralign from v5.1 copied over to avoid this issue (which I had before doing so):

- A few VMs on the ESX host, with multiple partitions (C drive is .vmdk in VMFS, all others are RDMs on a FAS3140)

I am not able to run mbralign against a VM that is powered on, which is required for mbralign to be able to 'see' that the VM has more than one partition. I get the error:

Failed to open ./EVAL-VM06-flat.vmdk - Device or resource busy

This nuts and bolts article ( suggests the version of mbralign I've got (1.4) should be able to cope with VMs that have multiple partitions.

What am I missing/doing wrong?

Thanks in advance,


Re: mbralign - Device or resource busy

You generally see this issue when the VM is powered on.  To get around this in NFS datastores, scan inside the .snapshot.  On VMFS, you might be able to create a VM snapshot, then scan the -flat.vmdk (mileage may vary).

Re: mbralign - Device or resource busy

Thanks, Eric

I have just tried that but got this message:


This tool does not check for the existence of Virtual Machine snapshots or linked clones.
The use of this tool on a vmdk file that has a snapshot or linked clone associated with it
can result in unrecoverable data loss and/or data corruption.
Are you sure that no snapshots/linked clones exist for this vmdk? (y/n)


Obviously I could say yes and it would carry on, but I don't think that's sensible. Is this behaviour that you would expect?



Re: mbralign - Device or resource busy

Sorry Tom, I was thinking of the workaround for mbrscan.  The reason for the warning in this case is that if you align the virtual disk, then apply the delta (from the snapshot), you'll have a corrupt guest.  While there are uses for a scan, it might not be required.  For example; If you know the Administrator did not take the steps required to align the VM prior to installing the guest and the guest OS is legacy Windows (XP, 2k, 2k3), its not aligned.

Re: mbralign - Device or resource busy

Oops, I hit post to soon.  I wanted to mention that the VM has to be powered off and have no snapshots to align it.  Here are some helpful links:

mbralign 1.4 FAQ