Hi,
Today I upgraded a very old VmBix server to the current version 2.3.0.59. At the moment I use Low Level Discovery for Datastore and ESXi servers. The vsphere environment is 6.0.
I enabled the useuuid=true setting in the vmbix.conf.
I noticed that only VMFS datastores where discovered, the NAS datastores not. I noticed a "{#UUID}":"N/A" with all the NAS datastores. The UUID of VMFS datastores are correct.
I looked at the code and changed the following in de getDatastores function to make it work:
if (d != null) {
//Correction by Andrea for trap the NasDatastoreInfo
if (d.getInfo() instanceof NasDatastoreInfo)
{
NasDatastoreInfo dsInfo = (NasDatastoreInfo) d.getInfo();
if ( dsInfo != null ) {
HostNasVolume naaName = dsInfo.getNas();
JsonObject jObject = new JsonObject();
jObject.addProperty("{#DATASTORE}", d.getName());
//jObject.addProperty("{#UUID}", uuid);
jObject.addProperty("{#UUID}", "N/A");
jObject.addProperty("{#CLUSTER}", d.getParent().getName());
jObject.addProperty("{#LOCAL}", !d.getSummary().multipleHostAccess);
jObject.addProperty("{#NAA}", naaName.getName());
jArray.add(jObject);
}
}
to:
if (d != null) {
//Correction by Andrea for trap the NasDatastoreInfo
if (d.getInfo() instanceof NasDatastoreInfo)
{
NasDatastoreInfo dsInfo = (NasDatastoreInfo) d.getInfo();
if ( dsInfo != null ) {
HostNasVolume naaName = dsInfo.getNas();
JsonObject jObject = new JsonObject();
jObject.addProperty("{#DATASTORE}", d.getName());
//jObject.addProperty("{#UUID}", uuid);
jObject.addProperty("{#UUID}", dsInfo.url.substring(19, dsInfo.url.length() - 1) );
jObject.addProperty("{#CLUSTER}", d.getParent().getName());
jObject.addProperty("{#LOCAL}", !d.getSummary().multipleHostAccess);
jObject.addProperty("{#NAA}", naaName.getName());
jArray.add(jObject);
}
}
I was inspired by the function getManagedEntityByUuid where the following is coded:
Hi, Today I upgraded a very old VmBix server to the current version 2.3.0.59. At the moment I use Low Level Discovery for Datastore and ESXi servers. The vsphere environment is 6.0. I enabled the useuuid=true setting in the vmbix.conf.
I noticed that only VMFS datastores where discovered, the NAS datastores not. I noticed a "{#UUID}":"N/A" with all the NAS datastores. The UUID of VMFS datastores are correct.
I looked at the code and changed the following in de getDatastores function to make it work:
to:
I was inspired by the function getManagedEntityByUuid where the following is coded: