Read Only error when booting Virtualbox VM from SD card

0

I have Lubuntu installed on an SD card I can boot from. Sometimes it'd better if I can boot from it into a VM. I have Virtualbox for this. Host OS is MacOS.

I checked that the SD was at /dev/disk2 and created a file pointing to the SD card to boot using sudo VBoxManage internalcommands createrawvmdk -filename "lubuntu-sd.vmdk" -rawdisk /dev/disk2

Looks like it worked, but even though I've set myself to the owner (sudo originally made root the owner), and I've set permissions to 777, I keep getting a read only error.

enter image description here

At this point I think the error could mean the disk itself, not the file pointing to the disk, is what's read only, and if that's the case then I don't really know what to do about that. I can boot the SD card directly when starting up the Mac and use Lubuntu normally that way. I'm just guessing though. I don't know how to reconcile this error message with the permissions I've set.

I've tried attaching the vmdk file to the VM as SATA and IDE, and the errors are almost the same:

Failed to open image '/Users/<me>/lubuntu-sd.vmdk' for writing due to wrong permissions (VERR_VD_IMAGE_READ_ONLY).
AHCI: Failed to attach drive to Port0 (VERR_VD_IMAGE_READ_ONLY).


Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
ConsoleWrap
Interface: 
IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Failed to open image '/Users/<me>/lubuntu-sd.vmdk' for writing due to wrong permissions (VERR_VD_IMAGE_READ_ONLY).
PIIX3 cannot attach drive to the Primary Slave (VERR_VD_IMAGE_READ_ONLY).


Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
ConsoleWrap
Interface: 
IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

This is the content of the vmdk file:

# Disk DescriptorFile
version=1
CID=0c8ba2cd
parentCID=ffffffff
createType="fullDevice"

# Extent description
RW 249737216 FLAT "/dev/disk2" 0

# The disk Data Base 
#DDB

ddb.virtualHWVersion = "4"
ddb.adapterType="ide"
ddb.geometry.cylinders="16383"
ddb.geometry.heads="16"
ddb.geometry.sectors="63"
ddb.uuid.image="60fbb773-08fa-4b02-aaa2-f8ced220d358"
ddb.uuid.parent="00000000-0000-0000-0000-000000000000"
ddb.uuid.modification="00000000-0000-0000-0000-000000000000"
ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000"

I also have logs from Virtualbox but there are a lot and I'm not sure which are relevant. Most of the error logs look like they complain about wrong permissions, but if anyone knows what may help I'll post them.

Does anyone have any insight into this? I've done some looking around for others who've had this problem but most other people look like they're doing something fancier than what I'm doing, like stuff that involves Onedrive, or their solutions involve something you can do on Windows. I don't do much virtualization so I'm a little out of my depth here.

virtualbox
virtual-machine
sd-card
bootable-media
asked on Super User Oct 13, 2020 by Jorek

1 Answer

1

Ok all I needed to do was chmod the permissions for /dev/disk2. I forgot all about that. I'm on to a whole new set of errors, but this one at least is resolved.

answered on Super User Oct 15, 2020 by Jorek

User contributions licensed under CC BY-SA 3.0