QEMU ssh block device

I wrote a small patch (intro, patch) which adds a Secure Shell (ssh) block device to qemu. With this patch you could access a remote disk image or device by doing:

qemu -drive file=ssh://host/path/to/file,if=virtio,cache=none

QEMU ssh’es into “host” and opens /path/to/file. For the initial version of this patch you will need to set up ssh-agent access to the remote server.

The motivation behind this patch is to allow libguestfs to access remote disks using ssh the same way we already do with NBD. Secure Shell is ubiquitous, so for the majority of users libguestfs-over-qemu/ssh would let them use disks remotely with zero configuration.



Filed under Uncategorized

5 responses to “QEMU ssh block device

  1. jamesjustjames

    Rich, this is brilliant. Keep the good stuff coming.

  2. Pingback: libguestfs and qemu ssh driver | Richard WM Jones

  3. matorola

    Richard, sorry to bother you with this question, but I didn’t get it… What is the “use case” of qemu remote disk over ssh ? I mean if you want remote disk, you can use/mount remote NFS / ISCSI and use it, why someone will want to use ssh to access disks? Thanks!

    • rich

      Sure, but setting up iSCSI is a pain in the ass. Even NFS isn’t easy, when you consider all the business with opening firewall ports.

      Most Linux servers have sshd running already, so ssh access is effectively zero configuration.

      But, horses for courses. libguestfs also supports NFS, iSCSI, NBD, HTTP, etc so you’ve got lots of choices.

  4. Pingback: virt-v2v: better living through new technology | Richard WM Jones

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.