Mounting a CD/DVD image on a VirtualBox 4.0+ VM running headless

VBoxManage is a great tool, but it’s really too powerful to have such a weakly organized --help screen.

Plus, recent VirtualBox versions have a subtly different syntax for common operations, and you may find several ways to perform a basic task depending on the version the post you find is talking about.

So, in order to mount a CD or DVD image while your VM is running (headless or not it doesn’t really matter… obviously if it is headless you have no choice) you have to type the following:

VBoxManage storageattach "your VM name" --storagectl 'Controller IDE' --port 1 --device 0 --type dvddrive --medium /path/to/your/iso/image.iso

Remember to escape your VM name in case it has whitespaces! Of course you may use uuids instead of names and you may attach hdds, fdds and specify whatever option you want. Just type

VBoxManage storageattach

by itself to see the specific help with all the info you need.

Advertisements

2 thoughts on “Mounting a CD/DVD image on a VirtualBox 4.0+ VM running headless

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s