#!/bin/sh
cd /vmfs/volumes/datastore1
scp -r root@192.168.100.27:/vmfs/volumes/datastore1/$1 .
cd $1
vmkfstools -i $1.vmdk -d thin $1-thin.vmdk
rm -f $1.vmdk $1-flat.vmdk
vmkfstools -E $1-thin.vmdk $1.vmdk
vmkfstools -K $1.vmdk
vim-cmd solo/registervm /vmfs/volumes/datastore1/$1/$1.vmx
cd