VMware vSphere

 View Only
  • 1.  Re-create .VMX in datastore

    Posted Jan 19, 2019 02:09 AM

    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 ?



  • 2.  RE: Re-create .VMX in datastore

    Posted Jan 19, 2019 03:19 AM

    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.



  • 3.  RE: Re-create .VMX in datastore

    Posted Jan 19, 2019 01:36 PM

    ... 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".

    André



  • 4.  RE: Re-create .VMX in datastore

    Posted Jan 19, 2019 03:14 PM

    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