This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1311415 - virt-v2v searches wrong device path when importing VMware VMs with snapshot
virt-v2v searches wrong device path when importing VMware VMs with snapshot
Status: CLOSED DUPLICATE of bug 1172425
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.2
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-24 03:18 EST by Chen
Modified: 2016-03-03 07:17 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-03 07:17:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chen 2016-02-24 03:18:36 EST
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 03:19:44 EST
The full stdout & stderr is:

# virt-v2v -v -x -ic 'vpx://VSPHERE.LOCAL%5cAdministrator@10.66.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@10.66.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-25 21:53:12 EST
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 07:17:57 EST
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 ***

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