Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1311415

Summary: virt-v2v searches wrong device path when importing VMware VMs with snapshot
Product: Red Hat Enterprise Linux 7 Reporter: Chen <cchen>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: ptoscano, rjones
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-03 12:17:57 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 Chen 2016-02-24 08:18:36 UTC
Description of problem:

virt-v2v searches wrong device path when importing VMware VMs with snapshot

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

VMware vsphere 5.5
OSP 7.0 (Juno)

How reproducible:

100%

Steps to Reproduce:
1. Create a snapshot for the VM which is called "testcase" in VMware environment
2. Import the VM from VMware environment to OSP 7.0
3. You will find the following error

virt-v2v: error: vcenter: URL not found: 
https://<vcenter>/folder/testcase/testcase-000001-flat.vmdk?dcPath=My%5fDC&dsName=datastore1


Actual results:

The v2v is failed

Expected results:

The v2v should be successful

Additional info:

Comment 1 Chen 2016-02-24 08:19:44 UTC
The full stdout & stderr is:

# virt-v2v -v -x -ic 'vpx://VSPHERE.LOCAL%5cAdministrator.212.175/My_DC/10.72.32.47?no_verify=1' "testcase" -o glance
virt-v2v: libguestfs 1.28.1 (x86_64)
[   0.0] Opening the source -i libvirt -ic vpx://VSPHERE.LOCAL%5cAdministrator.212.175/My_DC/10.72.32.47?no_verify=1 testcase
input_libvirt_vcenter_https: source: scheme vpx server 10.66.212.175
Enter VSPHERE.LOCAL\Administrator's password for 10.66.212.175: 
Enter host password for user 'VSPHERE.LOCAL\Administrator':
libvirt xml is:
<domain type='vmware'>
  <name>testcase</name>
  <uuid>423f20b0-17db-0586-257d-437a164c0195</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64'>hvm</type>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <disk type='file' device='disk'>
      <source file='[datastore1] testcase/testcase-000001.vmdk'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0' model='lsilogic'/>
    <interface type='bridge'>
      <mac address='00:50:56:bf:21:52'/>
      <source bridge='VM Network'/>
      <model type='e1000'/>
    </interface>
    <video>
      <model type='vmvga' vram='8192'/>
    </video>
  </devices>
</domain>

vcenter: calculated dcPath as: My_DC
curl -q --insecure --user '<hidden>' --head --silent --url 'https://10.66.212.175/folder/testcase/testcase-000001-flat.vmdk?dcPath=My%5fDC&dsName=datastore1'
HTTP/1.1 404 Not Found
Date: Wed, 24 Feb 2016 14:45:46 GMT
Set-Cookie: vmware_soap_session="525c2cbe-fea0-8712-7c99-f83724ad1725"; Path=/; HttpOnly; Secure; 
Connection: close
Content-Type: text; charset=plain
Content-Length: 0

curl -q --insecure --user '<hidden>' --head --silent --url 'https://10.66.212.175/folder/testcase/testcase-000001-flat.vmdk?dcPath=My%5fDC&dsName=datastore1'
HTTP/1.1 404 Not Found
Date: Wed, 24 Feb 2016 14:45:46 GMT
Set-Cookie: vmware_soap_session="525c2cbe-fea0-8712-7c99-f83724ad1725"; Path=/; HttpOnly; Secure; 
Connection: close
Content-Type: text; charset=plain
Content-Length: 0

virt-v2v: error: vcenter: URL not found: 
https://10.66.212.175/folder/testcase/testcase-000001-flat.vmdk?dcPath=My%5fDC&dsName=datastore1

The '--dcpath' parameter may be useful.  See the explanation in the 
virt-v2v(1) man page OPTIONS section.

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

Comment 3 Chen 2016-02-26 02:53:12 UTC
Hi,

Also I'm not sure whether the following workaround is valid or not:

Make a clone of the snapshot VM and then convert the cloned VM.

Could someone help me to confirm this ?

Best Regards,
Chen

Comment 4 Richard W.M. Jones 2016-03-03 12:17:57 UTC
Importing from snapshots is not supported.

There is an RFE open to add this feature:
https://bugzilla.redhat.com/show_bug.cgi?id=1172425

(In reply to Chen from comment #3)
> Make a clone of the snapshot VM and then convert the cloned VM.
> 
> Could someone help me to confirm this ?

Yes this should work.

*** This bug has been marked as a duplicate of bug 1172425 ***