How to Add SATA Hard Disk to Virtual Machine in VirtualBox

Attaching a SATA storage controller in VirtualBox is straightforward. Sometimes, you need to attach SATA hard disks to specific virtual machines rather than the default IDE disks. This post explains how to add SATA hard disk (virtual disk) to virtual machines in the VirtualBox console and CLI (Command Line Interface). This method applies to any host, such as Windows, Linux, and Mac.

VirtualBox supports Intel AHCI-type SATA controllers. By default, virtual machines will be created with IDE controllers only. Before powering virtual machines, you can change this controller in the console view or CLI.

To Add SATA Controllers in VirtualBox – Console View

1)  Go to Storage settings

2) You may have to remove the existing storage controller and hard disk by clicking the remove button, as shown below. Remember, by removing the controller and hard disk from the virtual machine; we are not deleting the existing virtual hard disk (VDI) file. It will remain at the location.

Note – Keep IDE Controller for CD/DVD drives. CD/DVD drives cannot be added to SATA controllers in VirtualBox.

SATA Hard Disk VirtualBox

3) Click on Add controller button and select SATA controller.

Add SATA Controller

4) As mentioned earlier, it supports AHCI type only, so you can’t play with it. Add the hard disk button from the SATA controller and select the existing hard disk.

Attach HDD to SATA Port

5) That’s it. We successfully added a SATA controller to a virtual machine in Oracle VirtualBox. After adding the controller, you can create or use the existing virtual hard disk and attach it to it.

Whenever you get booting errors from ‘Physical to Virtual’ converted disk files, you can change this controller setting and try different options until the booting issue gets resolved.

For example, when you convert a physical machine running with the SATA controller to the virtual environment, as mentioned in an earlier post, you can try it with the SATA controller option in VirtualBox.

Add SATA Controllers in VirtualBox By CLI

Ensure you run the VBoxManage command from the correct installation location or you have already added it to the Windows path variable.

1) First, add the controller with the following command

VBoxManage storagectl OSX –name “SATA Controller” –add sata   –controller IntelAHCI

OSX – is the Virtual Machine name (UUID also applicable).

2) Add the hard disk to the controller with the following command

VBoxManage storageattach OSX –storagectl “SATA Controller”    –type hdd –port 0 –device 0 –medium D:/MAC/OSX/OSX.vmdk

D:/MAC/OSX/OSX.vmdk – Location of Hard disk.

VBoxManage createhd –filenameD: /MAC/OSX/OSX.vmdk –size 10240 to create Hard disk.

Do you want to try the same command to add CD or DVD drive? I tried and got the following error.

Error: The Attachment is not supported by the Storage Controller: ‘SATA Controller’

By CLI

As SATA carries more advantages, you can get more benefits by attaching the virtual disk to the SATA controller. I hope this guide helps connect the virtual hard disk through the SATA port for a VM in VirtualBox.

If any of the above solutions did not fix the Windows PC issues, we recommend downloading the below PC repair tool to identify and solve any PC Issues.

PC Repair

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.

1 thought on “How to Add SATA Hard Disk to Virtual Machine in VirtualBox”

  1. Hello,

    However what I’d be most interested in is if I can add a ‘real’ sata connected drive to the virtual box.

    Meaning ,

    I have an OpenSolaris host with a SATA drive (ext3 formatted) connected to it. I want it to be accessible in my linux Virtual-Box guest . Would that be possible?

    Reply

Leave a Comment