Attach new VDI disk image to fedora guest on virtual box

Here’s a short post about how to add a new VDI disk storage to a fedora guest machine on Virtual box.

I’m running VirtualBox 4.2 on windows. guest is Fedora 17.

First, in Virtual Box, go to the guest machine settings, storage -> add attachement. You can create a new VDI disk image now, or use an existing one. Then boot your fedora virtual machine. Open a terminal and login as root.

  • You should identify the new disk.
 fdisk -l 

Mine is:


Disk /dev/sdb: 16.0 GB, 15993929728 bytes

255 heads, 63 sectors/track, 1944 cylinders, total 31238144 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00057f2

 

  •  Use gparted to create a new partition on the disk.
 
yum install gparted

gparted

  • Create a mount point for the new storage disk

mkdir /data

  • Find the uuid of the new disk
 less /dev/disk/by-uuid 
Mine is


 360e8457-4fcf-4d77-b736-9b943725ad85 -> ../../sdb1 
  • modify the fstab file and  add a new line for mounting the disk
 UUID=360e8457-4fcf-4d77-b736-9b943725ad85        /data   ext3    defaults        0 2 

This is it.  You can use your new storage space now, on /data

Advertisements
This entry was posted in linux. Bookmark the permalink.

One Response to Attach new VDI disk image to fedora guest on virtual box

  1. Gyyz says:

    Hi,
    I am actually writing with respect to your Coursera post and the Quicksort dance.
    I am sorry that I’m writing here, it’s just that – unfortunately – for some strange reasons (that perfectly make sense though) I cannot comment on the forum. And I still wanted to write a few words.
    First of all, thank you! The video really made my day.
    I believe that they are always partitioning around the first element (pivot = dark hat), while whoever is being compared with the pivot puts on a hat with a feather.
    (And Prof. Hoare might be demonstrating a twist of the Dutch flag problem – looks like the Polish flag to me 🙂
    All that reminds me of how I once tried to run Euclid’s algorithm on a group of friends. And the assumption that a person can represent more than one cell of memory proved so wrong… (Just why would I need so many variables in Euclid’s algorithm? Maybe it was something else.)
    Thanks again!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s