[Discuss] Using raw host hard disk in virtual client

Bill Bogstad bogstad at pobox.com
Sat Aug 4 17:12:31 EDT 2012


On Sat, Aug 4, 2012 at 3:29 PM, Jerry Natowitz <j.natowitz at rcn.com> wrote:
> I may not have been specific enough in what I want to do.  I want the Linux client to be able to directly mount ext4 partitions, not to do raw I/O to partitions.

Actually, I think you do want raw I/O.    When a native Linux OS
kernel mounts an ext4 partition it does so by doing raw I/O to the
partition.   (Actually there is a block cache in the middle as well,
but that's close enough to raw for this discussion.)   In order for a
guest Linux OS to mount a real ext4 partition on your disk, it needs
to get "raw" access to it.   Section 9.8 of the VirtualBox PDF manual
has info on how to set up raw access for both Linux and Windows HOST
systems.   In either case, the GUEST system will see it as a
disk/partition which it can mount, not as a networked filesystem of
some sort.  I've never done this with a Windows HOST system, but I
have with a Linux HOST and Windows GUEST.    Unfortunately, all I can
recall is that it worked.   No recollection of the performance
characteristics.

I'm going to speculate a bit at this point.  You have a physical
machine which has a number of disk partitions which are formated with
different filesystems.   Sometimes you boot it into Windows which
probably uses NTFS partitions and sometimes into Linux which uses ext4
partitions.   The VFAT partitions are probably being used to
transfer/share data between both operating systems.   Speculating
further, when your wife has the machine booted into Windows, you want
to be able to get access to the files which are stored in the ext4
partitions.   Unfortunately, while there are modules for Windows that
support access to ext3 partitions, access to ext4 partitions from
native Windows is limited at this point.   So you are thinking about
setting up a Linux GUEST so that when the HOST OS is Windows you can
still access ext4 partitions via a Linux GUEST.   I see no reason this
shouldn't work.    My only caveat is that your Linux GUEST should be
setup to boot off of a filesystem based disk image and that it only
mount the physical ext4 partitions for data access.   I wouldn't want
to share OS configuration files between your native Linux HOST and
your Linux GUEST.

Good Luck,
Bill Bogstad



More information about the Discuss mailing list