Virtual Machines that are misaligned

For existing child VMs that are misaligned, in order to correct the partition offset, a new physical disk must be created and formatted, and the data has to be migrated from the original disk to the new one.

Important note: Both Windows 7 and Windows 2008/2008R2  create aligned partition

This problem  occurs when the partitioning  scheme used by the host OS doesn’t match the block boundaries inside the LUN.If the guest file system is not aligned, it may become necessary to read or write twice as many blocks of storage than the guest actually requested since any guest file system block actually occupies at least two partial storage blocks.

All VHD types can be formatted with the correct offset at the time of  creation by booting the child VM before installing an OS and manually setting the partition offset. . The recommended starting offset value for Windows OSs is 32768. The default starting offset value typically observed is 32256.
How to verify the Offset value:

1. Run msinfo32 on the guest VM by selecting
Start > All Programs > Accessories > System Tools > System Information.
or type Start > Run and enter the following command : MSINFO32
2. Navigate to Components > Storage > Disks and check the value for partition starting offset.


If the misaligned virtual disk is the boot partition, follow these  steps:
1. Back up the VM system image.
2. Shut down the VM.
3. Attach the misaligned system image virtual disk to a different VM.
4. Attach a new aligned virtual disk to this VM.
5. Copy the contents of the system image (for example, C: in Windows) virtual disk to the new aligned virtual disk.
There are various tools that can be used to copy the contents from the misaligned virtual disk to the new aligned virtual disk:
− Windows xcopy
− Norton/Symantec™ Ghost: Norton/Symantec Ghost can be used to back up a full system image on the misaligned virtual disk and then be restored to a previously created, aligned virtual disk file system.
For Microsoft Hyper-V LUNs mapped to the Hyper-V parent partition using the incorrect LUN protocol type but with

aligned VHDs, create a new LUN using the correct LUN protocol type and copy the
contents (VMs and VHDs) from the misaligned LUN to this new LUN.

For Microsoft Hyper-V LUNs mapped to the Hyper-V parent partition using the   incorrect LUN protocol type but with misaligned VHDs, create a new LUN using the correct LUN protocol type and copy the contents (VMs and VHDs) from the misaligned LUN to this new LUN.!01

Next, To set up the starting offset, follow these steps:

1. Boot the child VM with the Windows Preinstall Environment boot CD.
2. Select

Start > Run and enter the following command:
diskpart
3. Type the following into the prompt:
select disk 0
4. Type the following into the prompt:
create partition primary align=32
5. Reboot the child VM with the Windows Preinstall Environment boot CD.
6. Install the operating system as normal.
Virtual disks to be used as data disks can be formatted with the correct  offset at the time of creation by using Diskpart in the VM. To align the virtual disk, follow these steps:

1. Boot the child VM with the Windows Preinstall Environment boot CD.
2. Select Start > Run and enter the following command:
diskpart
3. Determine the appropriate disk to use by typing the following into the prompt:
list disk
4. Select the correct disk by typing the following into the prompt:
select disk [#]
5. Type the following into the prompt:
create partition primary align=32
6. To exit, type the following in the prompt:
exit
7. Format the data disk as you would normally

For pass-through disks and LUNs directly mapped to the child OS, create a new LUN using the correct LUN protocol type, map the LUN to the VM, and copy the contents from the misaligned LUN to this new aligned LUN.

For info about  misaligned in Windows 2003, please have a look here : http://support.microsoft.com/default.aspx?scid=kb;EN-US;929491

About Alessandro Cardoso
Virtualization and Management passionate. Infrastructure products and solutions knowledge with management and hands on experience; Project Leader, with deep knowledge and expertise in a variety of Microsoft Infrastructure technologies in areas such as Virtualization and Management with product skill sets ranging from, Hyper-V, System Center, Windows Server, SQL Server, Active Directory, Exchange, SharePoint, IIS and Forefront; Plus knowledge in Quest Migration Manager, Linux Infrastructure, Networking, Security Solutions (such as VPN, Firewall) and VMware in complex and large scenarios; Strong knowledge of industry-related datacenter processes, strategies, industry regulations and requirements. Selected as Microsoft Brazil IT Hero, in 2007 and Microsoft IT Heroes Happen in Los Angeles, in 2008. selected as Bussiness Case, further virtualization project for a Governmental Institution. I am also a well known speaker in IT events (e.g. Microsoft TechEd 2007, 2008, 2010 and 2011). MVP since 2009, in Virtual Machine. I have experience developing, planning, organizing, and leading complex initiatives as well business case development skills, acquired in 23 years of experience in IT, working in segments spanning from Government, Health, Education and IT. Well-known speaker in IT events like TechEd, Sage-AU, CNASI. Proven Multitasking skills, presentation skills and analytical skills and problem determination ability; Belief in providing the highest quality of service; Good listener and communicator; Know how to prioritize the work and perform under pressure. Continuously seeking innovative ways to improve productivity and a resourceful problem-solver with focus on customers. Microsoft Most Valuable Professional : Virtual Machine Certifications : Australia Computer Society Certified Professional, MCITP: Enterprise, MCSE: Security, MCSA, MCT, MCTS:SQL, MCTS:SharePoint, MCTS:Vista, Linux Conectiva Professional, Modulo Certified Security Officer Blogs : http://virtualizationandmanagement.wordpress.com http://virtualizacaoegerenciamento.wordpress.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 823 other followers

%d bloggers like this: