VM name change
Essendon
Member Posts: 4,546 ■■■■■■■■■■
Quick question guys, I was reading on vmware's documentation that if you change the name of a VM in the vSphere client, the name of the files and folders associated dont change until a Storage vMotion has been performed. I just Storage vMotioned it, browsed the datastore and although the VM's folder name changed, the files within retained the old names. This expected behaviour? And how do I rename individual files within the folder, if I can at all?
Thank you.
Thank you.
Comments
-
jibbajabba Member Posts: 4,317 ■■■■■■■■□□Something didn't go well then ... If you rename a VM in vCenter and sVmotion it, it SHOULD be renaming them properly.
Here an example
Which files weren't renamed ?My own knowledge base made public: http://open902.com -
Essendon Member Posts: 4,546 ■■■■■■■■■■Thanks for the reply jibba, none of the files got renamed. I mean the vmdk's the config files, all of them retained the old names. Odd. I'll have another go at it in the morning, me eyes are burning from 8 hours of almost non-stop reading and labbing.
-
dave330i Member Posts: 2,091 ■■■■■■■■■■It's a bug in vSphere 5. Can't remember if it was fixed in update 1.2018 Certification Goals: Maybe VMware Sales Cert
"Simplify, then add lightness" -Colin Chapman -
jibbajabba Member Posts: 4,317 ■■■■■■■■□□It's a bug in vSphere 5. Can't remember if it was fixed in update 1.
Looks like the KB was updated in November last .. probably not .. How can a bug like that even go through QA ..My own knowledge base made public: http://open902.com -
Tackle Member Posts: 534We don't use anything cool like vMotion for copies/backups/renaming.
Best to make a copy of a VM the first time you do this (don't add it to inventory, re-name fist). DO NOT PERFORM WHEN THE VM HAS A SNAPSHOT!
What I do is remove the VM from inventory, rename the folder from the datastore view. Then I WinSCP to connect to the datastore (vmfs), browse to the volume, datastore name, then finally VM folder name.
Open the folder. What I do is rename the vswp, vmxf, vmx, vmsd, both vmdk files and nvmram to the new VM name. Then, I open the VMX file and re-name the nvram line, displayname and extendedconfigfile to the new name. I also open up the smaller vmdk file (there are 2 of them), then rename the only line that has the old VM name in it.
Be careful not to rename VM-flat.vmdk with newname.vmdk, it needs to keep the -flat part example: newname-flat.vmdk. Then close out of WinSCP and add to inventory. If this was a copy you made, put it on a Vlan until you sysprep it.
Hopefully this helps. -
Akaricloud Member Posts: 938Interesting.. I've done in vSphere 5 successfully many times and it was even a section of the vSphere 5 lab that I took.
-
scott28tt Member Posts: 686 ■■■■■□□□□□They changed the code they used for Storage vMotion between vSphere 4 and 5 - the files no longer being renamed was one of the side effects. It's the same with Update 1 as far as I know...VCP2 / VCP3 / VCP4 / VCP5 / VCAP4-DCA / VCI / vExpert 2010-2012
Blog - http://vmwaretraining.blogspot.com
Twitter - http://twitter.com/vmtraining
Email - vmtraining.blog@gmail.com -
scott28tt Member Posts: 686 ■■■■■□□□□□Akaricloud wrote: »it was even a section of the vSphere 5 lab that I took.VCP2 / VCP3 / VCP4 / VCP5 / VCAP4-DCA / VCI / vExpert 2010-2012
Blog - http://vmwaretraining.blogspot.com
Twitter - http://twitter.com/vmtraining
Email - vmtraining.blog@gmail.com -
blargoe Member Posts: 4,174 ■■■■■■■■■□It does state in the lab book for the vSphere 5 ICM class that the files get renamed but they actually don't - the lab book note was "inherited" from the vSphere 4 version of the class.IT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands... -
Essendon Member Posts: 4,546 ■■■■■■■■■■Thank you everyone for your input. Just like one of you said, wonder how this got past QA.
So on the exam if I get a question which says how do you rename a VM, do I go with svMotion?? -
undomiel Member Posts: 2,818I'd evaluate the other answers and make sure whether they can actually do what the question is asking for. Rule out the other answers and you'll probably find that only one answer will work for the given situation.Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
-
dave330i Member Posts: 2,091 ■■■■■■■■■■Thank you everyone for your input. Just like one of you said, wonder how this got past QA.
So on the exam if I get a question which says how do you rename a VM, do I go with svMotion??
Yes. It's suppose to work.2018 Certification Goals: Maybe VMware Sales Cert
"Simplify, then add lightness" -Colin Chapman -
jibbajabba Member Posts: 4,317 ■■■■■■■■□□...So on the exam if I get a question
Best bet is whatever the documentation says it is, no matter whether it works or not
vSphere Documentation Center
(didn't find any reference regarding renaming during vsmotion tho)My own knowledge base made public: http://open902.com -
scott28tt Member Posts: 686 ■■■■■□□□□□jibbajabba wrote: »Best bet is whatever the documentation says it is, no matter whether it works or notVCP2 / VCP3 / VCP4 / VCP5 / VCAP4-DCA / VCI / vExpert 2010-2012
Blog - http://vmwaretraining.blogspot.com
Twitter - http://twitter.com/vmtraining
Email - vmtraining.blog@gmail.com -
Crikey Member Posts: 59 ■■□□□□□□□□jibbajabba wrote: »Best bet is whatever the documentation says it is, no matter whether it works or not
That's the Microsoft way, for sure.