mitchellh/packer — pull request #703 by kikitux (2013-12-11 21:54:06+00:00)
Title: Builder virtualbox additional disks

This PR implement the option to add additional disks at the moment of the creation.

This have been tested on Windows 8.1 + virtualbox 4.3.4 + vagrant

on the json template file:

...
"hard_drive_interface" : "sata",
"disk_size" : 16000,
"additionaldisk_size" : [32000, 22000, 11000],
...

At execution, this out put is generated:

..
==> virtualbox: Creating virtual machine...
==> virtualbox: Creating hard drive...
==> virtualbox: Creating additional hard drives...
==> virtualbox: Creating forwarded port mapping for SSH (host port 3499)
..

During the execution, the disks are created as expected:

$ ls -alh output-virtualbox/
-rw-r--r-- 1 AlvaroM Administ 2.0M Dec 11 23:06 packer-virtualbox1.vdi
-rw-r--r-- 1 AlvaroM Administ 2.0M Dec 11 23:06 packer-virtualbox2.vdi
-rw-r--r-- 1 AlvaroM Administ 2.0M Dec 11 23:06 packer-virtualbox3.vdi
-rw-r--r-- 1 AlvaroM Administ 2.0M Dec 11 23:06 packer-virtualbox4.vdi