I'm trying to store vdis to a network machine which is mounted to my machine using nautilus and sftp.

I confirm that I can access the directory and I can write to it.

The error I'm getting is this:

Failed to open the disk image file /run/user/1000/gvfs/sftp:host=.../MINT.vdi.

Could not open the medium '/run/user/1000/gvfs/sftp:host=.../MINT.vdi'.

VD: error VERR_NET_OPERATION_NOT_SUPPORTED opening image file '/run/user/1000/gvfs/sftp:host=.../MINT.vdi' (VERR_NET_OPERATION_NOT_SUPPORTED).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee: IVirtualBox {9570b9d5-f1a1-448a-10c5-e12f5285adad}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

I have also tried enabling and disabling "Use host I/O cache", still the same message.


Solution 1:

The error is returned because the GVFS SFTP backend does not allow opening files for simultaneous reading and writing (i.e. the O_RDWR flag to the open(2) system call). Such attempts return -EOPNOTSUPP, which is translated by VirtualBox to VERR_NET_OPERATION_NOT_SUPPORTED (which has the same meaning).

You might have better luck with other GVFS backends (e.g. SMB), but in general I would not recommend using GVFS and gvfs-fuse to access VM disk images at all – instead use a kernel-level network filesystem, such as NFSv4 or SMB3.