booting from usb stick

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
iaw4
Posts: 3
Joined: 19. Dec 2014, 03:30

booting from usb stick

Post by iaw4 »

latest virtualbox 4.3.20 (with extension pack), latest OSX 10.10.1. I would like to create a virtual machine whose only function it is to boot (linux guest) usb sticks. it won't need any vm hard drives. just the usb stick, sitting on /dev/disk2 .

after trial and error (I think the disk needed to be inserted and unmounted but not ejected, and I needed to be su), I succeeded with
# VBoxManage internalcommands createrawvmdk -filename ./rr2.vmdk -rawdisk /dev/disk2
RAW host disk access VMDK file ./rr2.vmdk created successfully.
I then changed the ownership of rr2.vmdk to the vbox user "me" and to make doublesure, I changed the permissions to be rw-rw-rw on rr2.vmdk. next, as the user, I created a virtualbox (via the gui) and started it once. this seemed to register the vm. good. finally, the coup de grace. I want to attach disk2. So I tried
$ VBoxManage storageattach "testusbstick" --storagectl "SATA" --port 0 --device 0 --type hdd --medium ./rr2.vmdk
VBoxManage: error: Permission problem accessing the file for the medium '/Users/me/./rr2.vmdk' (VERR_ACCESS_DENIED)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
VBoxManage: error: Invalid UUID or filename "./rr2.vmdk"
I tried variations on rr2.vmdk as the filename, but this was a no-go. What am I doing wrong here?

/iaw
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: booting from usb stick

Post by socratis »

From the manual, Chapter 8.18 VBoxManage storageattach:
--medium Specifies what is to be attached. The following values are supported:
...
• If a filename is specified, it must be the full path of an existing disk image (ISO, RAW, VDI, VMDK or other), which is then attached to the given device slot.
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