Connecting phisycal partitions

Discussions related to using VirtualBox on Linux hosts.

Connecting phisycal partitions

Postby angelinux71 » 2. Jul 2012, 12:31

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   Expand viewCollapse view
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   Expand viewCollapse view
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
angelinux71
 
Posts: 3
Joined: 2. Jul 2012, 12:24

Re: Connecting phisycal partitions

Postby Perryg » 2. Jul 2012, 14:28

On the command to create you need to add -relative
http://www.virtualbox.org/manual/ch09.html#rawdisk
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Connecting phisycal partitions

Postby angelinux71 » 4. Jul 2012, 15:46

It does not seems to be enough.... getting the same error....
angelinux71
 
Posts: 3
Joined: 2. Jul 2012, 12:24

Re: Connecting phisycal partitions

Postby Perryg » 4. Jul 2012, 16:02

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.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Connecting phisycal partitions

Postby angelinux71 » 4. Jul 2012, 16:43

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
angelinux71
 
Posts: 3
Joined: 2. Jul 2012, 12:24

Re: Connecting phisycal partitions

Postby ringods » 21. Aug 2012, 16:14

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
ringods
 
Posts: 6
Joined: 2. Apr 2009, 17:01
Primary OS: Ubuntu 12.04
VBox Version: PUEL
Guest OSses: Ubuntu, Windows


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 28 guests