Description of problem: 1. Please provide details on how to fetch VM Id, required for the VM import creation yaml. 2. Please provide details on the option to provide VM name instead of id. VM import create ---------------- cat <<EOF | oc create -f - apiVersion: v2v.kubevirt.io/v1beta1 kind: VirtualMachineImport metadata: name: vmware-import-1 namespace: default spec: providerCredentialsSecret: name: vmw-secret namespace: default # optional, if not specified, use CR's namespace resourceMapping: name: example-vmware-resourcemappings namespace: default targetVmName: vmw-import startVm: false source: vmware: vm: id: 42037aff-4d6f-cf89-7979-e98cbc406c0e <===== VM ID EOF Version-Release number of selected component (if applicable): CNv-2.5 Additional info: For 1: VM "id" is the VM UUID. You can find that in the vCenter flash client. Find the host with the VM you want, choose the VMs tab, and then right click on the columns to "show/hide columns". Check the box for "UUID". For 2: You don't need to provide the cluster as part of the source. You just need to use the name of the VM. If the name is ambiguous, you can provide the full inventory path but you probably won't need to.
Finding the UUID is pretty much out of scope. A VMware administrator should be able to help. The VDDK nbdkit plugin documentation, points to this VMware blog post: https://blogs.vmware.com/vsphere/2012/02/uniquely-identifying-virtual-machines-in-vsphere-and-vcloud-part-2-technical.html And the blog post points to this VMware communities article: https://communities.vmware.com/docs/DOC-18525 And the article has this Perl script attached: https://communities.vmware.com/servlet/JiveServlet/download/18525-1-82893/vmMoRefFinder.pl I would simply point to the blog post. The problem with the Flash client is that it's deprecated. And the MTV UI will remove the need for finding the UUID. That's why I've set the priority to medium.
Moving to CNV 2.5.1 as it's medium priority.
https://github.com/kubevirt/vm-import-operator/pull/435
Verified on latest upstream doc: https://github.com/kubevirt/vm-import-operator/blob/master/examples/vmware/vmimport-external-mapping.yaml https://github.com/kubevirt/vm-import-operator/blob/master/examples/vmware/vmimport-internal-mapping.yaml
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.2 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. https://access.redhat.com/errata/RHEA-2020:5560