Skip to content

Instantly share code, notes, and snippets.

@grangerx
grangerx / vm-rename
Created Jan 14, 2022 — forked from raarts/vm-rename
Script to rename a virtual machine in ESXi 6
View vm-rename
#!/bin/sh
#
# shell script to rename a virtual machine in ESXi
#set -x
if [ $# -ne 4 ]; then
echo "Usage: $0 VOLNAME DIRNAME OLDNAME NEWNAME
where VOLNAME is the volume name, e.g. datastore1,
DIRNAME is the the name of the directory of the virtual machine,