Menu

Ubuntu guest VM can't mount Veracrypt files from shared mount without IO error

iamgregor
2019-02-16
2019-05-20
  • iamgregor

    iamgregor - 2019-02-16

    I get this error every time I try to mount a file:

    Input/output error:
    /dev/mapper/veracrypt5

    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 "readat" location is the same every time. I've tried creating a new volume from inside the Ubuntu guest (the existing one was made in Windows) on the idea that maybe the file system of the container was incompatible, but that gave the same error. Is this a shared drive mount location issue?

     
  • Testoslav

    Testoslav - 2019-02-27

    So you are trying to mount volume, which is already mounted by host OS (windows) on VM (ubuntu)? It won't work. You need to have veracrypt container/partition mounted on one place only, but you can access the files inside by other means (i.e. smb sharing).

     
    • iamgregor

      iamgregor - 2019-02-27

      The file is unmounted and just sitting on the host system. I'm trying to mount it in the guest ubuntu system only. Of course, ubuntu can only see it if I set it as a "shared folder" in vitualbox settings... that is unless there's another way.

       
      • Testoslav

        Testoslav - 2019-02-28

        I have not experienced this error while mounting, but I remember disk errors during heavy I/O to virtualbox shared folder, even without veracrypt. For example downloading torrent files into vc container shared using virtualbox gave me errors time to time. I got hard drive errors also when downloading torrents to shared folder without veracrypt. I'd say there's some problem with virtualbox folder sharing, once I moved the container to the virtual machine's drive, torrent downloads work without errors.

        Try to move (or copy) container to ubuntu's drive and mount it from there. If it's too big, try to reproduce with smaller vc container. Also make sure you have the latest virtualbox.

         

        Last edit: Testoslav 2019-03-01
        • iamgregor

          iamgregor - 2019-03-01

          I have the latest virtualbox, but the file is way too big to move to the virtual machine directly. I can open it fine with veracrypt on the host system though.

           
          • Testoslav

            Testoslav - 2019-03-01

            Way too big? Maybe there's problem with handling big files over share. Could you try with smaller veracrypt container? 1GB or so, just for the test sake.

             
            • iamgregor

              iamgregor - 2019-03-02

              Tried a 10MB file and it had the same error exactly. It seems Ubuntu Veracrypt doesn't like the shared mount system that Virtualbox is using.

               
            • iamgregor

              iamgregor - 2019-03-03

              Copying the file to the Ubuntu guest works. Opens fine. It just won't open over a shared drive.

               
  • Michael Pryor

    Michael Pryor - 2019-03-03

    I have also had the same problem when trying to access a Veracrypt volume file on a host system folder shared into a LinuxMint client through VirtualBox. VB version: 6.0.4. LM version: 19.1., Veracrypt versions 1.19 and 1.23. If I mount the host's folder using a cifs mount (not shared folder mount) and then try to use Veracrypt on the file, it works OK, Copying the file to the LM guest works OK, too.

    To be clear, I'm only mounting the Veracrypt file in the guest VM. It is not mounted anywhere else.

    This problem started when I upgraded to Linux Mint 19 and VirtualBox 6.0.4 (and VBox's tools, VBox beyond 5.1). I have an old Linux Mint VM (v17.1 with 5.0.4 Guest Additions) that can correctly mount the Veracrypt folder when it is in a shared VirtualBox folder. This suggests something changed/broke in newer VBox Guest Additions.

    I checked the sha1sum of the Veracrypt folder on the host system, and on the Linux Mint 19.1 VM (looking through the VirtualBox share), and the values are the same, which indicates that the VBox sharing mapping is not affecting the file contents.

    Is there some aspect of how Veracrypt accesses an encrypted file that is affected by the VirtualBox file sharing in the new Guest Additions? Is this something that could be fixed in Veracrypt?

    Thanks.

     
    👍
    1
  • iamgregor

    iamgregor - 2019-03-11

    I solved it by switching back to vmware. I had crazy problems getting Ubuntu installed on VMware a few months back, but it seemed ok in the newest version. Doing veracrypt through filesharing with VMware doesn't seem to cause problems.

     

    Last edit: iamgregor 2019-03-11
  • Testoslav

    Testoslav - 2019-03-13

    I have solved most of problems with virtualbox folder sharing by avoiding it :-) You can always create a samba share on host system and mounting on the guest VM using OS network functions directly to IP. Torrents are still unreliable to a (windows) network share though, transmission on guest linux reports disk io errors or something like that time to time, so best way is to download to guest's local drive and when done copy via network away.

     
  • phirestalker

    phirestalker - 2019-05-20

    I have found another possible solution for 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 wihout issue between two veracrypt volumes using this trick.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.