In the life of a Virtual Machine, upgrades often change what the VM's OS really is. I know that it's possible to change the VM's name in the Virtual Machine Library by using the "Rename" option so that a new name appears in the Library listing. But the VM file itself still has the original name of the file and it is repeated in the VM package contents so changing the name in Finder likely wouldn't work since presumably everything should match.
In order to keep track of Virtual Machine files as they appear in the Virtual Machine Folder's Finder window, is there anyway to change the VM file's actual identity without breaking it?
Hehe, the ESXi part is a bit different, but it has quite a few things that are similar or the same.
Yes, the bundle name is the term used for filename part that is before the .vmwarevm file extension.
So if you have a virtual machine folder that is called "MacOS 10.11.vmwarevm" then the whole folder with contents is referred to as a bundle.
However as the .vmwarevm file extension is hidden by default, with the bundle name is most often meant "MacOS 10.11".
If you want to rename the folder name, do the following:
In Fusion Library, from the context menu select "Delete", it will ask you if you want to "Move to trash, Cancel or Keep file"
With "file" they mean bundle and if you select "Keep file" you're fine.
By removing the VM from the library you don't end up with a non function VM in the list that has a confusing name.
Then you can rename the folder, rename the .vmx and from "File -> Open" you can select the renamed vmx in the renamed folder.
--
Wil
I rename the files all the time without issue. Have to do both though - change it in the library as well as on disk.
I rename the files all the time without issue. Have to do both though - change it in the library as well as on disk.
Are you saying that if I have, for example, a Mac OS 10.7 VM and I upgrade it to 10.8, I can change the VM's file name in Finder to Mac OS 10.8 without worrying about the 20 or so .vmdk files and other files inside it continuing to say 10.7 (or do they change automatically, and if so, is that at first launch or some other time)?
Storage VMotion should do the job for you. New Inventory name of the vm should reflect for VM folder and all the file after SVmotion
Renaming a virtual machine and its files in VMware ESXi and ESX (1029513) | VMware KB
If you found this or any other answer helpful, please consider the use of the Helpful to award points.
Best Regards,
Deepak Koshal
CNE|CLA|CWMA|VCP4|VCP5|CCAH
Deepak, this is the Fusion forum - one of the hosted products, not ESXi.
Hi,
You can rename the vmx filename without issues.
You'll just have to reregister the VM in the library again and remember to answer the question "did you copy or move the VM" with "Move" as copy will change the virtual hardware ID's and mess up things in your guest in this case.
As for the .vmdk filenames, leave them as is!
Yes they can be renamed if needed, but you have to use vmware-vdiskmanager to rename them, do NOT rename these in finder as your VM will stop working.
If however you insist on renaming them then:
First commit ALL snapshots.
use vmware-vdiskmanager -n as in:
vmware-vdiskmanager.exe -n sourceName.vmdk destinationName.vmdk
see:
Vmware-vdiskmanager - VI-Toolkit
That keeps your vmdk intact, but that's not enough yet.
You will also have to edit your .vmx file by hand and adjust all occurences of the original vmdk name into the new name.
Oh and do take a backup before you do any of the above.
You could do so using the application Vimalin in my sig or by copying the whole bundle while the VM has been shut down. Vimalin OTOH can take a backup of the VM when it is running.
Hope this helps,
--
Wil
Thank you Wila. Wading through the ESXi and ESX KB instructions made me glad I'm using Fusion.
I did find Fusion KB 1015695 which used Settings>General to change the name but warned "The virtual machine bundle and files will still bear the virtual machine's original name. These files are referenced by the virtual machine settings and should not be renamed." Is "virtual machine bundle" another name for the .vmwarevm file in the Virtual Machines folder?
My bad. Thank you for pointing that out.
Hehe, the ESXi part is a bit different, but it has quite a few things that are similar or the same.
Yes, the bundle name is the term used for filename part that is before the .vmwarevm file extension.
So if you have a virtual machine folder that is called "MacOS 10.11.vmwarevm" then the whole folder with contents is referred to as a bundle.
However as the .vmwarevm file extension is hidden by default, with the bundle name is most often meant "MacOS 10.11".
If you want to rename the folder name, do the following:
In Fusion Library, from the context menu select "Delete", it will ask you if you want to "Move to trash, Cancel or Keep file"
With "file" they mean bundle and if you select "Keep file" you're fine.
By removing the VM from the library you don't end up with a non function VM in the list that has a confusing name.
Then you can rename the folder, rename the .vmx and from "File -> Open" you can select the renamed vmx in the renamed folder.
--
Wil
I think I'm getting it. To successfully rename the Virtual Machine (i.e., the "bundle), I'd need to rename what precedes .vmwarevm, then show the package contents, find the single .vmx file amid the bunch of .vmdk and other files, and change the .vmx file to the same name as the .vmwarevm file.
Moreover, when File>Open looks into the Virtual Machine folder, I gather it doesn't scan the names in that folder but rather looks at the name assigned to the .vmx file inside each of the bundles. Interestingly, the icon for that .vmx file is the icon of the bundle in the VM folder while all the other icons are different. Inside the .vmx file there seems to be a cross reference to the other files which compose the VM and those file names thus don't need to be updated. And in exploring that, I found that the name which appears in the VM Library list does not have to match the name of the .vmwarevm file which that VM on the list will open.
Nothing is ever simple...
The name you see in the library and the one you can change is stored in the .vmx file under displayName.
eg.
displayName = "macOS 10.12"
But as you can set that directly from within Fusion it is best edited using Fusion itself instead of directly mucking with settings in the vmx file.
Note that you don't _have_ to rename the vmx file to match your bundle(folder) name, but for consistency it might help.
--
Wil
Yup, there it is on line 46 of that particular .vmx file in the VM in question.
What would I lose in consistency if the .vmx file name doesn't match the .vmwarevm name of the bundle?
Just consistency for you, for the VM itself it doesn't matter.
--
Wil