VBOX: Do not disable the host I/O cache for virtualized disk controllers that do not support async I/O within VirtualBox.

This commit is contained in:
Rom Walton 2014-09-16 17:46:42 -04:00
parent ac242a2feb
commit 8621a2ca03
1 changed files with 7 additions and 1 deletions

View File

@ -720,7 +720,13 @@ int VBOX_VM::create_vm() {
command += "--name \"Hard Disk Controller\" ";
command += "--add \"" + vm_disk_controller_type + "\" ";
command += "--controller \"" + vm_disk_controller_model + "\" ";
command += "--hostiocache off ";
if (
(vm_disk_controller_type == "sata") || (vm_disk_controller_type == "SATA") ||
(vm_disk_controller_type == "scsi") || (vm_disk_controller_type == "SCSI") ||
(vm_disk_controller_type == "sas") || (vm_disk_controller_type == "SAS")
) {
command += "--hostiocache off ";
}
if ((vm_disk_controller_type == "sata") || (vm_disk_controller_type == "SATA")) {
if (is_virtualbox_version_newer(4, 3, 0)) {
command += "--portcount 3";