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.
5 responses to “QEMU ssh block device”
Rich, this is brilliant. Keep the good stuff coming.
Pingback: libguestfs and qemu ssh driver | Richard WM Jones
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!
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.
Pingback: virt-v2v: better living through new technology | Richard WM Jones