Veracrypt mount from shared folder

Discussions about using Linux guests in VirtualBox.
Post Reply
michburt
Posts: 2
Joined: 29. Dec 2017, 17:15

Veracrypt mount from shared folder

Post by michburt »

Hello,

since the update to Virtualbox 5.2 I cannot mount a veracrypt container from a shared folder. Also if I want to create a new one I get the same error.

Veracrypt Error Message:

Code: Select all

Input-/Output error:
/dev/mapper/veracrypt1

The drive is damaged (there is a physical defect on it) or a cable is damaged, or the memory is malfunctioning.

Please note that this is a problem with your hardware, not with VeraCrypt. Therefore, please do NOT report this as a bug/problem in VeraCrypt and please do NOT ask for help with this in the VeraCrypt Forums. Please contact your computer vendor's technical support team for assistance. Thank you.

Note: If the error occurs repeatedly at the same place, it is very likely caused by a bad disk block, which should be possible to correct using third-party software (note that, in many cases, the 'chkdsk /r' command cannot correct it because it works only at the filesystem level; in some cases, the 'chkdsk' tool cannot even detect it).

VeraCrypt::File::ReadAt:306
The same was working without any problems in Linux guests (e.g. Ubuntu 17.10) with Virtualbox 5.1 and it is also still working in Windows guests with Virtualbox 5.2.
So this problem seems to be a regression in Linux Guests with Virtualbox 5.2 only.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Veracrypt mount from shared folder

Post by socratis »

You didn't adequately specify your Host, your Guest and your VirtualBox version; there is no 5.2 version, there is 5.2.0, 5.2.2, and 5.2.4 released versions, or you could be running a test build, I don't know. It's better if you use the complete version numbers (including the build numbers) to identify software:
  • "OSX" isn't enough, "OSX 10.9.5 build 13f1911" is much better.
  • "Win10" isn't enough, "Win10 1607, build 14393.969" is much better.
  • "Ubuntu" isn't enough, "Ubuntu 16.04, 4.4.0-59-generic #80-Ubuntu SMP" is much better.
  • "The latest VirtualBox" isn't enough, "VirtualBox 5.1.22 r115126" is much better.
Keep also in mind that VirtualBox shared folders present a very simplified file system implementation, just enough to read/write files from/to the guest. Many applications can error when using shared folders, because they expect advanced features, like file locking or access controls, which don't exist for shared folders.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
michburt
Posts: 2
Joined: 29. Dec 2017, 17:15

Re: Veracrypt mount from shared folder

Post by michburt »

Ok, here is the detailed version overview as requested regarding mounting or creating Veracrypt containers from shared folders:

Host System: Linux Mint 18.3 64 bit

Guest system: Windows 10 1703 64 bit:
Virtualbox 5.1.30: working
Virtualbox 5.2.4: working

Guest system: Ubuntu 17.10 64 bit:
Virtualbox 5.1.30: working
Virtualbox 5.2.4: not working (see error message from first post)

Thanks for the info regarding the limitations. But as it was working with Linux guests in 5.1.30 and it is still working in Windows guests this is probably only a small issue.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Veracrypt mount from shared folder

Post by socratis »

Could you give me a small step-by-step set of instructions, so I can try and replicate this? For example, did you create the VeraCrypt volume in the guest or in the host? What version of Veracrypt did you use? Include any other important details/steps as well.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
DarthDalek
Posts: 1
Joined: 4. Jan 2018, 19:13

Re: Veracrypt mount from shared folder

Post by DarthDalek »

I'm running Linux Mint 18.3 on both host and guest. I'm running Veracrypt 1.21 on both host and guest. I'm running VirtualBox 5.2.2 r119230 (Qt5.6.1) on the host (and same version of guest additions on guest).

The reproductions instructions are fairly straight forward. I bumped into the problem and tried several variations on it to find out what triggered the problem. Basically, the problem occurs when the Veracrypt on the guest tries to write to a shared folder. I do not have a problem when I copied my Veracrypt file from the share onto a local virtual hard drive on the guest. I created a Veracrypt file locally within the guest without a problem. However, if I try to create (or use) a Veracrypt file in the shared folder itself, I get the error that michburt described. The Veracrypt file can be small. I reproduced it with only a 25 MB file. You can probably even go smaller.

Hope this helps you find the exact problem.
saur
Posts: 5
Joined: 30. Jun 2017, 19:23

Re: Veracrypt mount from shared folder

Post by saur »

I've got the same problem, same errors, also occurred after upgrading.

5.2.4 r119785 (Qt5.6.2)

Windows 10 host.

Arch Linux Guest (have also tried a Debian guest and the problem remained).

Maybe Virtualbox needs to be added to a certain group?
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Veracrypt mount from shared folder

Post by Martin »

The shared folder feature is only implemented for very simple file copy actions between host and guest and lacks many advanced feature typically available in a (network) file system.
It is not designed to be used by programs. Veracrypt probably now needs some file access / locking features which are not available.
saur
Posts: 5
Joined: 30. Jun 2017, 19:23

Re: Veracrypt mount from shared folder

Post by saur »

Could we give VeraCrypt these features e.i. add it to the __-group?
Ice-9
Posts: 8
Joined: 8. Jan 2018, 23:51

Re: Veracrypt mount from shared folder

Post by Ice-9 »

Just wanted to add my voice to those encountering this error when attempting to mount a VeraCrypt volume from a shared folder after recent update.

Host: MacOS High Sierra Version 10.13.2
Guest: Debian 9.3 (Stretch)
VirtualBox Version 5.2.4 r119785 (Qt5.6.3)
VeraCrypt 1.21

I had been accessing VeraCrypt volumes with no problems at all since Debian Stretch came out in the Spring, and before that with a similar set up with Debian Jessie for the previous two years. The problem started after updating Debian earlier this week with the OS fix for the Meltdown issue version 4.9.65-3+deb9u2. I had to do an m-a prepare to get my guest additions working again, and then after that realized my VeraCrypt containers were no longer opening on shared folders. I can copy the container to a local directory, open it, and then copy it back to the shared folder. I simply can no longer open the container in place in the shared folder from the guest Debian like I've been doing for more than two years. Can access via Veracrypt on the Mac host on the shared folder just fine. Restoring this functionality from guest Debian would be greatly appreciated.
saur
Posts: 5
Joined: 30. Jun 2017, 19:23

Can't write to encrypted USB

Post by saur »

Hello,

When I try to write to an encrypted USB 3 drive I get the following error.

Code: Select all

Failed to create empty file "New Empty File".
Error opening file “/media/veracrypt1/New Empty File”: Permission denied.
Is this the same problem (newest Virtualbox not giving VeraCrypt low-level access) viewtopic.php?f=3&t=86050?

I can write if I run as root, but of course I wouldn't want to make that a habit. Maybe I need to give VeraCrypt write access, or something like this?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Can't write to encrypted USB

Post by socratis »

saur wrote:Is this the same problem (newest Virtualbox not giving VeraCrypt low-level access)
Try it with a lower VirtualBox version. It seems to work with 5.1.30. Does it work with you?

I'm merging this with topic 86050, because I have the feeling that it's the same issue.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
radek
Posts: 7
Joined: 21. Nov 2015, 21:02

Re: Veracrypt mount from shared folder

Post by radek »

I have still this issue on VBox 5.2.6
Host win 7 x64 pro
Guest Ubuntu 16.04
Encrypted file is on host, veracrypt on guest access by shared folder to file,
on VBox 5.1.28 it was working well, now on VBox 5.2.6 not. :oops:
wildfire
Posts: 22
Joined: 13. Apr 2014, 20:13

Re: Veracrypt mount from shared folder

Post by wildfire »

Downgrading VBox to 5.1.30 seems to have resolved for me. Does anyone know what broke in later versions? Is there a bug report for this?
karlsson
Posts: 2
Joined: 26. Oct 2014, 23:15

Re: Veracrypt mount from shared folder

Post by karlsson »

VBoxGuestAdditions 5.1.38 CD working also fine with host 5.2.18. No need downgrade host software.
phirestalker
Posts: 7
Joined: 25. Mar 2016, 03:16

Re: Veracrypt mount from shared folder

Post by phirestalker »

I know this is an old thread, but this is mostly for the googlers.

I have found another possible solution to this problem. If you only need to access the veracrypt volume from the VM, then you can simply convert the raw image to a VDI or other VM disk image format. Once this is accomplished, you can add it as a drive in Virtualbox and mount it in veracrypt as a physical device.
I was able to copy many GB of files without issue between two veracrypt volumes using this trick.
Post Reply