Andy Kurth created VCL-718:
------------------------------

             Summary: Add optional automatic execution of sdelete.exe to reduce 
vmdk size
                 Key: VCL-718
                 URL: https://issues.apache.org/jira/browse/VCL-718
             Project: VCL
          Issue Type: Improvement
          Components: vcld (backend)
            Reporter: Andy Kurth
             Fix For: 2.4


VMware .vmdk files stored thin will grow as data is written to the VM's hard 
drive.  When data is deleted from the VM, the size of the .vmdk remains the 
same.  Data is not reclaimed.  Example, start with a 15GB .vmdk and load a VM.  
Write 10GB to the VM's hard drive and delete this data.  Save the image.  The 
size of the new image .vmdk will be ~ 25GB.

There is a new feature with vmfs5 which allows data to be reclaimed but I've 
read where this may cause performance degradation.

The size of the .vmdk can be reduced by running 'sdelete.exe -z' on the VM 
before an image is captured.  This writes 0's to all of the empty disk space.  
At this point, the size of the .vmdk is equal to the total disk size (no longer 
thin).

After shutting down the VM, vmkfstools -K (punchzeros) can be run to reclaim 
all empty disk space.  I'm not exactly sure what this does but the result in 
the example above would be a 15GB .vmdk.

We could add a tools/Windows/Utilities/sdelete directory.  The sdelete.exe 
utility would have to be downloaded and saved in this directory on the 
management node.  The pre_capture code would check if sdelete.exe exists and 
run it after deleting the pagefile and rebooting.  A flag would be set if 
sdelete.exe was run and vmkfstools -K would be run if true.

I'm not sure if there's an equivalent function using the vSphere SDK.  It would 
need to be researched.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to