qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] block: Add support for Secure Shell (ssh) bl


From: Richard W.M. Jones
Subject: Re: [Qemu-devel] [PATCH v3] block: Add support for Secure Shell (ssh) block device.
Date: Wed, 27 Mar 2013 15:44:54 +0000
User-agent: Mutt/1.5.20 (2009-12-10)

On Wed, Mar 27, 2013 at 10:12:42AM -0500, Anthony Liguori wrote:
> "Richard W.M. Jones" <address@hidden> writes:
> 
> > From: "Richard W.M. Jones" <address@hidden>
> >
> >   qemu-system-x86_64 -drive file=ssh://hostname/some/image
> >
> > QEMU will ssh into 'hostname' and open '/some/image' which is made
> > available as a standard block device.
> >
> > You can specify a username (ssh://address@hidden/...) and/or a port number
> > (ssh://host:port/...).
> >
> > Current limitations:
> >
> > - Authentication must be done without passwords or passphrases, using
> >   ssh-agent.  Other authentication methods are not supported. (*)
> >
> > - New remote files cannot be created. (*)
> >
> > - Uses a single connection, instead of concurrent AIO with multiple
> >   SSH connections.
> >
> > (*) = potentially easy fix
> >
> > This is implemented using libssh2 on the client side.  The server just
> > requires a regular ssh daemon with sftp-server support.  Most ssh
> > daemons on Unix/Linux systems will work out of the box.
> >
> > Thanks: Stefan Hajnoczi, Kevin Wolf.
> 
> Curl actually supports sftp already.  In theory, we just need to add:
> 
> static BlockDriver bdrv_sftp = {
>     .format_name     = "sftp",
>     .protocol_name   = "sftp",
> 
>     .instance_size   = sizeof(BDRVCURLState),
>     .bdrv_file_open  = curl_open,
>     .bdrv_close      = curl_close,
>     .bdrv_getlength  = curl_getlength,
> 
>     .bdrv_aio_readv  = curl_aio_readv,
> };
> 
> To block/curl.c and it should Just Work.   Have you considered doing
> this through curl?

Yes, and it doesn't work.  See:

http://www.mail-archive.com/address@hidden/msg162605.html
(curl-based patch: http://www.mail-archive.com/address@hidden/msg162253.html )

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]