How to Add SATA Hard Disk to Virtual Machine in VirtualBox

Attaching a SATA storage controller in VirtualBox is very simple and straightforward. Sometimes, you need to attach SATA hard disks to certain virtual machines rather than the default IDE disks. This post explains how to add SATA hard disk (virtual disk) to virtual machines in VirtualBox console and CLI (Command Line Interface). This method is applicable to any hosts 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 power on the 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 controller removal 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) Now, Click on Add controller button and select SATA controller.

SATA Hard Disk VirtualBox

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

SATA Hard Disk VirtualBox

5) That’s it. We successfully added 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 to it. Whenever you get booting errors from ‘Physical to Virtual’ converted disk files, then you can change these controller settings and try different options until the booting issue gets resolved.

For example, when you convert a physical machine which is running with the SATA controllers, to Virtual as mentioned in my earlier post, you can try it with SATA controllers in VirtualBox.

To Add SATA Controllers in VirtualBox – Command View

1) First, add the controller with the following command

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

OSX – in 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 following error.

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

SATA Hard Disk VirtualBox

As SATA carries more advantages with it, you can get more benefits by attaching the virtual disk by SATA controller. Hope this guide is useful in attaching virtual hard disk through SATA port for VirtualBox virtual machine.

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?

Comments are closed.

Pin It on Pinterest

Shares