Virtual machine (Debian 9 x64) crashes when writing to SD card.

Discussions about using Linux guests in VirtualBox.
Post Reply
fiedel
Posts: 1
Joined: 7. Jul 2018, 21:49

Virtual machine (Debian 9 x64) crashes when writing to SD card.

Post by fiedel »

The host is Windows 10 x64. In order to access the SD card in VM, I created a VMDK file for the card, and attached it to VM as a SATA hard drive. I started VirtualBox as administrator, and ran commands as root in Debian. Every time I wrote to the card, it ended up with error:
=======================================
The I/O cache encountered an error while updating data in medium "ahci-0-1" (rc=VERR_ACCESS_DENIED). Make sure there is enough free space on the disk and that the disk is working properly. Operation can be resumed afterwards.

Error ID: BLKCACHE_IOERR
Severity: Non-Fatal Error
=======================================
And the VM crashed (black screen).

Any suggestions? :|
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: Virtual machine (Debian 9 x64) crashes when writing to SD card.

Post by socratis »

fiedel wrote:I created a VMDK file for the card
How? What does the VMDK look like?
fiedel wrote:rc=VERR_ACCESS_DENIED
That's obviously an "access denied" error. What are the permissions on the card itself? I am running VirtualBox as a simple user, but when I have to mount an external drive, I have to change the permissions at the root level *and* eject the drive from my OSX host:
$ ls -al /dev/disk2*
brw-r-----  1 root  operator    1,   5  8 Ιολ 11:55 /dev/disk2
brw-r-----  1 root  operator    1,   6  8 Ιολ 11:55 /dev/disk2s1
brw-r-----  1 root  operator    1,   7  8 Ιολ 11:55 /dev/disk2s2
brw-r-----  1 root  operator    1,   8  8 Ιολ 11:55 /dev/disk2s3

$ sudo chmod og+rw /dev/disk2

$ ls -al /dev/disk2*
brw-rw-rw-  1 root  operator    1,   5  8 Ιολ 11:55 /dev/disk2
brw-r-----  1 root  operator    1,   6  8 Ιολ 11:55 /dev/disk2s1
brw-r-----  1 root  operator    1,   7  8 Ιολ 11:55 /dev/disk2s2
brw-r-----  1 root  operator    1,   8  8 Ιολ 11:55 /dev/disk2s3

$ diskutil eject /Volumes/TDK-8GB-NTFS/
where "TDK-8GB-NTFS" in the volume label of /dev/disk2. Unplugging and re-plugging the drive needs permissions correction and ejecting it again.
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.
Post Reply