Missing Virtual Machines in vsphere plugin

Hi guys,

we have successfully added our 3 vcenter in icingaweb2. Unfortunately, only one of the three vcenter displays the virtual machines
Datastores, ESXer, hardware information are available, only the virtual machines missed.

Is there a debug option?

The tree view shows VMs :thinking::thinking:

#icingacli vspheredb daemon run --trace --debug

Task virtualMachines failed: Storing virtual_machine[fW4MŭYь]] failed: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘guest_tools_running_status’ cannot be null, query was: INSERT INTO virtual_machine (uuid, vcenter_uuid, annotation, hardware_memorymb, hardware_numcpu, hardware_numcorespersocket, template, bios_uuid, instance_uuid, version, connection_state, online_standby, paused, guest_id, guest_full_name, guest_state, guest_host_name, guest_ip_address, guest_tools_status, guest_tools_running_status, resource_pool_uuid, runtime_host_uuid, runtime_last_boot_time, runtime_last_suspend_time, runtime_power_state, boot_network_protocol, boot_order, cpu_hot_add_enabled, memory_hot_add_enabled) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {array (
‘uuid’ => ‘fW4MŭY’ . “\0” . ‘ь]’,
‘vcenter_uuid’ => ’

Hello Hendrik,

which version of the module are you using? If not 1.1.0, update first please.

Regards,
Carsten

Hi Carsten,

it is version 1.1.0.

I suspect the problem directly in the vcenter. Maybe there are VM-corpses:

Task virtualMachines failed: Storing virtual_machine[fW4MŭYь]] failed: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘guest_tools_running_status’ cannot be null, query was: UPDATE virtual_machine SET connection_state = ?, guest_state = ?, guest_tools_running_status = ?, guest_tools_status = ? WHERE (uuid = ‘fW4MŭY\0ь]’) {array (
‘uuid’ => ‘fW4MŭY’ . “\0” . ‘ь]’,
‘vcenter_uuid’ => ’
Ih7B2’,
‘annotation’ => ‘Workstation Eugen’,
‘hardware_memorymb’ => ‘12288’,
‘hardware_numcpu’ => ‘4’,
‘hardware_numcorespersocket’ => ‘2’,
‘template’ => ‘n’,
‘bios_uuid’ => ‘422f8482-4f1e-7797-afc2-a196f1ac08d3’,
‘instance_uuid’ => ‘502f0daa-9353-adaa-8b0b-75d36e200479’,
‘version’ => ‘vmx-11’,
‘connection_state’ => ‘inaccessible’,
‘online_standby’ => ‘n’,
‘paused’ => ‘n’,
‘guest_id’ => NULL,
‘guest_full_name’ => NULL,
‘guest_state’ => ‘unknown’,
‘guest_host_name’ => NULL,
‘guest_ip_address’ => NULL,
‘guest_tools_status’ => NULL,
‘guest_tools_running_status’ => NULL,
‘resource_pool_uuid’ => ‘’ . “\0” . ‘#@fk:⥗7’,
-.’,untime_host_uuid’ => 'ԟ^R^ɔP
‘runtime_last_boot_time’ => NULL,
‘runtime_last_suspend_time’ => NULL,
‘runtime_power_state’ => ‘poweredOff’,
‘boot_network_protocol’ => ‘ipv4’,
‘boot_order’ => NULL,
‘cpu_hot_add_enabled’ => ‘n’,
‘memory_hot_add_enabled’ => ‘n’,
)}
CURL ERROR: Resolving timed out after 5515 milliseconds
Server for vCenterID=2 failed, will try again in 30 seconds

Unfortunately I can not find out directly which VM it concerns
The admins should look for :slight_smile:

icingacli vspheredb task sync --trace --debug --vCenterId 2

Task moRefs failed: CURL ERROR: Resolving timed out after 5515 milliseconds
#0 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/CurlLoader.php(213): Icinga\Module\Vspheredb\CurlLoader->request(‘POST’, ‘https://98livvc…’, ‘<?xml version="…’, Array)
#1 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/SoapClient.php(60): Icinga\Module\Vspheredb\CurlLoader->post(‘https://98livvc…’, ‘<?xml version="…’, Array)
#2 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/SoapClient.php(41): Icinga\Module\Vspheredb\SoapClient->doCurlRequest(’<?xml version="…’, ‘https://98livvc…’, ‘urn:vim25/6.0’, 1, 0)
#3 [internal function]: Icinga\Module\Vspheredb\SoapClient->__doRequest(’<?xml version="…’, ‘https://98livvc…’, ‘urn:vim25/6.0’, 1, 0)
#4 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Api.php(200): SoapClient->__soapCall(‘RetrieveService…’, Array)
#5 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Api.php(302): Icinga\Module\Vspheredb\Api->soapCall(‘RetrieveService…’, Object(SoapVar))
#6 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/LazyApiHelpers.php(108): Icinga\Module\Vspheredb\Api->fetchServiceInstance()
#7 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/PropertyCollector.php(22): Icinga\Module\Vspheredb\Api->getServiceInstance()
#8 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/LazyApiHelpers.php(92): Icinga\Module\Vspheredb\PropertyCollector->__construct(Object(Icinga\Module\Vspheredb\Api))
#9 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Sync/SyncManagedObjectReferences.php(164): Icinga\Module\Vspheredb\Api->propertyCollector()
#10 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Sync/SyncManagedObjectReferences.php(35): Icinga\Module\Vspheredb\Sync\SyncManagedObjectReferences->fetchNames()
#11 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/SyncRunner.php(89): Icinga\Module\Vspheredb\Sync\SyncManagedObjectReferences->sync()
#12 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/SyncRunner.php(206): Icinga\Module\Vspheredb\Daemon\SyncRunner->Icinga\Module\Vspheredb\Daemon{closure}()
#13 /usr/share/icingaweb2/modules/vspheredb/library/Vspheredb/Daemon/SyncRunner.php(188): Icinga\Module\Vspheredb\Daemon\SyncRunner->runNextImmediateTask()
#14 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/Timer/Timers.php(96): Icinga\Module\Vspheredb\Daemon\SyncRunner->Icinga\Module\Vspheredb\Daemon{closure}(Object(React\EventLoop\Timer\Timer))
#15 /usr/share/icingaweb2/modules/reactbundle/vendor/react/event-loop/src/StreamSelectLoop.php(183): React\EventLoop\Timer\Timers->tick()
#16 /usr/share/icingaweb2/modules/vspheredb/application/clicommands/TaskCommand.php(109): React\EventLoop\StreamSelectLoop->run()
#17 /usr/share/php/Icinga/Cli/Loader.php(265): Icinga\Module\Vspheredb\Clicommands\TaskCommand->syncAction()
#18 /usr/share/php/Icinga/Application/Cli.php(149): Icinga\Cli\Loader->dispatch()
#19 /usr/share/php/Icinga/Application/Cli.php(139): Icinga\Application\Cli->dispatchOnce()
#20 /usr/bin/icingacli(7): Icinga\Application\Cli->dispatch()

I have found the issue.

There was a VM without VMware-Tools. All Hosts/ VMs are available now. :slight_smile:

You should open a issue over at github. Others maybe also run into the same problen.

1 Like

Hi Carsten,

I think thats already done:

1 Like