[Libguestfs] virt-v2v -ic question
Shahar Havivi
shaharh at redhat.com
Sun Sep 21 13:16:59 UTC 2014
On 17.09.14 10:02, Richard W.M. Jones wrote:
> On Wed, Sep 17, 2014 at 10:58:18AM +0300, Shahar Havivi wrote:
> > On 16.09.14 15:09, Richard W.M. Jones wrote:
> > > On Tue, Sep 16, 2014 at 05:06:57PM +0300, Shahar Havivi wrote:
> > > > I am using upstream qemu while using this local variables:
> > > > export PATH=/home/shahar/git/qemu:$PATH
> > > > export LIBGUESTFS_HV=/home/shahar/git/qemu/x86_64-softmmu/qemu-system-x86_64
> > > >
> > > > Is that sufficient?
> > >
> > > Yup, upstream qemu should work fine. Or even the qemu in Fedora Rawhide.
> > Build the latest qemu, set the PATH and LIBGUESTFS_HV variables and still got
> > the error, any idea?
> >
> > ---------------------------------------------------------------------------------------------
> > shahar at shaharh ~/git/libguestfs (master) LIBGUESTFS_BACKEND=direct ./run ./v2v/virt-v2v -ic "esx://10.35.5.45/?no_verify=1" -o local -of raw -os /tmp/v2v RHEL
>
> I see - the esx:// URL won't work (I guess virt-v2v should explicitly
> reject these).
>
> Anyway for new virt-v2v you have to have vCenter installed. It's
> available as an OVA that you can install on top of ESXi. And then the
> URL would be:
>
> vpx://user@vcenter/Datacenter/10.35.5.45?no_verify=1
>
> where 'user' is probably 'administrator' and 'vcenter' is the address
> of the vCenter server, and 'Datacenter' is the name of the datacenter
> which you had to choose when installing either ESXi or vCenter or you
> can find it out from the UI.
>
> Rich.
We installed the vcenter, while the following virsh command is working fine:
$ virsh -c "vpx://root@10.35.4.35/MyDatacenter/10.35.5.45?no_verify=1" list --all
When trying the same uri in v2v:
$ LIBGUESTFS_BACKEND=direct ./run ./v2v/virt-v2v -ic "vpx://root@10.35.4.35/MyDatacenter/10.35.5.45?no_verify=1" -o local -of raw -os /tmp/v2v CSB
We get the following error:
----------------------------------------------------------------------------
[ 0.0] Opening the source -i libvirt -ic vpx://root@10.35.4.35/MyDatacenter/10.35.5.45?no_verify=1 CSB
Enter root's password for 10.35.4.35:
Enter host password for user 'root':
[ 10.0] Creating an overlay to protect the source from being modified
qemu-img: /tmp/v2vovl25ed85.qcow2: Could not open 'json: { "file.cookie" : "vmware_soap_session=\"52c0d622-226b-546e-0ec9-9ab8601a4dd8\"", "file.sslverify" : "off", "file.driver" : "https", "file.url" : "https://10.35.4.35/folder/CSB/CSB-flat.vmdk?dcPath=MyDatacenter&dsName=datastore1", "file.timeout" : 60 }': Unknown driver 'https': No such file or directory
virt-v2v: error: qemu-img command failed, see earlier errors
----------------------------------------------------------------------------
Attached the output with verbose input.
Shahar.
-------------- next part --------------
[ 0.0] Opening the source -i libvirt -ic vpx://root@10.35.4.35/MyDatacenter/10.35.5.45?no_verify=1 CSB
Enter root's password for 10.35.4.35: Enter host password for user 'root':
libvirt xml is:
<domain type='vmware'>
<name>CSB</name>
<uuid>564ddb3e-e73f-e148-6134-8982f6add8a5</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>1</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] CSB/CSB.vmdk'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<source file='[datastore1] CSB/CSB_1.vmdk'/>
<target dev='sdb' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='scsi' index='0' model='vmpvscsi'/>
<interface type='bridge'>
<mac address='00:0c:29:ad:d8:a5'/>
<source bridge='VM Network'/>
<model type='vmxnet3'/>
</interface>
<interface type='bridge'>
<mac address='00:50:56:bd:90:4d'/>
<source bridge='VM Network'/>
<model type='vmxnet3'/>
</interface>
<video>
<model type='vmvga' vram='8192'/>
</video>
</devices>
</domain>
curl -s --insecure -u 'root' -I 'https://10.35.4.35/folder/CSB/CSB-flat.vmdk?dcPath=MyDatacenter&dsName=datastore1' ||:
HTTP/1.1 200 OK
Date: Sun, 21 Sep 2014 13:08:38 GMT
Set-Cookie: vmware_soap_session="52c1f471-409d-e159-5306-eba7bfba8179"; Path=/; HttpOnly; Secure;
Accept-Ranges: bytes
Connection: Keep-Alive
Content-Type: application/octet-stream
Content-Length: 17179869184
esx: json parameters: { "file.cookie" : "vmware_soap_session=\"52c1f471-409d-e159-5306-eba7bfba8179\"", "file.sslverify" : "off", "file.driver" : "https", "file.url" : "https://10.35.4.35/folder/CSB/CSB-flat.vmdk?dcPath=MyDatacenter&dsName=datastore1", "file.timeout" : 60 }
esx: json parameters: { "file.cookie" : "vmware_soap_session=\"52c1f471-409d-e159-5306-eba7bfba8179\"", "file.sslverify" : "off", "file.driver" : "https", "file.url" : "https://10.35.4.35/folder/CSB/CSB%5f1-flat.vmdk?dcPath=MyDatacenter&dsName=datastore1", "file.timeout" : 60 }
source name: CSB
hypervisor type: vmware
memory: 2147483648 (bytes)
nr vCPUs: 1
arch: x86_64
CPU features:
display:
disks:
json: { "file.cookie" : "vmware_soap_session=\"52c1f471-409d-e159-5306-eba7bfba8179\"", "file.sslverify" : "off", "file.driver" : "https", "file.url" : "https://10.35.4.35/folder/CSB/CSB-flat.vmdk?dcPath=MyDatacenter&dsName=datastore1", "file.timeout" : 60 } (raw) [sda]
json: { "file.cookie" : "vmware_soap_session=\"52c1f471-409d-e159-5306-eba7bfba8179\"", "file.sslverify" : "off", "file.driver" : "https", "file.url" : "https://10.35.4.35/folder/CSB/CSB%5f1-flat.vmdk?dcPath=MyDatacenter&dsName=datastore1", "file.timeout" : 60 } (raw) [sdb]
removable media:
NICs:
Bridge "VM Network" mac: 00:0c:29:ad:d8:a5
Bridge "VM Network" mac: 00:50:56:bd:90:4d
[ 12.0] Creating an overlay to protect the source from being modified
qemu-img create -q -f qcow2 -b 'json: { "file.cookie" : "vmware_soap_session=\"52c1f471-409d-e159-5306-eba7bfba8179\"", "file.sslverify" : "off", "file.driver" : "https", "file.url" : "https://10.35.4.35/folder/CSB/CSB-flat.vmdk?dcPath=MyDatacenter&dsName=datastore1", "file.timeout" : 60 }' -o 'compat=1.1,backing_fmt=raw' /tmp/v2vovl4b75dd.qcow2
qemu-img: /tmp/v2vovl4b75dd.qcow2: Could not open 'json: { "file.cookie" : "vmware_soap_session=\"52c1f471-409d-e159-5306-eba7bfba8179\"", "file.sslverify" : "off", "file.driver" : "https", "file.url" : "https://10.35.4.35/folder/CSB/CSB-flat.vmdk?dcPath=MyDatacenter&dsName=datastore1", "file.timeout" : 60 }': Unknown driver 'https': No such file or directory
virt-v2v: error: qemu-img command failed, see earlier errors
If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:
virt-v2v -v -x [...]
More information about the Libguestfs
mailing list