Since I haven't found any "complete guides" to do this, i've decided to post it here. Hope it will be useful. So, here's how i achieved it under Ubuntu distro:
Code: Select all
sudo gedit /boot/grub/menu.lstCode: Select all
title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid b360edaf-a86e-48a9-b209-721656f194b7
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=b360edaf-a86e-48a9-b209-721656f194b7 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quietkernel /boot/vmlinuz-2.6.27-7-generic root=UUID=b360edaf-a86e-48a9-b209-721656f194b7 ro quiet splash ramdisk_size=768000
so, now there is:
Code: Select all
title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid b360edaf-a86e-48a9-b209-721656f194b7
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=b360edaf-a86e-48a9-b209-721656f194b7 ro quiet splash ramdisk_size=768000
initrd /boot/initrd.img-2.6.27-7-generic
quietUseful link on ramdisk creation: http://ubuntuforums.org/showthread.php?t=182764
When the system restarts, you can check your ramdisk by mounting it (sudo mount /dev/ram0 /media/ramdisk) and browsing to its mount point and checking it's free space. If everything went fine, you can proceed to create rawdisk vmdk file that points to your ramdisk. Before doing so, you should unmount the ramdisk (sudo umount /dev/ram0)
So, the next step is to make a filesystem on ramdisk and create a .vmdk file:
Code: Select all
sudo mke2fs /dev/ram0Code: Select all
sudo VBoxManage internalcommands createrawvmdk -filename /home/username/.VirtualBox/VDI/ramdisk.vmdk -rawdisk /dev/ram0Code: Select all
VirtualBox Command Line Management Interface Version 2.0.4
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.
RAW host disk access VMDK file /home/username/.VirtualBox/VDI/ramdisk.vmdk created successfully.Code: Select all
sudo chown your_username /home/username/.VirtualBox/VDI/ramdisk.vmdkNext and final step is to start the virtual machine. During boot, the system could inform you of detecting new hardware as mine did, and you should right-click My Computer and go to Manage. There you should go to Disk Management and you should see your new disk labeled as "Unallocated" and a Wizard "Initialize and convert disk" should pop-up. You just need to select your drive to be initialized and converted, and then right-click Unallocated space and select "New volume" to create partition. For some reason, you can only set up the drive as Dynamic drive, so the only option for this drive is to create Simple dynamic disk.
So that's it. I hope it'll be of use to someone.