Can bleachbit be used on VMFS file structure?

Forums: 
Forum tags: 

I'm exploring the possibility of using Bleachbit on a VMWare Hypervisor.
I've got an VMWare ESXi host running version 5.5u2.

It allows me to open a SSH session to it, and I can pscp files to the hypervisor itself.

However, the hypervisor is not linux, rather it's running VMWare's own proprietary VMKernel.

Would any particular distro of bleachbit work on the VMKernel?

Thanks.

BleachBit definitely requires Python (currently Python 2.5-2.7)--does VMKernel run Python?

If you are just trying to wipe free space (vs. erasing files left by applications like Firefox that probably do not run on VMKernel), you can accomplish something similar using dd, assuming VMKernel has the dd command.

---
Andrew, lead developer

I log into the VMKernel and then type python.
Below is a copy of the result:

~ # python
Python 2.6.8 (unknown, Feb 12 2013, 11:35:47)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

It puts me into some kind of a python environment.

Next, I exit python and return to the VMkernel, and type dd /?

Below is the result:

~ # dd /?
BusyBox v1.20.2 (2012-12-11 11:54:28 PST) multi-call binary.

Usage: dd [if=FILE] [of=FILE] [ibs=N] [obs=N] [bs=N] [count=N] [skip=N]
[seek=N] [conv=notrunc|noerror|sync|fsync]

Copy a file with converting and formatting

if=FILE Read from FILE instead of stdin
of=FILE Write to FILE instead of stdout
bs=N Read and write N bytes at a time
ibs=N Read N bytes at a time
obs=N Write N bytes at a time
count=N Copy only N input blocks
skip=N Skip N input blocks
seek=N Skip N output blocks
conv=notrunc Don't truncate output file
conv=noerror Continue after read errors
conv=sync Pad blocks with zeros
conv=fsync Physically write data out before finishing

Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),
MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)

And yes, I just want to wipe the freespace with random characters.
Please advise next steps.

Thanks.

Run df -h

---
Andrew, lead developer

~ # df -h
Filesystem Size Used Available Use% Mounted on
VMFS-5 458.2G 115.0G 343.3G 25% /vmfs/volumes/datastore1
vfat 4.0G 18.5M 4.0G 0% /vmfs/volumes/54615796-f1c671cc-3bf6-001d098ac8de
vfat 249.7M 157.3M 92.4M 63% /vmfs/volumes/fb562b71-a965b404-85bc-46cf91908660
vfat 249.7M 8.0K 249.7M 0% /vmfs/volumes/113b8c78-1c6d4f2f-2b96-1af202ed0eb2
vfat 285.8M 193.4M 92.4M 68% /vmfs/volumes/5461578b-29ff5661-0c99-001d098ac8de

(By the way, I added the HTML CODE tag to your post to make it easier to read.)

I'm guessing you want to clean the first (/vmfs/volumes/datastore1). First, you should stop any processes that would allocate more space on that partition, so it doesn't run into an error when the disk is briefly full.

Then run this:
dd if=/dev/zero of=/vmfs/volumes/datastore1/DELETE_ME bs=1M
rm -f /vmfs/volumes/datastore1/DELETE_ME

Substitute the paths to clean other partitions.

/dev/zero is fast and (if you do full-volume backups) highly compressible. It should also be very effective against undelete.

You can replace /dev/zero with /dev/random, but it is slower and doesn't really make it any harder to undelete files (see documentation: Shred files and wipe disks .

By the way #2, VMKernel looks a lot like Linux.

---
Andrew, lead developer

I just ran the first line of code with the "dd" command.
I don't see any activity in the putty session, but the hypervisor's HDD light is active, so I'm assuming that it's writing zeros to a file.

Thanks for helping me, and for the tips.
Unix/Linux isn't one of my strong skills.

And yes, many new users to the VMKernel mistakenly assume that it's linux.
However, it's not.
Here's something from google:
http://www.v-front.de/2013/08/a-myth-busted-and-faq-esxi-is-not-based.html

If you're ever curious to learn more about the VMKernel, it's free from VMWare.
The initial download offers a 30 some day trial period with many or all components active.
If you register with VMware, you can get a free permanent license, however, some features are turned off.

You just need the ESXi host, latest version is 5.5- this needs to be installed as if it's an OS directly onto a computer. Technically, it's called a "bare metal" install because the ESXi host or hypervisor, is installed directly to the metal (machine).

Then you just need the VMWare sphere client, which is also free.

If you've heard of ORACLE VM - virtual machine, it's pretty much the same in terms of functionality.

Thanks!

I've opened up a second putty session into it, and yep, the freespace on the datastore1 volume is slowly filling up.

Thanks again!