Creating a virtual machine with Vboxmanage

Lately, I’ve been creating, deleting and recreating a lot of virtual machines with Oracle VirtualBox. So today, when I needed to start with a clean environment, I decided to create a virtual machine using the command line instead of the GUI.

Clicking through the wizard is a lot easier than creating the virtual machine from the command line, but there are some options I always change after creating the guest. For example, to install Windows, you need to mount a CD. To access other installation files on my laptop, I need to share a local folder. And I like to enable drag ‘n’ drop. So why not automate the creation process, including these settings? This is the script I created, calling VBoxManage.exe:

 

Update: in version 4.3.20, the program files directory has been changed from:

C:\Program Files\Oracle\VirtualBox

to:

C:\Program Files\Oracle VM VirtualBox

This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to Creating a virtual machine with Vboxmanage

  1. Robert says:

    Update: for reusability, I’ve created variables for some parameters.

Leave a Reply

Your email address will not be published. Required fields are marked *