After you added a new virtual hard disk to the virtual machine configuration, it will be invisible to the operating system installed inside the virtual machine until the moment you initialize it.
Initializing the New Virtual Hard Disk in Windows
To Initialize the new virtual hard disk in a Windows guest OS, you will need the Disk Management utility available through:
When you open the Disk Management utility, it automatically detects that a new hard disk was added to the configuration and launches Initialize and Convert Disk Wizard :
The added disk will appear as a new disk in the Disk Management utility window, but its memory space will be unallocated. To allocate the disk memory, right-click this disk name in the Disk Management utility window and select New Simple Volume in Windows Vista or New Volume in Windows XP. The New Simple Volume Wizard / New Volume Wizard window will appear. Follow the steps of the wizard and create a new volume in the newly added disk.
After that your disk will become visible in Computer / My Computer and you will be able to use it as a data disk inside your virtual machine.
Initializing the New Virtual Hard Disk in Linux
Initializing the new virtual hard disk in a Linux guest OS comprises two steps: allocating the virtual hard disk space and mounting this disk in the guest OS.
To allocate the space, you will need to create a new partition on this virtual hard disk, using the
fdisk
utility.
Note:
To use the
fdisk
utility, you need the
root
privileges.
fdisk /dev/hd*
Note:
If you added a SCSI disk to the virtual machine configuration, use the
fdisk /dev/sd*
command instead.
/dev/hdc
in your Linux virtual machine. To work with this device, enter:
fdisk /dev/hdc
Note:
If this is a SCSI disk, use the
fdisk /dev/sdc
command instead.
p
n
p
1
.
w
When you allocated the space on the newly added virtual hard disk, you should format it by entering the following command in the terminal:
mkfs -t
<FileSystem>
/dev/hdc1
Note:
<FileSystem>
stands for the file system you want to use on this disk. It is recommended to use
ext3
or
ext2
.
When the added virtual hard disk is formatted, you can mount it in the guest OS.
mkdir /mnt/hdc1
Note: You can specify a different mount point.
mount /dev/hdc1 /mnt/hdc1
When you mounted the virtual hard disk, you can use its space in your virtual machine.