Bug 1884970 - [v2v][Doc][VMware to CNV VM import API] Storage Mapping: Source storage name should change to storage id
Summary: [v2v][Doc][VMware to CNV VM import API] Storage Mapping: Source storage name ...
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: V2V
Version: 2.5.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 2.5.0
Assignee: Sam Lucidi
QA Contact: Md Nadeem
Depends On:
TreeView+ depends on / blocked
Reported: 2020-10-04 08:22 UTC by Ilanit Stein
Modified: 2020-11-17 13:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-11-17 13:24:56 UTC
Target Upstream Version:

Attachments (Terms of Use)
VMware datastore details screenshot (14.18 KB, image/png)
2020-10-04 09:03 UTC, Ilanit Stein
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:5127 0 None None None 2020-11-17 13:25:33 UTC

Description Ilanit Stein 2020-10-04 08:22:43 UTC

1. Source storage "name" should change into storage "id".
2. There should be a reference/explanation how to fetch this id.

Current documentation:
apiVersion: v2v.kubevirt.io/v1beta1
kind: ResourceMapping
 name: example-vmware-resourcemappings
 namespace: example-ns
    - source:
        name: VM Network # map network name to network attachment definition
      target: xyz
      type: multus
    - source:
        id: network-7 # alternatively the network can be mapped by managed object reference
        name: pod
      type: pod
    - source:
        name: iSCSI_Datastore # maps disks in a given VMware datastore to a storage class   <========== name should change into id.
      target: storage_class_1

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

Comment 1 Ilanit Stein 2020-10-04 09:02:11 UTC
Use the API explorer to list the datastores and get the reference from there
https://<VMware FQDN>/apiexplorer/
you'll have to log in on that page, 
then find 'datastores' and the entry for GET /vcenter/datastore
https://<VMware FQDN>/apiexplorer/#!/datastore_/get_vcenter_datastore
that will give you a list of objects that have a key called "datastore" with a value formatted like "datastore-30"
click "Try It Out!" at the bottom of the GET /vcenter/datastore section

That will display VMware datastore details(See "VMware datastore details" attachment), 
including "datastore" field with value of the required datastore id, like "datastore-12"

Comment 2 Ilanit Stein 2020-10-04 09:03:27 UTC
Created attachment 1718743 [details]
VMware datastore details screenshot

Comment 4 Fabien Dupont 2020-10-07 07:05:00 UTC
@Sam, I think that https://github.com/kubevirt/vm-import-operator/pull/410 fixes the storage mapping by name, and updates the documentation with examples with both name and id.

Comment 5 Md Nadeem 2020-10-23 16:22:43 UTC
verified on CNV version: 2.5.0-234

VM import works with both storage id or storage name

Comment 8 errata-xmlrpc 2020-11-17 13:24:56 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 (OpenShift Virtualization 2.5.0 Images), and where to find the updated
files, follow the link below.

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


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