From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKtRq-0004XT-1l for qemu-devel@nongnu.org; Wed, 27 Mar 2013 12:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKtRo-0008K7-7v for qemu-devel@nongnu.org; Wed, 27 Mar 2013 12:43:37 -0400 Received: from mail-qe0-f45.google.com ([209.85.128.45]:65303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKtRo-0008Jq-38 for qemu-devel@nongnu.org; Wed, 27 Mar 2013 12:43:36 -0400 Received: by mail-qe0-f45.google.com with SMTP id b4so4639080qen.18 for ; Wed, 27 Mar 2013 09:43:35 -0700 (PDT) From: Anthony Liguori In-Reply-To: <20130327154454.GD1504@rhmail.home.annexia.org> References: <1364294326-22155-1-git-send-email-rjones@redhat.com> <87ppyk98r9.fsf@codemonkey.ws> <20130327154454.GD1504@rhmail.home.annexia.org> Date: Wed, 27 Mar 2013 11:43:32 -0500 Message-ID: <87a9pooksr.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH v3] block: Add support for Secure Shell (ssh) block device. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: qemu-devel@nongnu.org "Richard W.M. Jones" writes: > On Wed, Mar 27, 2013 at 10:12:42AM -0500, Anthony Liguori wrote: >> "Richard W.M. Jones" writes: >> >> > From: "Richard W.M. Jones" >> > >> > 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 ) Ah, thanks. Regards, Anthony Liguori > > 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/