I recently came across an issue wherein I had to recreate vmx file. I thought of sharing it with you all hoping that it will help you as well.
VMX file is the primary configuration file, which stores settings chosen in the New Virtual Machine Wizard or virtual machine settings editor.
If you try to power on the virtual machine, you will see an error similar to below.
There are a couple of ways recreating vmx file, the easiest way would be to able to get it from your backup team or try and manually create the file.
There is another way of creating the file that I want to share with you guys today.
We will beĀ using the vSphere Client to perform this activity.
If the Virtual Machine is still part of the inventory, make sure that you remove it by right click on the VM and selecting Remove from Inventory.
We perform this to make sure that there are no conflicts when we try to create the vmx file with the same VM name.
Now you need to open up a New Virtual Machine Wizard and select the Custom Install option.
Next, you need to make sure that the VM name matches exactly to the Virtual Machine directory name on the datastore that is hosting the missing or the corrupt vmx file.
If the name mismatches here, then a new Virtual Machine directory will be created along with the vmx file and other important virtual machine files.
You would then have to select the location on the datastore that you want to store the Virtual Machine. It is best to select the datastore on which the vmdk files are located.
You would then have to go through the normal procedure of providing information like Hardware version, Guest OS type, vCPUs, Network, SCSI controller type.
Be careful when you reach the Select a Disk option. You will have to select the existing disk and point it to the primary vmdk file of the Virtual Machine.
Once you complete the process of creating a new VM, you would then be able to see the new vmx file created in the Virtual Machine directory.
You should now be able to power on the affected virtual machine.
I hope this has been informative and thank you for reading!
4 Comments
Perfect
Thank You!
Doesn’t friggen work.
Give this KB a try.
https://kb.vmware.com/kb/1023880