VMWARE – esx standalone create new machines

Script to copy one VM and create new ones that are “similar”

<code>

newvm=PV009
cd /vmfs/volumes/p9-storage
mkdir $newvm
cd $newvm
cat ../PV004/PV004.vmx | sed "s/PV004/$newvm/g" | grep -v uuid > $newvm.vmx

vmkfstools -d thin -c 128g $newvm.vmdk


id=`vim-cmd solo/registervm   /vmfs/volumes/p9-storage/$newvm/$newvm.vmx`

vim-cmd vmsvc/power.on $id


</code>

About Jeff Turner

Technical director of Nano Tera Network Solutions.
This entry was posted in Powershell, VBS, VBA and other scripting., System Administration. Bookmark the permalink.