Bug 1812685 - [RFE] Allow selecting a VMware host IP address for VM transformation
Summary: [RFE] Allow selecting a VMware host IP address for VM transformation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.11.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.11.5
Assignee: Fabien Dupont
QA Contact: Nandini Chandra
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1817005
TreeView+ depends on / blocked
 
Reported: 2020-03-11 20:51 UTC by Fabien Dupont
Modified: 2020-05-05 13:43 UTC (History)
4 users (show)

Fixed In Version: 5.11.5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1817005 (view as bug list)
Environment:
Last Closed: 2020-05-05 13:43:32 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:
pm-rhel: cfme-5.11.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2020 0 None None None 2020-05-05 13:43:43 UTC

Description Fabien Dupont 2020-03-11 20:51:23 UTC
Description of problem:
When CloudForms builds the input file for virt-v2v-wrapper, it uses 'host.ipaddress' to build the VMware URL. It happens that this IP address is the one on management network, which is probably not the most performance network connected to the ESXi host.

It would be great to have a mechanism to specify the IP address to use for VM transformation (V2V), so that the URL build can use it. The user could then provide the IP address on the most performant network. It would be user's responsibility to ensure that the IP address is reachable by conversion hosts.

A short term solution would be to add a custom attribute on the VMware host and the backend would use it if it is present, defaulting to 'host.ipaddress'.

Comment 2 Fabien Dupont 2020-03-11 21:06:00 UTC
https://github.com/ManageIQ/manageiq/pull/19954

Comment 3 CFME Bot 2020-03-20 19:05:17 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/6c2e86127f9c3e354d46cc29f5d4ad7ed1db2d0e
commit 6c2e86127f9c3e354d46cc29f5d4ad7ed1db2d0e
Author:     Adam Grare <agrare>
AuthorDate: Thu Mar 12 13:14:04 2020 +0000
Commit:     Adam Grare <agrare>
CommitDate: Thu Mar 12 13:14:04 2020 +0000

    Merge pull request #19954 from fdupont-redhat/v2v_bz_1812685

    Allow overriding ESXi IP address with a custom attribute

    (cherry picked from commit 920f914893d5c162c20c7aee0c8700d0c32d6d24)

    https://bugzilla.redhat.com/show_bug.cgi?id=1812685

 app/models/service_template_transformation_plan_task.rb | 2 +-
 spec/models/service_template_transformation_plan_task_spec.rb | 26 +-
 2 files changed, 26 insertions(+), 2 deletions(-)

Comment 4 CFME Bot 2020-03-20 19:40:25 UTC
New commit detected on ManageIQ/manageiq/jansa:

https://github.com/ManageIQ/manageiq/commit/d8d0a81f2c5a3f27787e0e1e3fa2910561e1d655
commit d8d0a81f2c5a3f27787e0e1e3fa2910561e1d655
Author:     Adam Grare <agrare>
AuthorDate: Thu Mar 12 13:14:04 2020 +0000
Commit:     Adam Grare <agrare>
CommitDate: Thu Mar 12 13:14:04 2020 +0000

    Merge pull request #19954 from fdupont-redhat/v2v_bz_1812685

    Allow overriding ESXi IP address with a custom attribute

    (cherry picked from commit 920f914893d5c162c20c7aee0c8700d0c32d6d24)

    https://bugzilla.redhat.com/show_bug.cgi?id=1812685

 app/models/service_template_transformation_plan_task.rb | 2 +-
 spec/models/service_template_transformation_plan_task_spec.rb | 26 +-
 2 files changed, 26 insertions(+), 2 deletions(-)

Comment 5 Ilanit Stein 2020-03-22 11:18:56 UTC
@Fabien,

Would you please add the rest api request details, or this addition?

Thanks.

Comment 6 Fabien Dupont 2020-03-23 06:57:10 UTC
To verify this one you need to use Rails console:

irb> host = Host.find_by(:name => 'esx42.example.com', :vendor => 'vmware')
irb> host.miq_custom_set('TransformationIPAddress', '172.16.0.42')

Then, when running the migration, in virt-v2v-wrapper log file, you will see that the IP address is used in the virt-v2v command line.

Using the API is not possible at the moment, because the 'hosts' collection doesn't support the 'custom_attributes' subcollection.
Another BZ/PR will add the ability to set it via API, but this already allows selecting a specific IP address.

Comment 7 Fabien Dupont 2020-03-23 13:27:57 UTC
The API change will be implemented with https://bugzilla.redhat.com/show_bug.cgi?id=1816003

Comment 8 Fabien Dupont 2020-03-23 14:17:44 UTC
I realized that it doesn't cover SSH transport method. Will need another PR. Moving back to ON_DEV.

Comment 9 Fabien Dupont 2020-03-23 14:37:09 UTC
https://github.com/ManageIQ/manageiq/pull/19995

Comment 10 Ilanit Stein 2020-04-06 05:44:56 UTC
@Nandini, 
This bug requires verification on both RHV & OSP,
as well as VDDK & SSH.

Comment 11 Fabien Dupont 2020-04-13 15:45:08 UTC
Ivanchuk backport PR: https://github.com/ManageIQ/manageiq/pull/20069

Comment 12 CFME Bot 2020-04-13 17:10:15 UTC
New commit detected on ManageIQ/manageiq/jansa:

https://github.com/ManageIQ/manageiq/commit/8bc4cf631609fd321632b5d883f7f3bb217733b3
commit 8bc4cf631609fd321632b5d883f7f3bb217733b3
Author:     Adam Grare <agrare>
AuthorDate: Mon Mar 23 15:05:51 2020 +0000
Commit:     Adam Grare <agrare>
CommitDate: Mon Mar 23 15:05:51 2020 +0000

    Merge pull request #19995 from fdupont-redhat/v2v_bz_1812685_2

    Allow overriding ESXi IP address with a custom attribute - Part 2

    (cherry picked from commit 7601966052680c426e319124c4bf789863a33d4c)

    https://bugzilla.redhat.com/show_bug.cgi?id=1812685

 app/models/service_template_transformation_plan_task.rb | 2 +-
 spec/models/service_template_transformation_plan_task_spec.rb | 19 +
 2 files changed, 20 insertions(+), 1 deletion(-)

Comment 14 Nandini Chandra 2020-04-23 23:30:20 UTC
Verified on 5.11.5.1

Verified with RHV using VDDK as the transport method..

Comment 18 errata-xmlrpc 2020-05-05 13:43:32 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, 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-2020:2020


Note You need to log in before you can comment on or make changes to this bug.