Windows Host, Linux Client on physical disk

Discussions related to using VirtualBox on Windows hosts.
Post Reply
schattenkrieger
Posts: 2
Joined: 8. Aug 2009, 20:35
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Windows Host, Linux Client on physical disk

Post by schattenkrieger »

Hi,
My machine has a dualboot setup with 1. Windows XP, 2. Xubuntu.
Now i'd like to use my raw Linux partition in virtualbox under Windows.
How do i manage this?

Code: Select all

vboxmanage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
has following output:
VirtualBox Command Line Management Interface Version 3.0.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Number Type StartCHS EndCHS Size (MiB) Start (Sect)
1 0x12 0 /1 /1 783 /254/63 6149 63
2 0x07 784 /0 /1 1023/254/63 109615 12594960
3 0x83 1023/254/63 1023/254/63 34812 237087270
5 0x82 1023/254/63 1023/254/63 2047 308383803
where 1 is SystemBackup(hidden), 2 Windows HD, 3 LInux root, 5 Linux Swap.

Under Windows i can use the following command to create a raw harddisk vmdk:

Code: Select all

VBoxManage.exe internalcommands createrawvmdk -filename linuxraw.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 3,5
But if i register the newly created vmdk in virtualbox, it tells me the size of the vmdk would be 149.05GB, which is exactly the size of my entire harddisk!
In Linux vboxmanage you can use the "-relative" flag to exclusively use the linux partitions. What else does the -partitions flag do if not limit the partitions for the vm?

My question: is it safe to run the virtualmachine anyway or does this lead to harddisk raw writes over my other partitions?
Does anyone have a spare machine to try this out? :wink:

Thanks in advance for any help on this.
tim
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Windows Host, Linux Client on physical disk

Post by baf »

Open the vmdk file with notepad and look in it. It is a textfile.
You will see that it just uses the partition(s) you have directed it to and for the rest of the disk it will just return zeroes and won't be able to write anything.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
schattenkrieger
Posts: 2
Joined: 8. Aug 2009, 20:35
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Windows Host, Linux Client on physical disk

Post by schattenkrieger »

thanks :)
Post Reply