?
Solved

Rename VM folder and files on datastore

Posted on 2010-09-22
5
Medium Priority
?
3,535 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 2000 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

Industry Leaders: 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…
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…
Suggested Courses

752 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