VMware Cloud Community
Don_G
Contributor
Contributor
Jump to solution

Template lost its .vmtx file

How do i recreate the vmtx file or just convert the template back to a VM with out this file? i am unable to update the template with out this file. clones seem to still work.

Any suggestions?

Don

Reply
0 Kudos
1 Solution

Accepted Solutions
lockenkeyster
Enthusiast
Enthusiast
Jump to solution

Don,

Please create a new blank VM on the same datastore as your template VM.

Remove and delete the disk created with this new VM under Edit Settings.

Using the datastore browser, copy the .vmdk file that exists in your template VM folder into the folder of the new VM.

Go to Edit Settings for the new VM, and choose to add a disk.

Instead of creating a new disk, browse to the .vmdk file that you just copied over and add that.

If you can boot this VM (and convert it to a template) then you can safely delete the old VM/template.

how do i get more log info on what is causing this generic error?

Generally, for an error like this, you can look in the vmware.log file(s) that exist in the same folder on the datastore as the VM.

View solution in original post

Reply
0 Kudos
8 Replies
lockenkeyster
Enthusiast
Enthusiast
Jump to solution

If there is no longer an associated .vmx or .vmtx file for a VM, you can associate it with a new one by creating a new VM. Instead of creating a new .vmdk disk when you create the VM, point it to the existing .vmdk(s) in the folder where your template lives.

Reply
0 Kudos
Don_G
Contributor
Contributor
Jump to solution

i sitll have the vmsd, nvram, vmdk, vmxf, and vmx files. can i use any of those to recreate the vmtx?

i still have the template showing up in my VC.

Reply
0 Kudos
lockenkeyster
Enthusiast
Enthusiast
Jump to solution

Since there is a .vmx and no .vmtx file, vCenter thinks that your VM is not a template anymore. Is there an option to Convert to template when you right-click on it in the ui? If not, try removing the VM from the inventory (without deleting the files) and then browse the datastore to add it fresh. Once that is done, the option to convert it to a template should appear.

Reply
0 Kudos
Don_G
Contributor
Contributor
Jump to solution

the convert to Vm is there, but gives the error of the missing vmtx file.

I removed from inventory and tried to readd but it failes with the operation is not allowed in the current state.

how do i get more log info on what is causing this generic error?

Don

Reply
0 Kudos
lockenkeyster
Enthusiast
Enthusiast
Jump to solution

Don,

Please create a new blank VM on the same datastore as your template VM.

Remove and delete the disk created with this new VM under Edit Settings.

Using the datastore browser, copy the .vmdk file that exists in your template VM folder into the folder of the new VM.

Go to Edit Settings for the new VM, and choose to add a disk.

Instead of creating a new disk, browse to the .vmdk file that you just copied over and add that.

If you can boot this VM (and convert it to a template) then you can safely delete the old VM/template.

how do i get more log info on what is causing this generic error?

Generally, for an error like this, you can look in the vmware.log file(s) that exist in the same folder on the datastore as the VM.

Reply
0 Kudos
krowczynski
Virtuoso
Virtuoso
Jump to solution

Have you tried to resrart the vCenter Service?

MCP, VCP3 , VCP4
Reply
0 Kudos
Don_G
Contributor
Contributor
Jump to solution

Thanks for your help. i had to move it to a different volume after recreating as the page file could not be created for some reason. but after that i am able to update and convert it back to a template.

Reply
0 Kudos
m_pahlevanzadeh
Enthusiast
Enthusiast
Jump to solution

i don't have template file.

Reply
0 Kudos