Hi, I have exported a centos guest as OVF template which size was 72GB. Later I have imported same OVF than have deleted domain emails and files (as the server was a hosting server) and I have found the new disk size is about 6GB. While I have tried to export that 6GB guest server, I have found OVF getting exported same size 72GB. Why this less sized Guest getting exported same size? Any suggestion of resizing would be very much appropriated.
Before exporting the OVF you may want to "cleanup" the OS partition(s) by e.g. zeroeing out unused blocks, ... Take a look at http://blogs.vmware.com/vapp/2009/10/delta-disk-support-in-ovf.html (section "Shrinking the disk") which provides some hints.
André
Before exporting the OVF you may want to "cleanup" the OS partition(s) by e.g. zeroeing out unused blocks, ... Take a look at http://blogs.vmware.com/vapp/2009/10/delta-disk-support-in-ovf.html (section "Shrinking the disk") which provides some hints.
André
Thanks for reply, I have found my esxi dose not have ovftool. May be it require installation? As I explained previously that I have exported a guest OS and I require all data on that server. The server contain for example 100GGB data, after exporting to OVF, the size of OVF was 50GB, I guess that already compressed. However, after importing that server to another machine, I have deleted all data and server disk contain only 6GB. But even after that, exporting VM taking same space as 1st OVF. Hope I am being able to explain my situation.
Did you read the "Shrinking ..." part of the blog post I mentioned. The OFV export exports all the VM's data blocks. Simply deleting the datas from an OS point of view doesn't help, you need to zero out the unused disk space in the guest too.
André
I have read the blog before posting, as I am like elementary user and vmware is new to me, I did not understood the blog, moreover when I enter esxi shell, I did not get ovftool as explained the blog to create an ovf. Can you assist few more steps on this issue including why ovftool is not present at esxi 5.1?
The important part of the blog post is actually the step where the guest OS is cleaned up, i.e. the unused space is zeroed out. There's nothing you need to do on the ESXi/Hypervisor side.
So from within the guest (Linux) OS you will need to zero out the data blocks by running s.th. like:
dd if=/dev/zero of=zero.file; sync; rm zero.file
This will create a large file with all binary zeroes, then sync it so it's written to the file system, and finally delete the file again.
André
Hi, I avev got following
dd if=/dev/zero of=zero.file; sync; rm zero.file
dd: writing to `zero.file': No space left on device
619145593+0 records in
619145592+0 records out
317002543104 bytes (317 GB) copied, 17032.7 seconds, 18.6 MB/s