Using a remove file from one VM as a block device in another VM

11 views
Skip to first unread message

Nagaev Boris

unread,
Sep 11, 2017, 6:27:29 PM9/11/17
to qubes...@googlegroups.com
Hey

I want to store VM data remotely. My plan is to have remote
private.img. I started with an attempt to attach a remote file mounted
with sshfs to another VM:

server$ dd if=/dev/zero of=image seek=1000 bs=1M count=0
vm1$ sshfs -o allow_root server: /tmp/server
dom0$ qvm-block -A vm2 vm1:/tmp/server/image

I expected to see /dev/xvdi in vm2 which I can use to make a partition
table, filesystems and mount locally. I did this successfully with
local (non-FUSE) files from vm1. But there is no /dev/xvdi in vm2 this
time. However Qubes VM Manager displays a drive icon in vm2 status.

Also I tried to loop mount the file locally in vm1 and mount the loop
device to vm2:

vm1$ sudo losetup -f --show /tmp/server/image
/dev/loop2
dom0$ qvm-block -A vm2 vm1:/dev/loop2

Also no success.

Does `qvm-block -A` support files coming from FUSE? What pitfalls can
I face going this way?

--
Best regards,
Boris Nagaev
Reply all
Reply to author
Forward
0 new messages