I was just reading up on my Google Reader. A lot of information been dropped over the last couple of days and more and more people are getting active on the VMware blogoshere. One of the articles that really caught my attention was the “VM Template best practices (Linux)” by Leo Raikhman.
Leo did a great job in explaining how to build up a decent Template. Leo even included a way to regularly zero out the Linux Filesystem for the purpose of VCB image level dumps with small footprints.
And although Leo’s article talks about Linux only this also applies for Windows. If you will be doing VCB then remember to zero-out your filesystem every once in a while. Linux doesn’t scrub the sectors where the files resided and neither does Windows. I wrote an article on how to do this from within Windows. Yes you can do it by hand via the “shrink disk” option in VMware Tools, but as Leo already pointed out there’s no way of scheduling that one, as far I have discovered.
So most of the stuff written about in Leo’s article applies to Windows, yeah also the partition alignment! DO IT! But the zero-out procedure won’t work, I’ve wrote one a while back and here it is:
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, d, dc
Set fso = CreateObject("Scripting.FileSystemObject")
Set dc = fso.Drives
WshShell.RegWrite "HKCU\Software\Sysinternals\", 0, "REG_SZ"
WshShell.RegWrite "HKCU\Software\Sysinternals\SDelete\", 0, "REG_SZ"
WshShell.RegWrite "HKCU\Software\Sysinternals\SDelete\EulaAccepted", 1, "REG_DWORD"
For Each d in dc
If d.DriveType = 2 Then
Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)'
Return = WshShell.Run("sdelete -c " & d, 1, TRUE)
End If
Next
Set WshShell = Nothing
Be sure to download Sdelete before you start, and remember that this script also does a defrag. If you are running “thin” disks than doing a defrag might not be the smartest thing to do, if so just delete the following line from the vb script:
Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)'