#!/bin/sh . /usr/local/lib/vmware.sh if [ $# -ne 1 ]; then echo "Usage: `basename $0` " 1>&2 exit 1 fi vm="$1" vmid="`vmid \"$1\"`" if [ "${vmid}" == "" ]; then echo "Cannot find virtual machine ${vm}" 1>&2 exit 1 fi vmware-vim-cmd vmsvc/unregister ${vmid}