Connecting phisycal partitions

Discussions related to using VirtualBox on Linux hosts.
Post Reply
angelinux71
Posts: 3
Joined: 2. Jul 2012, 12:24

Connecting phisycal partitions

Post by angelinux71 »

Hi all,

on a Linux Ubuntu 12.04 Hosts, I want to make usable from a Windows Virtual-box machine a partition that is a true phisycal windows partition.
The partition is a NTFS partition hosted in an extended one.

What I did:

With the "listpartitions" option I've discovered the partition is number 5, then:

Code: Select all

sudo VBoxManage internalcommands createrawvmdk -filename Dati.vmdk -rawdisk /dev/sda -partitions 5
RAW host disk access VMDK file Dati.vmdk created successfully.
But when I try to connect the image at the virtual machine, it says is not correct

Code: Select all

NS_ERROR_FAILURE (0x80004005)
I try to check if there is some permission issue, but it does seems to help.

Any idea??

Thanks in advance.

Angelo
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Connecting phisycal partitions

Post by Perryg »

On the command to create you need to add -relative
http://www.virtualbox.org/manual/ch09.html#rawdisk
angelinux71
Posts: 3
Joined: 2. Jul 2012, 12:24

Re: Connecting phisycal partitions

Post by angelinux71 »

It does not seems to be enough.... getting the same error....
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Connecting phisycal partitions

Post by Perryg »

Using RAW is really tricky and I assume you have read all of the warnings in the link I sent you.
That said it is not something that can be diagnosed remotely. Be sure that you use absolute paths and case letters matter.
angelinux71
Posts: 3
Joined: 2. Jul 2012, 12:24

Re: Connecting phisycal partitions

Post by angelinux71 »

I tried all that I found in your suggestion and other resources, that actually points the same informations.
Something is not correct, but I can't find it. Maybe I will try another strategy. My laptop is dual-boot Win7/Ubuntu, I would like to recycle the "Data" partition of the Win side in a Virtual Machine that runs into ubuntu to get full access to Office documents (Libre Office does not completely guarantee compatibility with the "rest of the world" near to me). Maybe I can reach the same result using the Folder sharing feature...

Thanks for every suggestion and help!

Angelo
ringods
Posts: 6
Joined: 2. Apr 2009, 17:01
Primary OS: Ubuntu 12.04
VBox Version: PUEL
Guest OSses: Ubuntu, Windows

Re: Connecting phisycal partitions

Post by ringods »

I bumped into the same problems initially, but found a stable solution. As a note to myself, I described it into a blog article:

VirtualBox and raw host disk access
Post Reply