diff --git a/checkin_notes b/checkin_notes
index 187708f12c..527c74df5d 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -6885,4 +6885,18 @@ Rom 16 Nov 2012
win_build/
libboinczip_staticcrt.vcproj
-
\ No newline at end of file
+
+Rom 16 Nov 2012
+ - VBOX: Add the ability to specify both the type and model of disk
+ controller to use. It can be specified by adding the following
+ tags to vbox_job.xml:
+
+
+
+
+ Executing vboxmanage --help will list the available options in the
+ storeagectl section.
+
+ samples\vboxwrapper\
+ vbox.cpp, .h
+ vboxwrapper.cpp
diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp
index 491837a867..d262d76246 100644
--- a/samples/vboxwrapper/vbox.cpp
+++ b/samples/vboxwrapper/vbox.cpp
@@ -62,6 +62,8 @@ VBOX_VM::VBOX_VM() {
vm_master_name.clear();
vm_name.clear();
vm_cpu_count.clear();
+ vm_disk_controller_type.clear();
+ vm_disk_controller_model.clear();
os_name.clear();
memory_size_mb.clear();
image_filename.clear();
@@ -85,6 +87,10 @@ VBOX_VM::VBOX_VM() {
#else
vm_pid_handle = 0;
#endif
+
+ // Initialize default values
+ vm_disk_controller_type = "ide";
+ vm_disk_controller_model = "PIIX4";
}
VBOX_VM::~VBOX_VM() {
@@ -731,9 +737,9 @@ int VBOX_VM::register_vm() {
vboxwrapper_msg_prefix(buf, sizeof(buf))
);
command = "storagectl \"" + vm_name + "\" ";
- command += "--name \"IDE Controller\" ";
- command += "--add ide ";
- command += "--controller PIIX4 ";
+ command += "--name \"Hard Disk Controller\" ";
+ command += "--add \"" + vm_disk_controller_type + "\" ";
+ command += "--controller \"" + vm_disk_controller_model + "\" ";
retval = vbm_popen(command, output, "add storage controller (fixed disk)");
if (retval) return retval;
@@ -757,7 +763,7 @@ int VBOX_VM::register_vm() {
vboxwrapper_msg_prefix(buf, sizeof(buf))
);
command = "storageattach \"" + vm_name + "\" ";
- command += "--storagectl \"IDE Controller\" ";
+ command += "--storagectl \"Hard Disk Controller\" ";
command += "--port 0 ";
command += "--device 0 ";
command += "--type hdd ";
diff --git a/samples/vboxwrapper/vbox.h b/samples/vboxwrapper/vbox.h
index ab648b571b..d8d581dd91 100644
--- a/samples/vboxwrapper/vbox.h
+++ b/samples/vboxwrapper/vbox.h
@@ -38,6 +38,10 @@ struct VBOX_VM {
std::string vm_name;
// required CPU core count
std::string vm_cpu_count;
+ // the type of disk controller to emulate
+ std::string vm_disk_controller_type;
+ // the disk controller model to emulate
+ std::string vm_disk_controller_model;
// name of the OS the VM runs
std::string os_name;
// size of the memory allocation for the VM, in megabytes
diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp
index cb82ac0d1e..a3dcd4013d 100644
--- a/samples/vboxwrapper/vboxwrapper.cpp
+++ b/samples/vboxwrapper/vboxwrapper.cpp
@@ -143,6 +143,8 @@ int parse_job_file(VBOX_VM& vm, vector& copy_to_shared) {
fclose(f);
return 0;
}
+ else if (xp.parse_string("vm_disk_controller_type", vm.vm_disk_controller_type)) continue;
+ else if (xp.parse_string("vm_disk_controller_model", vm.vm_disk_controller_model)) continue;
else if (xp.parse_string("os_name", vm.os_name)) continue;
else if (xp.parse_string("memory_size_mb", vm.memory_size_mb)) continue;
else if (xp.parse_double("job_duration", vm.job_duration)) continue;