VBOX: with VirtualBox 4.3 they renamed the 'IntelAHCI' disk controller to 'AHCI'. Automatically adjust depending on the installer version of VirtualBox.

This commit is contained in:
Rom Walton 2014-08-14 23:53:01 -04:00
parent 6ab3a999c7
commit d1c28266fa
1 changed files with 9 additions and 1 deletions

View File

@ -688,7 +688,15 @@ int VBOX_VM::create_vm() {
command = "storagectl \"" + vm_name + "\" ";
command += "--name \"Hard Disk Controller\" ";
command += "--add \"" + vm_disk_controller_type + "\" ";
command += "--controller \"" + vm_disk_controller_model + "\" ";
if (is_virtualbox_version_newer(4, 3, 0)) {
command += "--controller \"" + vm_disk_controller_model + "\" ";
} else {
if ((vm_disk_controller_type == "sata") || (vm_disk_controller_type == "SATA")) {
command += "--controller \"IntelAHCI\" ";
} else {
command += "--controller \"" + vm_disk_controller_model + "\" ";
}
}
command += "--hostiocache off ";
if ((vm_disk_controller_type == "sata") || (vm_disk_controller_type == "SATA")) {
if (is_virtualbox_version_newer(4, 3, 0)) {