From: "Richard W.M. Jones" <rjones@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3] block: Add support for Secure Shell (ssh) block device.
Date: Wed, 27 Mar 2013 15:44:54 +0000 [thread overview]
Message-ID: <20130327154454.GD1504@rhmail.home.annexia.org> (raw)
In-Reply-To: <87ppyk98r9.fsf@codemonkey.ws>
On Wed, Mar 27, 2013 at 10:12:42AM -0500, Anthony Liguori wrote:
> "Richard W.M. Jones" <rjones@redhat.com> writes:
>
> > From: "Richard W.M. Jones" <rjones@redhat.com>
> >
> > 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://user@host/...) 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/qemu-devel@nongnu.org/msg162605.html
(curl-based patch: http://www.mail-archive.com/qemu-devel@nongnu.org/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/
next prev parent reply other threads:[~2013-03-27 15:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 10:38 [Qemu-devel] [PATCH v3] block: Add support for Secure Shell (ssh) block device Richard W.M. Jones
2013-03-26 14:21 ` Richard W.M. Jones
2013-03-26 16:23 ` Stefan Hajnoczi
2013-03-26 17:00 ` Richard W.M. Jones
2013-03-26 19:34 ` Richard W.M. Jones
2013-03-27 6:35 ` Stefan Hajnoczi
2013-03-27 15:12 ` Anthony Liguori
2013-03-27 15:44 ` Richard W.M. Jones [this message]
2013-03-27 16:43 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130327154454.GD1504@rhmail.home.annexia.org \
--to=rjones@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).