VMware vSphere

 View Only
  • 1.  Vmware converter, defrag, partition resize question

    Posted Apr 17, 2011 01:10 PM

    hi,

    I'm gearing up to perform a good number of P2V conversions and I'm trying to get an idea what the best workflow might be. i won't detail all the steps,just what at this point is "out of order", so I can get some feedback from your experiences.

    I will be migrating mostly windows 2003 guests using latest vmware converter standalone.

         1. These guests have a lot of misaligned partitions (boot sector 63) - use gparted and align partitions

         2. They also have disks that have not been defragmented since they were installed - we want to do a defrag

         3. During conversing we want to shrink / expand according to needs.

         4. We also want to zero out unused space when putting them on ESXi.

    We have only FC storage (thin LUNs on a Clariion cx480)

    My question is:which is the correct orde for performing tasks 1-4.

    Initially I wanted to do first defrag while on physical, then I  remembered i read somewhere converter copies data block based  (conserving defrag status) only if you do not resize disks (correct me  if wrong).

    Also aligning partitions shuffles data (it is a resize + move  operation),which means we may also have to defrag after the alignment.

    I have these 2 options in mind which one do you think is best?

    Please add more if you see ny

    Plan A:

         1. Convert with shrink / expand according to needs.

         2. Use gparted and align partitions on the VM

         3. Do a defrag on the disks on the VM

         4. Zero out unused space

    Plan B:

         1. Do a defrag on the disks of the Physical box

         2. Convert with shrink / expand according to needs.

         3. Use gparted and align partitions on the VM

         4. Do a defrag again since steps 2 and 3 probably screwed that up

         5. Zero out unused space

    thanks,

    ionut



  • 2.  RE: Vmware converter, defrag, partition resize question

    Posted Apr 17, 2011 01:26 PM

    For VMs that need to be resized as part of the conversion I would go with plan A.  You're correct about resizing partitions - when you leave partition sizes intact the P2V  is block by block.  If you resize then it is essentially one big file copy so there shouldn't be any fragmentation on the new disk.

    I can't say for sure whether realigning the partition moves files around and would require a defrag.  The one point I'll make about defrags is obvious but is worth stating anyway - defragmentation is a very heavy disk I/O operation.  If you're performing a defrag on a virtual machine, that may affect performance of other VMs on the same datastore or storage platform.  It might make sense to schedule just one at a time over a longer period rather than trying to run several at once.

    As for zeroing out whitespace, are you planning on making this VMs thin provisioned?  If not then what is the goal of zeroing out the space?  Here's a post I made on the subject of zeroing out whitespace on a virtual machine so that it can be reclaimed using Storage vMotion and thin provisioning:

    http://www.thelowercasew.com/reclaiming-disk-space-with-storage-vmotion-and-thin-provisioning

    Hope this helps.

    Matt

    http://www.thelowercasew.com



  • 3.  RE: Vmware converter, defrag, partition resize question

    Posted Apr 17, 2011 02:43 PM

    To align your partitions, you can use some tools.

    See:  http://communities.vmware.com/docs/DOC-10510

    About reclaim your space, have you also considered to start with new disks an copy the files with robocopy or rsync?

    Andre



  • 4.  RE: Vmware converter, defrag, partition resize question

    Posted Apr 17, 2011 04:12 PM

    @matt, yes I will make thin disks that is why I zero, and I know it gets reclaimed only after you svmotion it

    @ andre - I was considering a simple filecopy yes, but somehow robocopy does not work all the time ( especially with lots of gb folders), maybe it is just me.

    Will keep the robocopy option in mind though.



  • 5.  RE: Vmware converter, defrag, partition resize question

    Posted Apr 17, 2011 04:32 PM

    When you use Converter and shrink or grow the disk it will create a blank vmdk and do a file by file copy so there is no reason to defrag, If you defrag a thin disk it will grow and not necessary anyway.



  • 6.  RE: Vmware converter, defrag, partition resize question

    Posted Apr 17, 2011 04:52 PM

    Well, I think converter does not do that. I've hade a few VMs converted sofar, for which I adjusted the disk layout and sizes and then I ran raxco perfect disk on it, and it found files and folders to defrag...so that is why I want the defrag after the conversion.

    Also because i'm using gparted to shift data, doesn't that changethe fragmentationstatus?



  • 7.  RE: Vmware converter, defrag, partition resize question

    Posted Apr 17, 2011 06:18 PM

    With Converter 4.3 when converter creates a larger volume of an NTFS disk then it does a block copy to the new larger disk. When you shrink an NTFS disk it does a file by file copy.

    I can't absolutely guarantee it but I believe gparted moves blocks and doesn't involve files.