Solved

Rename VM folder and files on datastore

Posted on 2010-09-22
5
3,290 Views
Last Modified: 2012-06-27
We've converted a VM 2008 box into a template.  The server was called NYSERV001 and we now want to call it 2008_Template.  I've renamed the VM template in vSPhere Client and is fine, but when i browse the datastore it still shows as folder NYSERV001 and the files within all include the name NYSERV001.  How do i change the name of the folder and files on the datastores to reflect the name change in the vSPhere Client to 2008_Template.

Cheers
0
Comment
Question by:kswan_expert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 22

Expert Comment

by:65td
ID: 33740781
May have to convert back to a VM and then use the procedure from communites:
http://communities.vmware.com/thread/150288 
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 33740783
You can do this a few ways.  

1. Clone and give it the destination name.  This will create a new folder and vmx and vmdk files

or

rename virtual machine

Here are the steps I take to rename a VM (It would be fairly easy to script, but its low on my list of things that need to be done)

Shut down the VM

Putty into the VMware server that the VM resides on

unregister the VM

vmware-cmd -s unregister <path to config file> (should be /home/vmware/OldServerName/OldServerName.vmx

Remove it from Virtual Center (Have to remove twice)

Rename the folder,vmx file, and vmdk file to match the new name
mv /home/vmware/OldServerName /home/vmware/NewServerName
mv /home/vmware/NewServerName/OldServerName.vmx /home/vmware/NewServerName/NewServerName.vmx
mv /vmfs/SANDiskName/OldServerName.vmdk /vmfs/SANDiskName/NewServerName.vmdk

Edit .vmx file
vi /home/vmware/NewServerName/NewServerName.vmx

(If you've never used vi before try nano... a little easier to use)

Replace OldServerName with NewServerName in .vmx file
This should hit
scsi0:0.name = "SANDiskName:OldServerName.vmdk
DisplayName = "OldServerName"
checkpoint.cptConfigName = "OldServerName"

register the VM

vmware-cmd -s register <path to new config file> (should be /home/vmware/NewServerName/NewServerName.vmx)

It will show up under Discovered VMs in Virtual Center. Drag and drop to whereever you want it.
0
 
LVL 10

Expert Comment

by:BloodRed
ID: 33744353
By far, the easiest way to do this is to either use Converter or just clone the VM using vCenter.  Manually moving files and modifying the .vmx file is prone to error and not recommended.
0
 
LVL 3

Accepted Solution

by:
michelkeus earned 500 total points
ID: 33745292
Actually the easiest way is to "Storage" vMotion them. I've put Storage between quotes as it is not really an Storage vMotion.

If you convert the template back to a VM and vMotion it. The vMotion wizard will ask you if you want to keep the files in the same Datastore. If you chose to migrate to other storage it will sync up the names on the Datastore with the name in the vCenter interface.

You can always move the template back the same way if you need the storage on the Datastore.
0
 

Author Closing Comment

by:kswan_expert
ID: 33835877
Nice.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question