vSphere VMs not visible issue

Hello all,

Ive just added the vSphere plugin, connected just fine to the vCenter, all hosts are there, with all usages and info, networks, datastores, but the VM list is empty. In tree structure it shows 155 VMs but none shown.
{E7B46919-663A-4AD2-828E-C8074596CA0C}

This i think is the issue connected to error message im getting in vCenter conection log:

11:22:48: [db] Task Virtual Machines failed. Undefined property: stdClass::$state: /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/DbObject/VirtualMachine.php (231)

This fails because some VMs dont have VMware Tools installed right?

Is there a way to bypass this? Only thing i found is some GitHub issues that are shown as commited already 2 years ago and my install is 3 months old. These also just have some random blocks of code included but without some context i cant really follow what i need to do since im not a developer.

I currently have no way of installing missing VMware tools instances without major downtimes on side of ERP servers, which is an issue.

Any advice would be appreciated.

BR,
Terro

That error messsage is a pretty common issue. You could trying to install the Master branch of the Module instead of the Release.

There is only master branch from what i can tell and thats the one i have installed too.

This is caused by some state of network adapter, i dont know which state bothers it but its messing with the rest of the code.

I already applied the fix for NULL db entries to be allowed but it didnt do anything since no network was mentioned in the schema.


ALTER TABLE virtual_machine
  MODIFY COLUMN hardware_memorymb INT UNSIGNED NULL DEFAULT NULL,
  MODIFY COLUMN hardware_numcpu TINYINT UNSIGNED NULL DEFAULT NULL,
  MODIFY COLUMN hardware_numcorespersocket TINYINT UNSIGNED DEFAULT 1 NULL DEFAULT NULL,
  MODIFY COLUMN template ENUM('y', 'n') NULL DEFAULT NULL,
  MODIFY COLUMN version VARCHAR(32) NULL DEFAULT NULL,
  MODIFY COLUMN online_standby ENUM('y', 'n') NULL DEFAULT NULL,
  MODIFY COLUMN cpu_hot_add_enabled ENUM('y', 'n') NULL DEFAULT NULL,
  MODIFY COLUMN memory_hot_add_enabled ENUM('y', 'n') NULL DEFAULT NULL,
  MODIFY COLUMN guest_state ENUM (
    'notRunning',
    'resetting',
    'running',
    'shuttingDown',
    'standby',
    'unknown'
  ) NULL DEFAULT NULL,
  MODIFY COLUMN guest_tools_running_status ENUM (
    'guestToolsNotRunning',
    'guestToolsRunning',
    'guestToolsExecutingScripts' -- VMware Tools is starting.
  ) NULL DEFAULT NULL;

Any further ideas? GitHub issue is opened already, cant find any other solution to this. Master branch is the one thats installed, couldnt see others because i was logged out, so thats fine.

BR,
Terro

Maybe it’s the same problem I have! I miss all new VMs in the module.
Already collected ones stay present and it looks like information gets updated.