VMware Cloud Community
ussthamm
Contributor
Contributor

Linux Script running within a VM destroyed Virtual Image

I ran into something interesting/scary and thought I would share it to see if anyone could tell me what happned.

We were looking for a file containing an expression. Not knowing where the file was or even the name, we needed to search every file to find one containing our expression.

Not being any kind of linux or grep genius, I ran the following simple script from the root directory:

for i in `find .`

do

grep word_we_were_looking_for $i

done

So this thing chugged away for a while as I expected it would. By the way, I started this on two different VMs.

Then both Virtual Machines shut themselves down! I could not restart them! The VI client would hang at 95% upon trying to restart the VM.

I've already restored these two machines from backup, but I was wondering if anyone could tell me what caused this. How did a command running within a VM hurt something external to the OS of the Virtual Machine? It would NOT even get so far as to give me a console window.

Thanks

Reply
0 Kudos
1 Reply
petedr
Virtuoso
Virtuoso

I am not sure exactly what the reason why but I have seen in the past when running a find script over the /proc file system it has corrupted the linux machine. If you are starting at / with your find it will go through /proc. It may be what happened.

www.thevirtualheadline.com www.liquidwarelabs.com