Powered Off VMware VMs Removed from Requisition with importVMAll=true

Description

I've noticed that VMs imported from vCenter, with provisiond config like:

end up getting removed when they are powered off. I would expect them to stick around.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Jesse White November 29, 2017 at 7:41 PM

Thanks for the report and for the help in identifying the affected lines.

Jesse White November 27, 2017 at 8:12 PM

Mike Kelly November 17, 2017 at 5:22 PM

Mark and I figured out where the flaw lies in the code.

This is a regression, introduced by https://github.com/OpenNMS/opennms/commit/61d35f20b13f63c46a59e454d42fb5b10a01e23f

The specific issue is in https://github.com/OpenNMS/opennms/blame/master/integrations/opennms-vmware/src/main/java/org/opennms/netmgt/provision/service/vmware/VmwareImportRequest.java#L196-L200 – it updates the "host" settings for VMs...

Workaround would appear to be setting the importVMPoweredOff & importVMSuspended flags instead. I'll test that.

Mike Kelly October 11, 2017 at 6:02 PM

I also feel like this may have worked as documented in either 18.0 or 19.0, but I'm not sure.

Mark Mahacek October 11, 2017 at 5:59 PM

I am seeing this issue too.  Could this be related to the fact that when powered off, the VMware Tools are not running and therefore don't report an IP address?

Fixed

Details

Assignee

Reporter

Components

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created October 11, 2017 at 5:52 PM
Updated November 29, 2017 at 7:41 PM
Resolved November 29, 2017 at 7:41 PM