Ben Hooper
2014-Dec-22 03:03 UTC
[Libguestfs] virt-v2v - Unable to authenticate to vCenter as DOMAIN\user
Hi, I am encountering an issue with virt-v2v where I need to authenticate to the vCenter as DOMAIN\user. I have tried the following with the resulting errors: 1. 'virt-v2v -v -x -ic 'vpx://vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp' - prompted for username password - entered 'DOMAIN\User' as username - successfully retrieves libvirt xml - errors with 'virt-v2v: error: vcenter: incorrect username or password.' 2. virt-v2v -v -x -ic 'vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp - errors immediately with virt-v2v: error: could not parse '-ic vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1'. Original error message was: parse_uri: unable to parse URI What is the correct syntax for entering the authenticating user as 'DOMAIN\user' for virt-v2v? Thanks, Ben. [root@virt-v2v ~]# virt-v2v -v -x -ic 'vpx://vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp virt-v2v: libguestfs 1.28.1 (x86_64) [ 0.0] Opening the source -i libvirt -ic vpx://vcenter/Datacenter/cluster_name/esx_server?no_verify=1 vm_name input_libvirt_vcenter_https: source: scheme vpx server vcenter Enter username for vcenter [administrator]: DOMAIN\user Enter DOMAIN\user's password for vcenter: libvirt xml is: <domain type='vmware'> <name>vm_name</name> <uuid>422721f5-1c3f-6a9e-9d31-d8346bf483aa</uuid> <memory unit='KiB'>262144</memory> <currentMemory unit='KiB'>262144</currentMemory> <vcpu placement='static'>2</vcpu> <cputune> <shares>2000</shares> </cputune> <os> <type arch='i686'>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='[LOCALDISK_ESX1] vm_name/vm_name.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:a7:0c:2f'/> <source bridge=''/> <model type='vmxnet3'/> </interface> <interface type='bridge'> <mac address='00:50:56:a7:6d:eb'/> <source bridge=''/> <model type='vmxnet3'/> </interface> <interface type='bridge'> <mac address='00:50:56:a7:3e:61'/> <source bridge=''/> <model type='vmxnet3'/> </interface> <video> <model type='vmvga' vram='4096'/> </video> </devices> </domain> curl -q --insecure --head --silent --url 'https://vcenter/folder/vm_name/vm_name-flat.vmdk?dcPath=Datacenter&dsName=LOCALDISK%5fESX1' HTTP/1.1 401 Unauthorized Date: Mon, 22 Dec 2014 02:48:08 GMT Set-Cookie: vmware_soap_session="528d5e5a-870a-01b8-e166-1631d51a1580"; Path=/; HttpOnly; Secure; Connection: close WWW-Authenticate: Basic realm="VMware HTTP server" Content-Length: 0 curl -q --insecure --head --silent --url 'https://vcenter/folder/vm_name/vm_name-flat.vmdk?dcPath=Datacenter&dsName=LOCALDISK%5fESX1' HTTP/1.1 401 Unauthorized Date: Mon, 22 Dec 2014 02:48:08 GMT Set-Cookie: vmware_soap_session="528d5e5a-870a-01b8-e166-1631d51a1580"; Path=/; HttpOnly; Secure; Connection: close WWW-Authenticate: Basic realm="VMware HTTP server" Content-Length: 0 virt-v2v: error: vcenter: incorrect username or password. You might need to specify the username in the URI like this: vpx://USERNAME@[etc] If reporting bugs, run virt-v2v with debugging enabled and include the complete output: [root@virt-v2v ~]# virt-v2v -v -x -ic 'vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp virt-v2v: error: could not parse '-ic vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1'. Original error message was: parse_uri: unable to parse URI If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] [root@virt-v2v ~]# cat /etc/centos-release CentOS Linux release 7.0.1406 (Core) [root@virt-v2v ~]# virt-v2v --version virt-v2v 1.28.1 [root@virt-v2v ~]#
Richard W.M. Jones
2014-Dec-22 08:50 UTC
Re: [Libguestfs] virt-v2v - Unable to authenticate to vCenter as DOMAIN\user
On Mon, Dec 22, 2014 at 02:03:50PM +1100, Ben Hooper wrote:> Hi, > > I am encountering an issue with virt-v2v where I need to authenticate to the vCenter as DOMAIN\user. > > I have tried the following with the resulting errors: > > 1. 'virt-v2v -v -x -ic 'vpx://vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp' > - prompted for username password > - entered 'DOMAIN\User' as username > - successfully retrieves libvirt xml > - errors with 'virt-v2v: error: vcenter: incorrect username or password.' > > 2. virt-v2v -v -x -ic 'vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp > - errors immediately with virt-v2v: error: could not parse '-ic > vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1'. > Original error message was: parse_uri: unable to parse URI > > What is the correct syntax for entering the authenticating user as 'DOMAIN\user' for virt-v2v?That's a very good question, and I have no idea at all :-(> [root@virt-v2v ~]# virt-v2v -v -x -ic 'vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp > virt-v2v: error: could not parse '-ic > vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1'. > Original error message was: parse_uri: unable to parse URIHow about trying this URL: -ic 'vpx://DOMAIN%5cuser@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' Note that %5c is the URL escape for backslash. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
ben@networkinsanity.com
2014-Dec-23 15:23 UTC
Re: [Libguestfs] virt-v2v - Unable to authenticate to vCenter as DOMAIN\user
Thanks Richard, seems to work well. Cheers, Ben.> On 22 Dec 2014, at 7:50 pm, Richard W.M. Jones <rjones@redhat.com> wrote: > >> On Mon, Dec 22, 2014 at 02:03:50PM +1100, Ben Hooper wrote: >> Hi, >> >> I am encountering an issue with virt-v2v where I need to authenticate to the vCenter as DOMAIN\user. >> >> I have tried the following with the resulting errors: >> >> 1. 'virt-v2v -v -x -ic 'vpx://vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp' >> - prompted for username password >> - entered 'DOMAIN\User' as username >> - successfully retrieves libvirt xml >> - errors with 'virt-v2v: error: vcenter: incorrect username or password.' >> >> 2. virt-v2v -v -x -ic 'vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp >> - errors immediately with virt-v2v: error: could not parse '-ic >> vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1'. >> Original error message was: parse_uri: unable to parse URI >> >> What is the correct syntax for entering the authenticating user as 'DOMAIN\user' for virt-v2v? > > That's a very good question, and I have no idea at all :-( > >> [root@virt-v2v ~]# virt-v2v -v -x -ic 'vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp >> virt-v2v: error: could not parse '-ic >> vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1'. >> Original error message was: parse_uri: unable to parse URI > > How about trying this URL: > > -ic 'vpx://DOMAIN%5cuser@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' > > Note that %5c is the URL escape for backslash. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > libguestfs lets you edit virtual machines. Supports shell scripting, > bindings from many languages. http://libguestfs.org
Possibly Parallel Threads
- Re: virt-v2v - Unable to authenticate to vCenter as DOMAIN\user
- Re: virt-v2v - Unable to authenticate to vCenter as DOMAIN\user
- Re: virt-v2v -ic question
- [PATCH 0/2] v2v: vcenter: Calculate dcPath correctly (RHBZ#1256823).
- [PATCH] v2v: remove extra nbdkit bit from documentation (RHBZ#1723305)