Monday, April 16, 2012

How to Add a Second Hard Drive to a Virtual Machine in VirtualBox

Today, I will show you how to add a second hard drive to your virtual machine using VirtualBox. If your first hard drive is slowly filling up this is a very easy way to expand your storage.

Time to fire up VirtualBox.

For the purpose of this tutorial I will use a Windows 7 virtual machine (make sure it is powered off first!!) and add a second sata hard drive of 20GB.

Time to change those settings so click on Settings.

We now need to click on Storage, locate the Sata controller and click on the Add hard disk icon You will then get the following message:

You are about to add add a virtual hard disk to controller SATA Controller.

Would you like top create a new, empty file to hold the disk contents or select an existing one?

If you already have a disk set up click Choose Existing Disk but for the purpose of this tutorial click Create new disk.

This will now start the Virtual Disk Creation Wizard. On the first page make sure you choose the VDI format for your hard drive and click next.

The next page of the wizard is Virtual Disk Storage Details. You can either choose a dynamic disk or a fixed size disk. Dynamic disks slowly grow over time to the maximum value you set whereas fixed is just that - a fixed size. Fixed are faster to use but take longer to create. Let's create a fixed size of 20 GB.

Next, we have to decide where to store this new virtual disk. Personally I don't store any virtual disks on the same hard drive as the host operating system. This means that in the event of the host disk dying my virtual machines are kept separate. I can then quickly retrieve them and get them back up with little time lost.

The final page is the Summary page. Review your configuration options and when you are happy click create. Your second hard drive will now be created and attached to your virtual machine.

All that is left to do is fire up your virtual machine and check if you have a second hard drive of 20 GB available. On a Windows machine you will need to go to:

Start - Control panel - Administrative Tools - Disk Management

and format the drive with a filesystem and drive letter. Only then will Windows recognise it as another hard drive.

No comments:

Post a Comment

55