Bug 1804791

Summary: VMware Provider refresh does not update the Advanced Configuration settings of a VM
Product: Red Hat CloudForms Management Engine Reporter: Peter McGowan <pmcgowan>
Component: ProvidersAssignee: Adam Grare <agrare>
Status: CLOSED NOTABUG QA Contact: Kedar Kulkarni <kkulkarn>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.11.2CC: dmetzger, jfrey, jhardy, mshriver, obarenbo
Target Milestone: GA   
Target Release: 5.11.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-20 16:37:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: VMware Target Upstream Version:
Embargoed:

Description Peter McGowan 2020-02-19 16:08:21 UTC
Description of problem:
If the configuration of a VMware VM changes such that the vSphere Advanced Configuration Parameters change, the updated advanced parameters are not included in an inventory refresh.

Version-Release number of selected component (if applicable):
5.11.1.2

How reproducible:
Every time


Steps to Reproduce:
1. Find a VMware VM in the CFME WebUI. Click on "Advanced Settings" in the UI page for the VM, and note the number of settings.
2. In the vSphere console, make a change to the VM configuration, either by adding a NIC and rebooting, or by editing the VM's setting (Configure -> Edit -> VM Options -> Configuration Parameters -> Edit Configuration)
3. Force an inventory refresh in the CFME WebUI using Configuration -> Refresh Relationships and Power States.


Actual results:
Re-examine the "Advanced Settings" in the UI page for the VM, and note that the changed vSphere setting hasn't propagated to CloudForms.

Expected results:
The "Advanced Settings" in the UI page for the VM should show the changed vSphere setting.

Additional info:
This BZ from several years ago (https://bugzilla.redhat.com/show_bug.cgi?id=942532) appeared to make this a configuration option, but the setting...

ems_refresh:
  collect_advanced_settings: false

no longer seems to be valid. The Migration Analytics project would like to use some of the advanced configuration settings to determine a VM's suitability for migration.

Comment 2 Adam Grare 2020-02-20 16:24:49 UTC
Hey Pete, wow that's an old one.

It appears this was subsequently removed in:
commit fafbd76328d9ec0ba031ad35f43f88e2d0aa72a0
Author: Jason Frey <jfrey>
Date:   Thu Mar 29 21:42:34 2012 +0000

    Removed Vm Advanced Settings from EMS Refresh.
    BuzgID:14475
    
    git-svn-id: http://miq-ubuntusub.manageiq.com/svn/svnrepos/Manageiq/trunk@34243 3c68ef56-dcc3-11dc-9475-a42b84ecc76f

-      @collect_advanced_settings = vmdb_config.fetch_path(:ems_refresh, :collect_advanced_settings)
-      @collect_advanced_settings = true if @collect_advanced_settings.nil?


So I'm going to say that while this might technically be a regression, it isn't a regression in any shipped version of Red Hat CloudForms as far as I can tell.

The properties you're talking about are stored in the VIM SDK under vm.config.extraConfig.  These are collected when doing a Smart State Scan of the virtual machine.

E.g. after running a smartsate scan on arif_tvm_1
>> pp VmOrTemplate.find_by(:name => "arif_tvm_1").advanced_settings.pluck(:name)
["tools.guest.desktop.autolock",
 "nvram",
 "pciBridge0.present",
 "svga.present",
 "pciBridge4.present",
 "pciBridge4.virtualDev",
 "pciBridge4.functions",
 "pciBridge5.present",
 "pciBridge5.virtualDev",
 "pciBridge5.functions",
 "pciBridge6.present",
 "pciBridge6.virtualDev",
 "pciBridge6.functions",
 "pciBridge7.present",
 "pciBridge7.virtualDev",
 "pciBridge7.functions",
 "hpet0.present",
 ...

Which can be seen in the advanced configuration parameters in the vSphere UI