Posts tagged ‘esx’

Snapshot finder on VMWare ESXi 4.1

A horribly ugly hack to find snapshots on mounted volumes on a VMWare ESXi 4.1 host.

Create a script on random host with this

#!/bin/sh
for i in $(find /vmfs -name "*.vmsn");do eval $(echo $i | sed -n "s|^\(.*volumes\)/\([^/]*\)/\(.*\)$|ls -l \1 \| grep \2 \| grep '\\\->' \| awk '{ printf \$9 }';echo \/\3|p"); done

Then just run it with

ssh root@esxhost ./snapshotfinder.sh

And why this script just doesn’t do a find / -name “*.vmsn” is ‘couse the output won’t include the symlinks name but merely the UID of the volume, and that doesn’t help very much. And unfortunately ESX comes with a busybox binary of find, which doesn’t have the -L option.

  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • LinkedIn
  • RSS
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • email
  • MySpace
  • PDF
  • Print
  • Reddit
  • Tumblr

Enabling SSH in ESX3i

SSH ain’t enabled as default on the free version of ESX, this is how you sort this out.

1. ALT-F1 in the console
2. write ‘unsupported’ without ”
3. Press Enter
4. Edit /etc/inetd.conf with an editor of your choice
5. Uncommentate ssh
6. Write ‘killall -HUP inetd’

Voila.

  • Facebook
  • Twitter
  • Digg
  • del.icio.us
  • LinkedIn
  • RSS
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • email
  • MySpace
  • PDF
  • Print
  • Reddit
  • Tumblr