After upgrading from Foglight 5.2.4 to Foglight 5.2.4.5, the VMware cartridge is unable to be activated. Might receive error like the following:
Error [One or more cartridges installed could not be enabled, Error with cartridge Virtual-VMware-5.2.4.5 : com.quest.nitro.service.cartridge.api.CartridgeDeploymentException: Cartridge could not be activated. All components have been successfuly deactivated.]
Problem is due to there being a "null" value in the VM name(s) that vFoglight is trying to pull metrics from.
Login to the vFoglight console and then expand "Administration" on the left-side tray under "Dashboards". Next expand "Tooling" and click on "Script Editor." Copy and Paste the below script in the "Script" box which is in the middle of the page and click on the "Run" button.
ts = server.get("TopologyService");
tyVM = ts.getType("VMWVirtualMachine");
tyESX = ts.getType("VMWESXServer");
vms = ts.getObjectsOfType(tyVM);
esxs = ts.getObjectsOfType(tyESX);
fixedObjects = 0;
updateNameOfObj = { theObj, newName ->
try
{
if(theObj)
{
oldName = theObj.get("name");
if(oldName == null)
{
objUpdate = ts.beginUpdate(theObj);
objUpdate.set("name",newName);
ts.endUpdate(objUpdate);
println "Object renamed to : "+newName;
fixedObjects++
}
else
{
println "Object had a non-null name";
}
}
}
catch(Exception ex)
{
println "Exception occurred trying to modify Object's name";
}
};
int nameAddlNbr = 1;
vms.each { vm ->
String vmName = vm.get("name");
if(vmName == null)
{
String newVmName = "tempVMNameforUpgrade"+nameAddlNbr++;
updateNameOfObj(vm,newVmName);
}
}
nameAddlNbr = 1;
esxs.each { esx ->
String esxName = esx.get("name");
if(esxName == null)
{
String newESXName = "tempESXNameforUpgrade"+nameAddlNbr++;
updateNameOfObj(esx,newESXName);
}
}
return "Renamed "+fixedObjects+" objects";
After the script has ran, go to cartridge inventory and activate the VMware 5.2.4.5 cartridge. DO NOT UNINSTALL THE 5.2.3 CARTRIDGE.
This should allow the cartridge to be activated.
This will also be the same for 5.2.4.6 upgrades since the cartridge has not changed.
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy