When I Datastore Browser to the vmx, it does not recognize the vmx file as a VM and does not give option to Add?
How I Got Into This Situation:
The changes I made to vmx were to delete these:
ethernetN.generatedAddress
ethernetN.addressType
ethernetN.generatedAddressOffset
and add these:
ethernet0.addressType = "static"
ethernet0.address = 00:0c:29:1f:4c:31
Can anyone offer any tips on how to get a manually edited VM back into inventory?
Thanks in advance,
-Ed
The double quote for the ethernet0.checkMACAddress are in different format from the other values, see:
ethernet0.pciSlotNumber = "160"
ethernet0.checkMACAddress = “false”
ethernet0.addressType = "static"
ethernet0.address = "00:0C:29:2F:4C:31"
You may try rebuild the .vmx file from the vmware.log, see: VMware KB: Rebuilding the virtual machine's .vmx file from vmware.log
What I'm not sure about is why you were not able to save the file!?
Anyway, there might be a syntax error in the file (e.g. missing quotes). Either double-check the modified entries for errors, or attach the .vmx file to a reply post.
Btw. which ESXi version/build do you use?
André
I attached vmx file.
[root@localhost:~] vmware -vl
VMware ESXi 6.0.0 build-3029758
VMware ESXi 6.0.0 Update 1
I think the vmx file is fine. Could it be some kind of security issue?
Did ESXi make a checksum or hash of the vmx, and now that I manually edited the vmx, ESXi refuses to recognize it?
I added these three lines:
ethernet0.checkMACAddress = “false”
ethernet0.addressType = "static"
ethernet0.address = "00:0C:29:2F:4C:31"
I wrapped the MAC address in quotes after seeing one KB article with quotes and another without. I also changed all hex chars to uppercase. The Datastore Browser does still not recognize as a vmx or present option to add back into inventory?
ESXi 6
[root@localhost:~] vmware -vl
VMware ESXi 6.0.0 build-3029758
VMware ESXi 6.0.0 Update 1
The double quote for the ethernet0.checkMACAddress are in different format from the other values, see:
ethernet0.pciSlotNumber = "160"
ethernet0.checkMACAddress = “false”
ethernet0.addressType = "static"
ethernet0.address = "00:0C:29:2F:4C:31"
Your are right. I had added that line in desperation. I fixed it - same problem.
I just deleted - same problem.
Do I need to reboot or anything when editing vmx files so that ESXi sees the change?
The Datastore Browser still recognizes it as a normal file, NOT a vmx file.
You were right it was a VMX file problem. Not sure what though. Maybe some hidden characters when I cut and pasted from a KB article into VI editor.
I deleted the other 2 changes and now Datastore Browser recognizes it as Vmx file again.
You're welcome and don't forget mark answers as helpful or correct.
Thank you both.
While a related but different issue, I still cannot add it to inventory.
Register VM
A VM or template having same name is already registered.
Save error: Specified key, name or identifier '21' already exists.
This may be a result of trying to command line register the vmx file thinking it might fix the problem.
The inverse command of this:
vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx
Solved the final problem and VM is running again:
vim-cmd vmsvc/unregister vmid
Thanks again,
-Ed
Check if helps: VMware KB: Determining a virtual machine's associated vmx/.vmtx file