VMware Cloud Community
TECH198
Hot Shot
Hot Shot

Re-create .VMX in datastore

I know in vsphere client a workaround to re-creating a corupted/lost .vmx file is to "create a new VM" with same same, but point to existing .vmdk image, this doesn't work anymore. as there is no option in esxp 6 to select existing..

How do i recreate .vmx ?

I use HeadStart Restore  of Imagemagaer to restore VM, but it only backup/restores .vmdk... the .vmx is users problem.... Since my .vmx. no longer matches, vm won't power on,  so it lookslike i must recreate it,

However i have no idea how to do this exsi 6.. MUst i use OVFTool now ?

Tags (1)
0 Kudos
3 Replies
bluefirestorm
Champion
Champion

You can re-create the vmx configuration file from old vmware.log file (when power up was still OK).

You can follow this KB https://kb.vmware.com/kb/1023880

or you could simply just brute force copy the sections from vmware.log and simply remove the text that is not needed.

0 Kudos
a_p_
Leadership
Leadership

... but point to existing .vmdk image, this doesn't work anymore. as there is no option in esxp 6 to select existing.

Adding an existing virtual disk still works, although the workflow is different in the web client.

From "Customize settings" you may delete the predefined virtual disk, and use the "Add hard disk" drop down menu to add an "Existing hard disk".

pastedImage_0.png

André

0 Kudos
Ardaneh
Enthusiast
Enthusiast

You can create a new VM (PowerdOff) with a new disk. Then browse the folder of this new VM to change the VMX file tags. You need to change the path of VMDK like this:

scsi0:0.filename = "NewVM.vmdk"

change it to:

scsi0:0.filename = "OldVM.vmdk"

and after you saved your changes, put that new VMX file into the old VM folder and rename it. if you had more than one disk on the old VM, you can use the tag for every VMDK file separately:

scsi0:1.filename = "OldVM1.vmdk"

scsi0:2.filename = "OldVM2.vmdk"

I hope this can be helpful

0 Kudos