VMware Cloud Community
akidanov
Contributor
Contributor

sdelete on ESX/ESXi 4.1 still works?

Hi,

decided to create new template for my 2003 R2 x64 DC server on my fresh ESXi 4.1 using iSCSI VMFS datastore. Created a thin provisioned VM, done all preparations, had 5-6 GB used, freed up 2-3 GB, ran sdelete. Ran through fine, now my used storage 23.76 GB, provisioned storage 24.19 GB.

Migrated VM, no change, tried to use vmkfstools and clone disk which worked for me before, no change. Migrated to ESX 4.1 host, ran sdelete again, migrated again, tried just to migrate storage without host, still 24gb used space...

anyone tried it recently on their ESX/ESXi 4.1? Done my last set of templates on ESX 4.0 u1 using local datastore with vmkfstools -i -d thin and worked like a charm.

Maybe VM disk became corrupt somehow or something to do with magic 24gb size disk and sdelete does not handle it well? my previous templates were 8gb and I just expanded them on demand.

any ideas?

will try to shrink to 8gb and do all over again...

0 Kudos
3 Replies
AndreTheGiant
Immortal
Immortal

Have you tried with first a defrag and then a sdelete?

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
akidanov
Contributor
Contributor

Hi Andre,

Thank you for the tip, I forgot about defrag... but just tried and still no luck. During resizing I noticed that there was a 8mb unallocated space, maybe it caused some issue.

So I removed the 8mb partition, ran defrag, sdelete, tried to migrate and still 24GB...

Will try fresh 8GB size and report back...

0 Kudos
akidanov
Contributor
Contributor

ok, spent few more hours, still same result... seems like it's broken, but this is good!

I came up with another solution which is actually much quicker for my particular case and replaces DefragSdeletevMotion.

1. Get yourself some cloning utility ISO. I used Acronis True image from my old desktop support days, but you can download clonezilla/g4l and heaps of other free utilities.

2. Create 2nd thin provisioned VM disk.

3. boot up to your ISO and simply clone current disk to new disk.

4. remove old disk. You can also rename new disk to name of old disk if you are picky Smiley Happy

Things to note:

Some utilities as Acronis will actually move but not clone, so backup recommended if anything will go wrong during the process.

Tested on 2003x64 server, but this method should also work for any Linux and Windows OS to make disk thinner quick.

Hope this will save someone time.

0 Kudos