the title means that you have a dual-boot and you would like to access an existing  linux partition using virtual box.

in short: 1) create .vmdk file using VboxManage.exe. 2) create VM 3) check  “Use host I/O cache”

my original system: lenovo thinkpad x201 tablet with windows 7 pro 64-bit

a while ago i installed ubuntu 11.04 from a cd.  while installing, you can easily resize and partition your drive.

under windows i run VirtualBox-4.0.8-71778-Win and ubuntu has already guest editions installed using apt-get.

  1. as administrator run powershell (PS)
  2. in PS : C:\Windows\system32> cd 'C:\Program Files\Oracle\VirtualBox'
  3. C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
    Number Type StartCHS EndCHS Size (MiB) Start (Sect)
    1 0x07 0 /32 /33 162 /162/2 1200 2048
    2 0x07 162 /162/3 1023/239/63 100002 2459648
    5 0x83 1023/239/63 1023/239/63 190 207265792
    6 0x83 1023/239/63 1023/239/63 47683 207656960
    7 0x83 1023/239/63 1023/239/63 47683 305313792
    9 0x83 1023/239/63 1023/239/63 496690 402970624
    8 0x82 1023/239/63 1023/239/63 11444 1420204032
    3 0x07 1023/239/63 1023/239/63 10500 1443641344

    this shows you the actualbreakdown of your hard drive. it also shows that you picked the correct harddrive.
  4. C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe internalcommands createrawvmdk -filename C:\ubuntu.vmdk -rawdisk \\.\PhysicalDrive0
    RAW host disk access VMDK file C:\ubuntu.vmdk created successfully.

    this creates the .vmdk file of you hard drive for VirtualBox.
  5. open virtual box as administrator
  6. choose parameters and press next until the section about virtual hard disk.
  7. choose use existing and open C:\ubuntu.vmdk.
  8. keep choosing parameters and clicking till you click finish
  9. go to the settings of the VM you just created
  10. go to storage>SATA controller and check “Use host I/O cache”. press ok
  11. when the VM boots it will go into grub. pick ubuntu
  12. it will give you:
    error: hd0 out of disk.
    Press any key to continue...

    press any key and ignore it. i didn’t find a solution but also i it didn’t cause any problems.
  13. click on ur log in (don’t press enter)
  14. pick “Ubuntu Classic (No effects)” . i couldn’t get 3D acceleration to work.
  15. press “Login” you are done
i used ext3 partition for home directory. i was able to mount it under windows using ext2Fsd but i couldn’t use the home partition at the same time from windows and virtualized ubuntu. if u have made a change in windows, u can “Flush cache to disk (F11)” to save windows changes. i did not find a way to save linux changes so that they show up in windows; in fact, after i rebooted VM, the changes were not saved. so the best way to share file space is with shared folders function that VB provides
Note on VMWare: vmware creates .vmdk automatically but it ran into error that was smtn like “ahci-0-0 existing verr_access_denied” i didn’t try to play with VMWare’s options