Re: [Users] virt-v2v import needs saslauth credentials

2013-08-13 Thread Jim Kinney
qemu-img info
/rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/53b04aa4-5f90-4837-b9f1-3ce64ecb057c/images/e20028a6-901d-4429-bf55-f92b9f59e905/52bce09c-7e8f-4c23-95bf-02854672c67f
image:
/rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/53b04aa4-5f90-4837-b9f1-3ce64ecb057c/images/e20028a6-901d-4429-bf55-f92b9f59e905/52bce09c-7e8f-4c23-95bf-02854672c67f
file format: raw
virtual size: 3.0G (3221225472 bytes)
disk size: 1.1G


Different dirs as I'm trying various combos with same failure to import.
But the qemu-img data is good.

ll
/rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/53b04aa4-5f90-4837-b9f1-3ce64ecb057c/images/e20028a6-901d-4429-bf55-f92b9f59e905/52bce09c-7e8f-4c23-95bf-02854672c67f
-rw-rw. 1 vdsm kvm 3221225472 Aug  9 17:37
/rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/53b04aa4-5f90-4837-b9f1-3ce64ecb057c/images/e20028a6-901d-4429-bf55-f92b9f59e905/52bce09c-7e8f-4c23-95bf-02854672c67f



On Tue, Aug 13, 2013 at 12:35 PM, Richard W.M. Jones wrote:

> On Mon, Aug 12, 2013 at 05:26:54PM -0400, Jim Kinney wrote:
> > On trying the import in ovirt after the completion of the conversion
> using
> > -o rhev -os :/var/lib/exports/exports ..., I found an error in the
> > vdsm.log:
> >
> > Thread-199989::ERROR::2013-08-12
> > 15:10:57,371::task::833::TaskManager.Task::(_setError)
> > Task=`6fa2a23e-0194-4f67-b157-a3f831780d12`::Unexpected error
> > Traceback (most recent call last):
> >   File "/usr/share/vdsm/storage/task.py", line 840, in _run
> > return fn(*args, **kargs)
> >   File "/usr/share/vdsm/logUtils.py", line 42, in wrapper
> > res = f(*args, **kwargs)
> >   File "/usr/share/vdsm/storage/hsm.py", line 2891, in getVolumeInfo
> > imgUUID=imgUUID, volUUID=volUUID).getInfo()
> >   File "/usr/share/vdsm/storage/fileSD.py", line 250, in produceVolume
> > return fileVolume.FileVolume(repoPath, self.sdUUID, imgUUID, volUUID)
> >   File "/usr/share/vdsm/storage/fileVolume.py", line 71, in __init__
> > volume.Volume.__init__(self, repoPath, sdUUID, imgUUID, volUUID)
> >   File "/usr/share/vdsm/storage/volume.py", line 128, in __init__
> > self.validate()
> >   File "/usr/share/vdsm/storage/volume.py", line 140, in validate
> > self.validateImagePath()
> >   File "/usr/share/vdsm/storage/fileVolume.py", line 522, in
> > validateImagePath
> > raise se.ImagePathError(imageDir)
> > ImagePathError: Image path does not exist or cannot be accessed/created:
> >
> ('/rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/5eb89069-b750-4d32-b7d3-432fd77202d1/images/1e43cdf3-bf3b-4f28-a755-b5fb8a67543b',)
>
> What happens if you do:
>
> qemu-img info
> /rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/5eb89069-b750-4d32-b7d3-432fd77202d1/images/1e43cdf3-bf3b-4f28-a755-b5fb8a67543b
>
> Rich.
>
> > I have setenforce=0 with same result.
> > So the 5eb89069-b750-4d32-b7d3-432fd77202d1 is a valid ovirt domain
> number
> > for the entire process in exports. The
> 1e43cdf3-bf3b-4f28-a755-b5fb8a67543b
> > was the name of the dir created from the virt-v2v process.
> >
> > The ovirt import gui provides this error:
> > Error while executing action: Cannot import VM. VM's Image does not
> exist.
> >
> > I've tried with a qcow2 image, a raw image, vmdk (fails with unsupported
> > format error).
> >
> >
> >
> > On Mon, Aug 12, 2013 at 4:49 PM, Jim Kinney 
> wrote:
> >
> > > I need to convert a vmdk to ovirt use. I have a qcow2 formatted image
> and
> > > it's corresponding xml. I'm trying to run virt-v2v to put things into
> the
> > > proper formats/places for ovirt but I need to use my proper
> credentials to
> > > access the qemu:///system space.
> > >
> > > Where/how do I do this? man pages have no suggestions on virt-v2v. I
> have
> > > a user/passwd combo in saslauth that works for virsh.
> > >
> > > virt-v2v -i libvirtxml -o libvirt -os export --vmtype server -n
> ovirtmgmt
> > >
> /var/lib/exports/exports/5eb89069-b750-4d32-b7d3-432fd77202d1/images/test/test.xml
> > > virt-v2v: Failed to connect to qemu:///system: libvirt error code: 45,
> > > message: authentication failed: Failed to step SASL negotiation: -7
> > > (SASL(-7): invalid parameter supplied: Unexpectedly missing a prompt
> result)
> > >
> > > --
> > > --
> > > James P. Kinney III
> > > *
> > > *Every time you stop a school, you will have to build a jail. What you
> > > gain at one end you lose at the other. It's like feeding a dog on his
> own
> > > tail. It won't fatten the dog.
> > > - Speech 11/23/1900 Mark Twain
> > > *
> > > http://heretothereideas.blogspot.com/
> > > *
> > >
> >
> >
> >
> > --
> > --
> > James P. Kinney III
> > *
> > *Every time you stop a school, you will have to build a jail. What you
> gain
> > at one end you lose at the other. It's like feeding a dog on his own
> tail.
> > It won't fatten the dog.
> > - Speech 11/23/1900 Mark Twain
> > *
> > http://heretothereideas.blogspot.com/
> > *
>
> > ___
> > Users mailing list
> > U

Re: [Users] virt-v2v import needs saslauth credentials

2013-08-13 Thread Richard W.M. Jones
On Tue, Aug 13, 2013 at 05:50:38PM +0100, Daniel P. Berrange wrote:
> More importantly does virt-v2v use the virConnectOpenAuth() method
> which enables callbacks to be provided to prompt for auth ? If not,
> then it'll need to be updated to support authentication.

Yes it does:

https://git.fedorahosted.org/cgit/virt-v2v.git/tree/lib/Sys/VirtConvert/Connection/LibVirt.pm#n101

That code seems to answer the original question, although it doesn't
seem to be documented.  It looks as if the username comes from the
libvirt URI (ie. -oc option, I'm not sure exactly how it's encoded)
and the password comes from ~/.netrc (must be mode 0600).

Probably best to ask Matt about this one.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] virt-v2v import needs saslauth credentials

2013-08-13 Thread Daniel P. Berrange
On Tue, Aug 13, 2013 at 05:34:29PM +0100, Richard W.M. Jones wrote:
> On Mon, Aug 12, 2013 at 04:49:02PM -0400, Jim Kinney wrote:
> > I need to convert a vmdk to ovirt use. I have a qcow2 formatted image and
> > it's corresponding xml. I'm trying to run virt-v2v to put things into the
> > proper formats/places for ovirt but I need to use my proper credentials to
> > access the qemu:///system space.
> > 
> > Where/how do I do this? man pages have no suggestions on virt-v2v. I have a
> > user/passwd combo in saslauth that works for virsh.
> > 
> > virt-v2v -i libvirtxml -o libvirt -os export --vmtype server -n ovirtmgmt
> > /var/lib/exports/exports/5eb89069-b750-4d32-b7d3-432fd77202d1/images/test/test.xml
> > virt-v2v: Failed to connect to qemu:///system: libvirt error code: 45,
> > message: authentication failed: Failed to step SASL negotiation: -7
> > (SASL(-7): invalid parameter supplied: Unexpectedly missing a prompt result)
> 
> This is really a libvirt question, to which I don't know the answer.
> 
> Complex libvirt authentication (such as SASL) may ask the user a
> series of questions, such as username and password.  Are you running
> virt-v2v interactively at a terminal?

More importantly does virt-v2v use the virConnectOpenAuth() method
which enables callbacks to be provided to prompt for auth ? If not,
then it'll need to be updated to support authentication.

Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] virt-v2v import needs saslauth credentials

2013-08-13 Thread Richard W.M. Jones
On Mon, Aug 12, 2013 at 05:26:54PM -0400, Jim Kinney wrote:
> On trying the import in ovirt after the completion of the conversion using
> -o rhev -os :/var/lib/exports/exports ..., I found an error in the
> vdsm.log:
> 
> Thread-199989::ERROR::2013-08-12
> 15:10:57,371::task::833::TaskManager.Task::(_setError)
> Task=`6fa2a23e-0194-4f67-b157-a3f831780d12`::Unexpected error
> Traceback (most recent call last):
>   File "/usr/share/vdsm/storage/task.py", line 840, in _run
> return fn(*args, **kargs)
>   File "/usr/share/vdsm/logUtils.py", line 42, in wrapper
> res = f(*args, **kwargs)
>   File "/usr/share/vdsm/storage/hsm.py", line 2891, in getVolumeInfo
> imgUUID=imgUUID, volUUID=volUUID).getInfo()
>   File "/usr/share/vdsm/storage/fileSD.py", line 250, in produceVolume
> return fileVolume.FileVolume(repoPath, self.sdUUID, imgUUID, volUUID)
>   File "/usr/share/vdsm/storage/fileVolume.py", line 71, in __init__
> volume.Volume.__init__(self, repoPath, sdUUID, imgUUID, volUUID)
>   File "/usr/share/vdsm/storage/volume.py", line 128, in __init__
> self.validate()
>   File "/usr/share/vdsm/storage/volume.py", line 140, in validate
> self.validateImagePath()
>   File "/usr/share/vdsm/storage/fileVolume.py", line 522, in
> validateImagePath
> raise se.ImagePathError(imageDir)
> ImagePathError: Image path does not exist or cannot be accessed/created:
> ('/rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/5eb89069-b750-4d32-b7d3-432fd77202d1/images/1e43cdf3-bf3b-4f28-a755-b5fb8a67543b',)

What happens if you do:

qemu-img info 
/rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/5eb89069-b750-4d32-b7d3-432fd77202d1/images/1e43cdf3-bf3b-4f28-a755-b5fb8a67543b

Rich.

> I have setenforce=0 with same result.
> So the 5eb89069-b750-4d32-b7d3-432fd77202d1 is a valid ovirt domain number
> for the entire process in exports. The 1e43cdf3-bf3b-4f28-a755-b5fb8a67543b
> was the name of the dir created from the virt-v2v process.
> 
> The ovirt import gui provides this error:
> Error while executing action: Cannot import VM. VM's Image does not exist.
> 
> I've tried with a qcow2 image, a raw image, vmdk (fails with unsupported
> format error).
> 
> 
> 
> On Mon, Aug 12, 2013 at 4:49 PM, Jim Kinney  wrote:
> 
> > I need to convert a vmdk to ovirt use. I have a qcow2 formatted image and
> > it's corresponding xml. I'm trying to run virt-v2v to put things into the
> > proper formats/places for ovirt but I need to use my proper credentials to
> > access the qemu:///system space.
> >
> > Where/how do I do this? man pages have no suggestions on virt-v2v. I have
> > a user/passwd combo in saslauth that works for virsh.
> >
> > virt-v2v -i libvirtxml -o libvirt -os export --vmtype server -n ovirtmgmt
> > /var/lib/exports/exports/5eb89069-b750-4d32-b7d3-432fd77202d1/images/test/test.xml
> > virt-v2v: Failed to connect to qemu:///system: libvirt error code: 45,
> > message: authentication failed: Failed to step SASL negotiation: -7
> > (SASL(-7): invalid parameter supplied: Unexpectedly missing a prompt result)
> >
> > --
> > --
> > James P. Kinney III
> > *
> > *Every time you stop a school, you will have to build a jail. What you
> > gain at one end you lose at the other. It's like feeding a dog on his own
> > tail. It won't fatten the dog.
> > - Speech 11/23/1900 Mark Twain
> > *
> > http://heretothereideas.blogspot.com/
> > *
> >
> 
> 
> 
> -- 
> -- 
> James P. Kinney III
> *
> *Every time you stop a school, you will have to build a jail. What you gain
> at one end you lose at the other. It's like feeding a dog on his own tail.
> It won't fatten the dog.
> - Speech 11/23/1900 Mark Twain
> *
> http://heretothereideas.blogspot.com/
> *

> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users


-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] virt-v2v import needs saslauth credentials

2013-08-13 Thread Richard W.M. Jones
On Mon, Aug 12, 2013 at 04:49:02PM -0400, Jim Kinney wrote:
> I need to convert a vmdk to ovirt use. I have a qcow2 formatted image and
> it's corresponding xml. I'm trying to run virt-v2v to put things into the
> proper formats/places for ovirt but I need to use my proper credentials to
> access the qemu:///system space.
> 
> Where/how do I do this? man pages have no suggestions on virt-v2v. I have a
> user/passwd combo in saslauth that works for virsh.
> 
> virt-v2v -i libvirtxml -o libvirt -os export --vmtype server -n ovirtmgmt
> /var/lib/exports/exports/5eb89069-b750-4d32-b7d3-432fd77202d1/images/test/test.xml
> virt-v2v: Failed to connect to qemu:///system: libvirt error code: 45,
> message: authentication failed: Failed to step SASL negotiation: -7
> (SASL(-7): invalid parameter supplied: Unexpectedly missing a prompt result)

This is really a libvirt question, to which I don't know the answer.

Complex libvirt authentication (such as SASL) may ask the user a
series of questions, such as username and password.  Are you running
virt-v2v interactively at a terminal?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] virt-v2v import needs saslauth credentials

2013-08-12 Thread Jim Kinney
On trying the import in ovirt after the completion of the conversion using
-o rhev -os :/var/lib/exports/exports ..., I found an error in the
vdsm.log:

Thread-199989::ERROR::2013-08-12
15:10:57,371::task::833::TaskManager.Task::(_setError)
Task=`6fa2a23e-0194-4f67-b157-a3f831780d12`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 840, in _run
return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 42, in wrapper
res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 2891, in getVolumeInfo
imgUUID=imgUUID, volUUID=volUUID).getInfo()
  File "/usr/share/vdsm/storage/fileSD.py", line 250, in produceVolume
return fileVolume.FileVolume(repoPath, self.sdUUID, imgUUID, volUUID)
  File "/usr/share/vdsm/storage/fileVolume.py", line 71, in __init__
volume.Volume.__init__(self, repoPath, sdUUID, imgUUID, volUUID)
  File "/usr/share/vdsm/storage/volume.py", line 128, in __init__
self.validate()
  File "/usr/share/vdsm/storage/volume.py", line 140, in validate
self.validateImagePath()
  File "/usr/share/vdsm/storage/fileVolume.py", line 522, in
validateImagePath
raise se.ImagePathError(imageDir)
ImagePathError: Image path does not exist or cannot be accessed/created:
('/rhev/data-center/6ff1a3cb-06b9-4a4f-a2ec-053cc45ac7c6/5eb89069-b750-4d32-b7d3-432fd77202d1/images/1e43cdf3-bf3b-4f28-a755-b5fb8a67543b',)


I have setenforce=0 with same result.
So the 5eb89069-b750-4d32-b7d3-432fd77202d1 is a valid ovirt domain number
for the entire process in exports. The 1e43cdf3-bf3b-4f28-a755-b5fb8a67543b
was the name of the dir created from the virt-v2v process.

The ovirt import gui provides this error:
Error while executing action: Cannot import VM. VM's Image does not exist.

I've tried with a qcow2 image, a raw image, vmdk (fails with unsupported
format error).



On Mon, Aug 12, 2013 at 4:49 PM, Jim Kinney  wrote:

> I need to convert a vmdk to ovirt use. I have a qcow2 formatted image and
> it's corresponding xml. I'm trying to run virt-v2v to put things into the
> proper formats/places for ovirt but I need to use my proper credentials to
> access the qemu:///system space.
>
> Where/how do I do this? man pages have no suggestions on virt-v2v. I have
> a user/passwd combo in saslauth that works for virsh.
>
> virt-v2v -i libvirtxml -o libvirt -os export --vmtype server -n ovirtmgmt
> /var/lib/exports/exports/5eb89069-b750-4d32-b7d3-432fd77202d1/images/test/test.xml
> virt-v2v: Failed to connect to qemu:///system: libvirt error code: 45,
> message: authentication failed: Failed to step SASL negotiation: -7
> (SASL(-7): invalid parameter supplied: Unexpectedly missing a prompt result)
>
> --
> --
> James P. Kinney III
> *
> *Every time you stop a school, you will have to build a jail. What you
> gain at one end you lose at the other. It's like feeding a dog on his own
> tail. It won't fatten the dog.
> - Speech 11/23/1900 Mark Twain
> *
> http://heretothereideas.blogspot.com/
> *
>



-- 
-- 
James P. Kinney III
*
*Every time you stop a school, you will have to build a jail. What you gain
at one end you lose at the other. It's like feeding a dog on his own tail.
It won't fatten the dog.
- Speech 11/23/1900 Mark Twain
*
http://heretothereideas.blogspot.com/
*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] virt-v2v import needs saslauth credentials

2013-08-12 Thread Jim Kinney
I need to convert a vmdk to ovirt use. I have a qcow2 formatted image and
it's corresponding xml. I'm trying to run virt-v2v to put things into the
proper formats/places for ovirt but I need to use my proper credentials to
access the qemu:///system space.

Where/how do I do this? man pages have no suggestions on virt-v2v. I have a
user/passwd combo in saslauth that works for virsh.

virt-v2v -i libvirtxml -o libvirt -os export --vmtype server -n ovirtmgmt
/var/lib/exports/exports/5eb89069-b750-4d32-b7d3-432fd77202d1/images/test/test.xml
virt-v2v: Failed to connect to qemu:///system: libvirt error code: 45,
message: authentication failed: Failed to step SASL negotiation: -7
(SASL(-7): invalid parameter supplied: Unexpectedly missing a prompt result)

-- 
-- 
James P. Kinney III
*
*Every time you stop a school, you will have to build a jail. What you gain
at one end you lose at the other. It's like feeding a dog on his own tail.
It won't fatten the dog.
- Speech 11/23/1900 Mark Twain
*
http://heretothereideas.blogspot.com/
*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users