VMware vSphere

 View Only
  • 1.  VM Defrag

    Posted Jul 20, 2010 07:43 PM

    Wondering what people out there are using for defraging Windows Guest OSes running on vSphere (Wondows Defrag or 3rd party)? Is it a good idea to do this like you would a physical machine? I have read many posts about this and i see mixed opinions. I cant help to think that defraging the guest would be a good idea but i have been wrong many many times before.

    Thanks

    Matt



  • 2.  RE: VM Defrag

    Posted Jul 20, 2010 07:56 PM

    So far as I have read -- do not run a defragger if you are using ESX/ESXi 4.x thin-provisioned disks -- doing so will make them thick disks again.

    I would be happy to be wrong on this. :smileyhappy:

    This may get rectified in a future version, but no idea when...

    If you have thick disks, you can't go wrong with MyDefrag.

    HTH Tom



  • 3.  RE: VM Defrag

    Posted Jul 20, 2010 08:32 PM

    MyDefrag http://www.mydefrag.com/, but as stated defragging thin disks is not recommeded. If you do defrag thin disks, don't do it very frequently, and run sdelete afterwards to reclaim free blocks.



  • 4.  RE: VM Defrag

    Posted Jul 20, 2010 08:38 PM

    thakala,

    Thank you for mentioning sdelete, I knew of this app, but I did not know

    this could 'fix' the problems associated with defragging thin disks.

    Would you please provide a link(s) to this utility and how to use it for

    this purpose??

    I want to defrag once/month if I can and have it be a scheduled job

    along with a similar sdelete regimen.

    Thank you, Tom



  • 5.  RE: VM Defrag

    Posted Jul 21, 2010 07:46 AM

    Sdelete is available from Microsoft, http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

    You should execute "sdelete.exe -c" which fills unused NTFS blocks with zeros. There is a sdelete.vbs script available at Yellow Bricks(1) which you could run once a month as a scheduled task, just replace "defrag" command in script with your choice of defrag tool.

    (1) http://www.yellow-bricks.com/2008/01/04/vmware-consolidated-backup-and-deleted-files/



  • 6.  RE: VM Defrag

    Posted Jul 21, 2010 12:48 PM


  • 7.  RE: VM Defrag

    Posted Jul 21, 2010 12:48 PM

    Thank you for posting this helpful information.

    I will try this out on a test VM with MyDefrag to verify this technique

    prevents the defrag from changing thin to thick.

    I wish I knew how to convert the vbs script to PowerShell though.

    I subscribed to your blog. :smileyhappy:

    Thank you, Tom