VMware Cloud Community
BriansVblog
Contributor
Contributor

Disk Alignment on Windows Guest

I have a number of existing Windows VM .vmdk's that are not correctly aligned to the underlying disk. I've tried creating a new VM, mounting the .vmdk to another VM, aligned the disk using diskpart, and then cloned the virtual hard disks using CloneZilla, but this process has failed.

Has anyone successfully aligned an existing Windows VM? How you would properly align a P2V'd VM? Thanks for your help in advance.

0 Kudos
21 Replies
bcumms
Contributor
Contributor

What NetApp tool are you referring to? This tool will correctly align an already estabished mis-algined Windows VM?

0 Kudos
meistermn
Expert
Expert

embo500 told that he uses it:

http://communities.vmware.com/message/569411

1) BACK UP YOUR VM!!!

2) Shut down the VM

3) Grow the disk you are realigning by 1MB or so (we're really only shifting it by 32.5K...if you want, you can probably grow it by 33K and it will be enough)

4) Create a 2nd drive for the VM that is 33K (or more) larger than the disk you are shifting. Add it to your VM as a 2nd hard drive. This is only for temporary use anyway.

5) Set the VM to use the DFSee ISO as a CDROM

6) Boot to the CDROM

7) Issue the following commands in DFSee:

part 1 - (selects the first partition)

move -f:3 - (moves this partition to the 2nd drive)

part 1 - (reselects the first partition, now on the 2nd drive)

move -f:2 -e0x41,s -c - (copies the partition back to the first drive, but offset by 65 sectors from the beginning of the free space (41 hex))* *part 1 - (select the first partition again, now it is back on the first drive)

fixpbr -! - (fix the boot sector to skip the 65 sectors we just added)

😎 Power off the VM, remove the 2nd drive, clear out the CD-ROM, and shut it down to save disk state. Then power it all back up, and it should come up fine with a 64K offset shown in diskpart. Edit

0 Kudos