Inconsistent VM names and folder names.

17 09 2010

This topic has been covered elsewhere, but from time-to-time I need a reminder.  As you may know, vm file and folder names are derived from the name you use when the vm is first deployed.  A lot of organizations try to match up the computer name with the vm name in virtual center.  The problem comes in if that name ever needs to change.  You can click on the name of the vm in virtual center and change it, but this DOES NOT change the name of the files and folders that make up that vm.  Fortunately, there is an easy way to fix this.  Storage vMotion.  If you perform a Storage vMotion on the vm, the folders and files will be changed to match the current name of the vm.  Make sure you get all the drives when you do the Storage vMotion, and click advanced if you need the drives to go to different datastores.  Once everything is moved to a different datastore, the names will match up again.

How do I know if my existing vm names, folders and files are consistent?  For a large number of vms, the easiest way is to grab PowerGUI and the PowerGUI power pack.

Grab PowerGUI here…


And grab the powerpack here…

To install the powerpack, go up to file and Powerpack management in PowerGUI.

There are a ton of useful queries to run on your infrastructure, but keep an eye out for the VMs & Templates with inconsistent folder names query under the Virtual Machines section of the Powerpack.