Rename local storage datastore

From VI-Toolkit
Jump to navigation Jump to search

renameLocalStorageDatastore.pl

author: William Lam

Description

Allows you to rename the name of the local storage datastore in your vCenter so that it has a unique name. The script comes with a test mode so that you can see how the output looks like before you run the actual renaming action.

Usage:

[vi-admin@optimus]$ ./renameLocalStorageDatastore.pl --server teletron1.primp-industries.com --username primp --cluster autobots --jk_mode 0
This could take a few minutes depending on the size of the cluster ...

Cluster: autobots

	Host: sideswipe.primp-industries.com
		Localstorage: local-storage (2)
 		Rename to: [sideswipe-local-storage-1]
	Total # of local datastores on host: 1

	Host: jetfire.primp-industries.com
		Localstorage: local-storage
		Rename to: [jetfire-local-storage-1]
		Localstorage: local-storage (1)
		Rename to: [jetfire-local-storage-2]
	Total # of local datastores on host: 2

Location

http://communities.vmware.com/docs/DOC-10571