Skip to content

Instantly share code, notes, and snippets.

@jeffshead
jeffshead / rename_vm.sh
Created Feb 23, 2017 — forked from skunkie/rename_vm.sh
Shell script to rename a virtual machine in VMware ESXi
View rename_vm.sh
#!/bin/sh
# shell script to rename a virtual machine in ESXi
VOLNAME=$1
DIRNAME=$2
OLDNAME=$3
NEWNAME=$4
VM_DIRPATH="/vmfs/volumes/$VOLNAME/$DIRNAME"
f_OK() {