Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: VMs are incorrectly marked as Linked Clones. Every VM discovered from VMware provider has "linked_clone": true. However, none of the VMs is sharing a disk or has a snapshot. Version-Release number of selected component (if applicable): cfme-5.9.2.4-1.el7cf VMware How reproducible: Always Steps to Reproduce: 1. Integrate VMware provider 2. Check the total number of VMs present # psql -U postgres -d vmdb_production -c "select name from vms where vendor='vmware';" | wc -l 3. Now, check the total number of VMs having linked_clone set as True: # psql -U postgres -d vmdb_production -c "select name from vms where vendor='vmware' and linked_clone='t';" | wc -l Actual results: All VMware VMs discovered in CFME has linked_clone value set as 't'. Expected results: Only VMs which are actually created as linked clone should be marked as true and rest should be marked as false.
Hi Nikhil, I just tested refreshing a vCenter and there are some VMs marked as linked_clone and some are not. I picked a couple of them to confirm they are expected. FYI, the logic of determining a linked_clone is here https://github.com/jameswnl/manageiq-providers-vmware/blob/fda5cdfa7ab90e36bba855ed24fbab3da56f8fa5/app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb#L962-L970 And you can use the vsphere's mob browser to confirm if the VM config matched the logic. Let me know the vCenter you are using and also a VM you think is being inventoried incorrectly. Thanks, James
Hi Nikhil, I have tested on 6.5, 6.0 and 5.5 and all of them are exhibiting this issue. I further look at the code we currently have and it was based on this blog http://www.vmdev.info/?p=546 which was apparently written for vSphere 4. Googling on the web, people are asking the same question about how to determine if a VM is a linked clone and there's no answer (Except the above mentioned blog) vSphere clients doesn't have options to create a linked clone VM. Only way to do so seems is through API. CFME cloning process does allow that. However, after the cloning, the VM is still defying the logic we have in code. So this feature seems broken for a long time as the code hasn't been touched for a long time. To fix this issue, there'll be considerable work and the method we will be using is simply our own observations and even that is not guaranteed to work for forthcoming vSphere releases. Can you provide more information about the customer case especially on how their business would be impact? Adding Brad to decide next step on this issue regards, James
(My comment on a earlier separate test on 7/17 was done on a smaller setup and that vCenter is broken when I want to look further into it)
Hi Brad and James, I have updated the following kcs solution: https://access.redhat.com/solutions/3533791 Regards, Niks
https://github.com/ManageIQ/manageiq-providers-vmware/pull/435
New commit detected on ManageIQ/manageiq-providers-vmware/master: https://github.com/ManageIQ/manageiq-providers-vmware/commit/913541977e5d7724f8c05751de2ae338d4fdff9f commit 913541977e5d7724f8c05751de2ae338d4fdff9f Author: Adam Grare <agrare> AuthorDate: Mon Aug 12 11:56:41 2019 -0400 Commit: Adam Grare <agrare> CommitDate: Mon Aug 12 11:56:41 2019 -0400 Linked Clone cannot be accurately collected Don't set the linked_clone attribute because it cannot be accurately detected and set. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1588908 app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb | 5 - 1 file changed, 5 deletions(-)