VMware Cloud Community
Bit101
Enthusiast
Enthusiast
Jump to solution

Rename VM in vCenter

I want to rename a VM in vCenter from vmmachineTest to vmmachineProd

I do the rename i console and migrate to another host, but the folders and files does not change.

It´s still folders an files with vmmachineTest but the VM in vCenter is now vmmachineProd.

-Can I edit the folders and files without any risk? or in other Words what am I doing wrong?

Really appreciate your answer

Smiley Happy

Tags (1)
1 Solution

Accepted Solutions
schepp
Leadership
Leadership
Jump to solution

With cold migrate I mean just shutdown the vm, and right click migrate and choose to change the datastore. You don't need storage vmotion license for that and it will rename everything.

When changing manually you need to change the names inside the configs as well, as the vmdks are configured in the vmx files. Also please note that for manually renaming the disks you will need to use vmkfstools, as the virtual disk is not just the one vmdk file you see in the datastore browser.

That said, migrating to a different storage is much simpler Smiley Happy

Tim

View solution in original post

0 Kudos
8 Replies
schepp
Leadership
Leadership
Jump to solution

Hi,

you need to do a storage vMotion for the files and folders to change the name. A normal vMotion (just the host resource) is not sufficient.

If you do not have storage vMotion licensed you can also power down the VM and cold migrate the VM to another datastore, that will do the trick as well.

There is a manual way of renaming the files on the command line as well, but you don't want to go that route, as you have to update all the config files as well 😉

Cheers

sunborn
Contributor
Contributor
Jump to solution

What do you mean cold migrate? I have the same issue and was going to rename on console. What config files are there other than the vmx?

0 Kudos
schepp
Leadership
Leadership
Jump to solution

With cold migrate I mean just shutdown the vm, and right click migrate and choose to change the datastore. You don't need storage vmotion license for that and it will rename everything.

When changing manually you need to change the names inside the configs as well, as the vmdks are configured in the vmx files. Also please note that for manually renaming the disks you will need to use vmkfstools, as the virtual disk is not just the one vmdk file you see in the datastore browser.

That said, migrating to a different storage is much simpler Smiley Happy

Tim

0 Kudos
continuum
Immortal
Immortal
Jump to solution

> I want to rename a VM in vCenter from vmmachineTest to vmmachineProd
That action does nothing more than change the vmx-file parameter

displayName = "vmmachineTest"

to

displayName = "vmmachineProd"


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
Bit101
Enthusiast
Enthusiast
Jump to solution

So, in other Word this tutorial about rename is useless?

Renaming a Virtual Machine and Virtual Machine Files in vSphere 6 - YouTube

Smiley Happy

0 Kudos
continuum
Immortal
Immortal
Jump to solution

> So, in other Word this tutorial about rename is useless?
No - what makes you think so ?


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
Bit101
Enthusiast
Enthusiast
Jump to solution

Ok, I didn´t see and hear that he was changing to datastore 1 from datastore 1(1).

It´s easy to miss when the datastores is spelled and sounds so similar.

Now I gonna try the same again and see if names of folders and files Changes.

Smiley Happy

0 Kudos
Himadri
Contributor
Contributor
Jump to solution

Performa storage vMotion for the files and folders to change the name. A normal vMotion (just the host resource) is not sufficient.

0 Kudos