[Windows 7] Problem with physical partition access

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Se7en
Posts: 28
Joined: 31. Oct 2009, 14:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Lenny

[Windows 7] Problem with physical partition access

Post by Se7en »

Hi,

I've got Windows 7 Pro x64 and Virtualbox 3.0.10, my guest OS is Debian 5.0 (Lenny) and it use two physical partitions.

The first physical partition (ext3) is a entire physical hard disk and the second physical partition (ext3) is a individual physical harddisk partition and is the 2nd primary partition from an other HDD. The 1st primary partition is a NTFS primary partition used by the host OS.

My problem is the guest OS can't mount the second physical partition but the first physical partition is mounted.
dmesg wrote: said :
VFS: Can't find ext3 filesystem on dev hdd2.
fsck wrote: said :
Couldn't find ext2 superblock, trying backup blocks...

But the filesystem isn't damaged because Linux live CD (as host OS) can mount it without problem.

NOTE: Because of Windows 7 restrictions, I always run Virtualbox as Administrator in order to allow it to acceed to my physical partitions.

I retry to mount it with Windows XP Pro x64 (host OS) and Virtualbox 3.0.10 but the problem still occur.
Last edited by Se7en on 31. Oct 2009, 16:21, edited 2 times in total.
Se7en
Posts: 28
Joined: 31. Oct 2009, 14:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Lenny

Re: [Windows 7] Problem with physical partition access

Post by Se7en »

Finally, I use the "Access to entire physical hard disk" method, it seems the "Access to individual physical hard disk partitions" method doesn't work anymore.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: [Windows 7] Problem with physical partition access

Post by Sasquatch »

You realize the problems that might come if you use the full hard drive, right?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Se7en
Posts: 28
Joined: 31. Oct 2009, 14:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Lenny

Re: [Windows 7] Problem with physical partition access

Post by Se7en »

No !

The problem is resolved when Virtualbox got an entire physical hard disk access.

In my case, host OS use the 1st partition and guest OS use the 2nd partition.
Last edited by Se7en on 31. Oct 2009, 20:29, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: [Windows 7] Problem with physical partition access

Post by Perryg »

If you try accessing the part that has the main OS on it while it is mounted you can loose your entire OS, host and guest.
Or say some indexing software kicks it you can actually wipe the data.

Maybe you should read section 9.10. Using a raw host hard disk from a guest of the VBox Users Guide to be sure you know what can happen.
Se7en
Posts: 28
Joined: 31. Oct 2009, 14:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Lenny

Re: [Windows 7] Problem with physical partition access

Post by Se7en »

In my case, the host OS and guest OS never read/write the same partition.
These partitions have only data files, the host OS is on another HDD, and guest OS is virtual HDD file

Code: Select all

                   HDD 0 (System)
+----------------------------------------+
|              NTFS (host OS)            |
+----------------------------------------+

                   HDD 1 (Data)
+----------------------------------------+
|              ext3 (guest)              |
+----------------------------------------+

                   HDD 2 (Data)
+--------------------+-------------------+
|    NTFS (host)     |    ext3 (guest)   |
+--------------------+-------------------+
      Partition 1         Partition 2
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: [Windows 7] Problem with physical partition access

Post by Sasquatch »

Just be sure to make regular backups in case things do go wrong.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Se7en
Posts: 28
Joined: 31. Oct 2009, 14:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Lenny

Re: [Windows 7] Problem with physical partition access

Post by Se7en »

The filesystem isn't damage.

Using the command line
VBoxManage.exe internalcommands createrawvmdk -filename C:\vbox\Drives\HDD02.vmdk -rawdisk \\.\PhysicalDrive2 -partitions 2

Two files are created : HDD02.vmdk and HDD02-pt.vmdk
I set it in the guest OS settings.
Guest OS wasn't able to acceed to the partition 2, but it displays the partition table.
It wasn't able to read the partition 1 (NTFS).

-----------------

Using the command line
VBoxManage.exe internalcommands createrawvmdk -filename C:\vbox\Drives\HDD02.vmdk -rawdisk \\.\PhysicalDrive2

One file is created : HDD02.vmdk
I set it in the guest OS settings.
Guest OS is able to acceed to the partition 2 and it displays the partition table.
thebeana
Posts: 2
Joined: 4. Nov 2009, 21:57
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 11.10, Windows XP

Re: [Windows 7] Problem with physical partition access

Post by thebeana »

I'm having a similar problem trying to boot my Ubuntu 9.10 partition inside a VM using raw access, with the host running Window 7 64bit.

I have first partition windows ntfs, then 2 others ex4 and swap (and a few more, but they are irrelevant).


The guest machine can't seem to read the partition table created by VBoxManage, and just see's the full disk blank.

However access without the --partitions options works fine (ie raw access for the entire disk)

Not going to use that though, to much risk that i'll accidentaly access my windows partition and screw everything up!

Anyone got any solution that isnt giving raw access to the entire disk? Or is this just something we will have to wait to be fixed?
Se7en
Posts: 28
Joined: 31. Oct 2009, 14:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Lenny

Re: [Windows 7] Problem with physical partition access

Post by Se7en »

What is your Virtualbox version ?

If it's 3.0.10, maybe you should try the previous versions : 3.0.8 or 3.0.6*
http://download.virtualbox.org/virtualb ... 40-Win.exe
http://download.virtualbox.org/virtualb ... 28-Win.exe

If not, you should be waiting for the November update.


(*) I confirm Virtualbox 3.0.10 got this problem with these host operating systems :
Windows XP Pro x64, Windows 7 Pro x64
and Virtualbox 3.0.6 worked well with Windows XP Pro x64.

I don't know about Virtualbox 3.0.8, I never used it.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: [Windows 7] Problem with physical partition access

Post by MarkCranness »

There is a known raw disk access regression in 3.0.10: http://www.virtualbox.org/ticket/5355
Se7en
Posts: 28
Joined: 31. Oct 2009, 14:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Lenny

Re: [Windows 7] Problem with physical partition access

Post by Se7en »

OK, thank you.
Post Reply