Archive

Posts Tagged ‘VM’

ESX VM guest listed as (invalid)

So we had a massive maintenance on one of our ESX clusters. The maintenance entailed the complete shutdown of all VMs and hosts in the cluster. The entire task went relatively fine, with the exception of the usual stuff like:

  • HA configuration failed to apply to most of the hosts when they were powered on. Fix for this issue is straight forward: Disable HA for the cluster and re-enable it.

 

The upside to disabling HA when having to power-on multiple VMs (350+) is that they power-on faster, as the VMs do not have to go through HA admission control and you will of course receive no HA related errors 🙂

  • Job queuing in VI causing VMs to take some time to power-on

It appears to me that VI just throws all jobs in a pool and try to get to them as fast as possible. I would like the option to tell it to process a set amount of jobs at a time. This can of course be achieved with the power of shell, but if anybody knows how it can be done in the GUI, let me know.

But what about the invalid VM?

Well, one of the machines came up with the name in italics and with an (invalid) appended to the name… Of course the GUI did not provide much help. When attempting to power on the machine, the only message I got was a “not allowed in the the current state”

Directed by this post: http://itsupportjournal.com/2008/12/09/fix-invalid-guest-on-virtual-center/ I started checking my .vmx file for errors and found.. none. As it turns out, my issue was in the extended config file (.vmxf)

This is what was in there:

I started scratching my head, as it was obvious that the invalid came from this file, but how to create a new one, when the .vmxf file contains a unique identifier type string amongst others:

(?xml version="1.0"?)
(Foundry)
(VM)
(VMId type="string")52 fc dd 7e 09 fa ac 07-46 87 01 ad 28 e5 ca 98(/VMId)
(ClientMetaData)
(clientMetaDataAttributes/)
(HistoryEventList/)(/ClientMetaData)
(vmxPathName type="string")vmname.vmx(/vmxPathName)(/VM)(/Foundry)

Well sometimes the easy solution is the right one (love when that happens 🙂

  1. Unregister the invalid VM in VI
  2. Open the datastore browser and browse to the folder containing the VM
  3. Rename the original .vmxf file.
  4. Register the VM in VI from the datastore browser (right-click –> Add to inventory –> Step through the wizard)
  5. A new and proper .vmxf file is generated
  6. Power-On the VM

Do let me know if there is any way of “hand creating” the extended config file. Not that it is very useful if it can be automatically generated, but it would be cool to be able to do it…

/theAdminGuy

Categories: ESX, VMware Tags: , ,
%d bloggers like this: