guest USB data corruption problem

Discussions related to using VirtualBox on Linux hosts.
Post Reply
LionSGI
Posts: 3
Joined: 1. Dec 2016, 14:07

guest USB data corruption problem

Post by LionSGI »

hello!

i have discovered a big problem recently. i run different guests (openSUSE, Win7, Win10) on a Debian system. i managed to use usb mass storage drives (usb pendrive / flashdrive, external usb hdd) on the guests. they show up normally in the guests, You can copy data onto them, then umount them normally. problem is, the data copied onto them gets CORRUPTED every time. i have done some testing on this. i do not have to remove the usb drive physically to get the data corrupted, nor i have to it detach / disable it via the tools/usb menu (uncheck it); i only have to umount it in the guest and then remount it again. it does corrupt data every time. interesting thing is, i did not manage to trash the filesystem on the usb drive yet (i have tried 10 times or so) only the newer copied data seems to be affected...
i have virtualbox-5.1 5.1.10-112026~Debian~wheezy Oracle VM VirtualBox installed with extension pack 5.1.10r112026. i have kernel Linux (none) 3.6.0d111virt #6 SMP Fri Jul 24 13:27:38 CEST 2015 x86_64 GNU/Linux.

i have checked the usb on the host. it works correctly, with no errors. probably it is only a configuration error, but i can not find out, what i am doing wrong. otherwise the guests are working as expected. maybe someone has an idea what is wrong with this setup. i have also tried this very setup on a different hardware (other mainboard) it does the same...
if You have any suggestions, please post them! (i had an older IIRC 4.3 vbox installed that did the same, so i updated to the new one, but no luck...)

thank You in advance!
regards,
Richard
Last edited by LionSGI on 1. Dec 2016, 15:46, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: guest USB data corruption problem

Post by Perryg »

Can't say I have ever seen this but the easy fix is to stop mounting the device in the guest and use shared folders to access the device/s. I seem to remember a discussion on a type of mass storage USB device that was using compression to appear to have more available storage than it really had so maybe there is that to consider.
LionSGI
Posts: 3
Joined: 1. Dec 2016, 14:07

Re: guest USB data corruption problem

Post by LionSGI »

Perryg wrote:Can't say I have ever seen this but the easy fix is to stop mounting the device in the guest and use shared folders to access the device/s. I seem to remember a discussion on a type of mass storage USB device that was using compression to appear to have more available storage than it really had so maybe there is that to consider.
thanks for the advice, but unfortunately it is not an option for me (our users would get confused). i have experimented further. i have a 64bit host, the guests were 32bit. i thought it was the cause, so i installed a 64bit guest (Debian8/amd64) but it still does corrupt the data. i did not experience a filesystem damage yet, which i would expect, but did not happen this far... the host does not touch the pendrive (ie. it does not get auto-mounted on the host). it has something to do with the cache. one thing i observed:
if i copy the data onto the usb drive it is OK until i umount it. only thing i can think of is: the cache for the usb device does not get written to the drive for some reason. are there any options in virtualbox that can influence the caching behavior?

maybe i will have time to test it on a 32bit host... i am courious now :D
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: guest USB data corruption problem

Post by Perryg »

Like I said I can't remember seeing this one before you and I have been doing this for some time. Perhaps a guest log after you test will give us a clue.
LionSGI
Posts: 3
Joined: 1. Dec 2016, 14:07

Re: guest USB data corruption problem

Post by LionSGI »

so, i did some further testing at home, i upgraded to virtualbox-5.1.10. i have a 32bit debian7 with 32bit guest win xp. usb did well, no problems.
i have extension pack installed (same version as virtualbox) on both 64/32bit hosts, but i have no guest additions installed on the guests of the 64bit host. can it cause this kind of usb problem?

thank You!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: guest USB data corruption problem

Post by mpack »

The GAs are not relevant to USB problems. USB is virtual hardware, not a special guest OS driver.
Post Reply