Bug 2101410

Summary: Partial fix: Creating VMWare 7.x VM fails with InvalidArgument ... deviceChange[1].device.key
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: Compute Resources - VMWareAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: bbuckingham, chrobert, mhulan, osousa
Target Milestone: 6.10.7Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-fog-vsphere-3.5.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-06 12:07:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukáš Hellebrandt 2022-06-27 12:11:29 UTC
This is a BZ describing a partial fix of bug 2072696.

The original BZ describes the problem as follows:
```Creating a new VM from a template on VMware vCenter 7.x fails with ESX throwing an error and foreman rolling back the task. The error logged by foreman in the production.log is: "InvalidArgument: A specified parameter was not correct: deviceChange[1].device.key".
```
See details in the original BZ. 

The original bug fix did not meet the requirements for verification as described in comment 15, in short, it only 100% works for devices with at most one interface, and for the others, it fails randomly. Therefore, that BZ failed QA. 

However, the code that partially fixes the issue stays included in the released version. This is a BZ created to ensure we have a way to inform customers that the issue is partially fixed by linking it in the release information document. 

This BZ limits the original requirements for the fix. For this BZ, we only require the fix to work for VMs that have 0 or 1 interface. We explicitly permit this fix to fail for any other interfaces count.

Comment 4 Lukáš Hellebrandt 2022-06-28 14:45:48 UTC
Verified with Sat 6.10.7 snap 1.0 and vSphere Client versions 7.0.3.00500 and (thanks Chris Roberts for the instances) 6.7.0.51000.

Added the VMWare as CR, created an Image based on a Template existing on VMWare, created a new host with one interface from that template. The host and VM got created and the correct template was used, correct interface was created.

Comment 9 errata-xmlrpc 2022-07-06 12:07:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.10.7 Async Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:5516