VMware Cloud Community
PJo201110141
Contributor
Contributor
Jump to solution

Dummy data ( txt file) in a VM ( ESxi 5.1, vCenter 5.1)

I have created a dummy text file using command fsutil file createnew test.txt 1000000000 in my windows VM with prov space of 500 GB. After I run this command, I do see the VM got filled with 485 GB of data. But in vCenter used space is still the prov space as 20 GB which is taken by the guest OS. Any idea why its not getting reflected with the VMDK. Checked the datatstore ( by Browsing the VMDK) its not reflcted. Had the same issue with LInux VM also. This was performed to make a Bigger VM to do some tests. Any response is appreciated.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

The createnew option you are using "Creates a file of the specified name and size, with content that consists of zeroes."

With a thin provisioned virtual disk, data blocks which consist of binary zeroes are not actually allocated, but only a NULL pointer is created which - if the data is re-read - returns binary zeroes again. If you want allocate disk space on the datastore (i.e. grow the .vmdk file) you need to write non-zero values. For Linux you could use e.g. the shred command.


André

View solution in original post

0 Kudos
3 Replies
a_p_
Leadership
Leadership
Jump to solution

The createnew option you are using "Creates a file of the specified name and size, with content that consists of zeroes."

With a thin provisioned virtual disk, data blocks which consist of binary zeroes are not actually allocated, but only a NULL pointer is created which - if the data is re-read - returns binary zeroes again. If you want allocate disk space on the datastore (i.e. grow the .vmdk file) you need to write non-zero values. For Linux you could use e.g. the shred command.


André

0 Kudos
PJo201110141
Contributor
Contributor
Jump to solution

Thank you. Any idea on windows?

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

I cannot currently think of a native Windows tool for this. However, using a large binary file (e.g. the ESXi ISO image) and coping it multiple times (e.g. in a batch loop) will also allocate host disk space. Other than this, searching the Internet for windows shred or windows wipe returns multiple hits.

André