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)
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)
IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

This is the content of the vmdk file:

# Disk DescriptorFile

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

# The disk Data Base 

ddb.virtualHWVersion = "4"

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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.