Crowd Rent Blog

Rent Anything, Rent Everything, Crowd Rent

We’d virtualize the whole world if we could…

Posted on | January 16, 2009 | No Comments

So here at Crowd Rent we’re big fans of virtualization.  We use it for everything!  We’d virtualize anything we could because it makes life so much easier.  We use VMware’s ESX Server running on Dell AX150 fiber and MD3000i iSCSI SANs.  Now from time to time we lose a VM but ESX thinks it’s still running.  A quick look at ESX top shows nothing for that VM.  Typically running ps waux and grep’ing the results would give you a folder name in the process to kill.  Use a little kill -9 PID would take care of it.  However, I couldn’t find the directory name in the ps command. Oh boy…

So between Google and the VMware forums I found some enterprising ESX/Linux geniuses who whipped this little gem up:

ps a --cols=750 -C vmkload_app | grep [.]vmx |
    awk {'print"PID=" $1 " VM="$NF'}|sed 's|/vmfs/.*/||'

Through the magic of Linux they dumpped the output into a script to parse it and give the following:

PID=2889 VM=Benson.vmx
PID=10868 VM=SugarCreek.vmx
PID=26281 VM=SanGabriel.vmx
PID=26238 VM=Bisbee.vmx
PID=7917 VM=AshFork.vmx
PID=9186 VM=Otay.vmx
PID=9189 VM=Fresno.vmx
PID=12993 VM=Avondale.vmx

Guess what the “PID” is?  It’s the process ID.  Killed the one I wanted, restarted the management console, and reregistered the VM from the console and started it.  I could have literally done it from my BlackBerry.  Score one (more) for Linux and VMware.

Comments

Leave a Reply





  • Crowd Rent: Powering Local Rentals

    This is the Crowd Rent blog. Crowd Rent allows people to list things you have for rent to people in your area. It is peer-2-peer rentals if you will or we like to say local rentals. Our goal is to reduce consumption by renting things and saving/making money all around. If we aggregate the stuff we have we'd never need to buy more again.

    On the blog you'll find a variety topics from software development to commentaries on the technology. We are fans of technology and software development so we tend to write about these things.

    Try out Crowd Rent today and start reducing your consumption and make money doing it.
  • Pages

  • Recent Posts