I am wondering if anyone is using Virtualbox-bin to access a partition of windows on their system.
I would like to be able to use my windows XP partition as a VM in my gentoo box without reinstalling windows. Is this possible?
For example, my system looks like this:

I read in the virtualbox documentation that it is possible to have raw access to a partition on a hard drive. However, this comes with a pretty nasty warning: from Section 9.9.2

Quote:

Warning: Raw hard disk access is for expert users only. Incorrect use or use of an outdated conﬁguration can lead to total loss of data on the physical disk. Most importantly, do not attempt to boot the partition with the currently running host operating system in a guest. This will lead to severe data corruption.

But can I do what I want... I have a fully licenced version of XP, but I lost my "activation code" as it was purchased when I was a student quite a few years ago...
any recommendations or suggestions as to how I can proceed?

I don't have tested on Gentoo (I have to install VirtualBox first, I'm working on this..) but at work I have VirtualBox installed on Windows XP that runs a Gentoo machine with 2 raw disks: the first is shared with Windows XP, the second is used only by Linux.
The only real warning is that a partition must be accessed (used) exclusively by one machine (host or guest). If a partition must be accessed by two or more machines, it must be mounted by one machine and exported via network to the others boxes.

...so with a previously installed windows XP system with NTFS, will this work or will I have to set up nfts-3g to access the disk. Also, won't the previously installed windows xp system get very confused with all the hardware switching to the virtual machine? This would be equivalent to taking the harddrive of the XP system and putting it into a new system... I've tried this with windows 98...the windows was not happy at all. I'm thinking it will force me to re-activate my system. And let's say for some reason I get it working, what will happen if I actually boot into the windows XP system after setting this up?
I appreciate your thoughts!

I'm using WinXP on a raw partition from VirtualBox, it works great. But if you've lost the activation code, you're screwed. You see, VirtualBox is seen by Windows as a new machine, so you'll be asked for activation. Your only chance are alternative methods *ahem*.

I'm using WinXP on a raw partition from VirtualBox, it works great. But if you've lost the activation code, you're screwed. You see, VirtualBox is seen by Windows as a new machine, so you'll be asked for activation. Your only chance are alternative methods *ahem*.

thanks for your comment. My big concern is whether your XP was a previously installed version on an NTFS drive? HOw did this work for you?

thanks for your comment. My big concern is whether your XP was a previously installed version on an NTFS drive? HOw did this work for you?

Yes, it's a previously installed version on NTFS.

First boot into Windows. There, run the MergeIDE utility as explained here. Then, create a new hardware profile (right-click on My Computer -> Properties -> Hardware tab -> Hardware profile), name the profiles Native and Virtualbox. Now boot into linux. Follow the VirtualBox User Manual to create a virtual machine with raw disk access and start it. When asked, select the VirtualBox profile. After logging in you'll be asked to activate. When Windows is activated and finishes loading, install VirtualBox Additions. You're done.

Now you can either boot into Windows natively or start it from VirtualBox, just select the appropriate hardware profile. If you boot natively, ignore the activation request, Windows will still work.

Unless you create a separate MBR for VirtualBox, you will need to give the VM access to the entire disk I think. Or at least to the partition where grub resides in addition to the windows partition. Then you need write access to anything VirtualBox needs, so add yourself to the 'disk' group.

To create a separate MBR, you will need a windows cd, preferably one with a recovery console.

Gusar,
Thanks for your help before. for some reason it works now...I have no idea what but I suspect it's because I logged off and on again. I'm back from vacation and that's why I've not responded in a while.
now all I have to figure out is how to get the fat32 E drive in my windows will play nice with my windows /dev/hda5 drive which I use as a share between the two.

Gusar,
Unfortunately, I do have to re-activate on my "native" hardware profile. I tried leaving it as you suggested, but I could not access the OS after 3 days. Is this what you observed as well?

Yes. Just boot from within Virtualbox and you'll be able to reactivate without giving the code. Now you have again 3 days in native. And after those 3 days, activate from Virtualbox again. It sucks, but it's workable. If you haven't reached your activation quota yet, you could also start doing it the other way around, have the main activation in native and do the 3 days thing in Virtualbox.

If it really annoys you, there's always alternative methods. Kinda ironic isn't it, that an anti-piracy measure could actually turn one into a pirate because of the annoyance factor.

Yes. Just boot from within Virtualbox and you'll be able to reactivate without giving the code. Now you have again 3 days in native. And after those 3 days, activate from Virtualbox again. It sucks, but it's workable. If you haven't reached your activation quota yet, you could also start doing it the other way around, have the main activation in native and do the 3 days thing in Virtualbox.

But we are not pirating. that's the problem... we don't even have the freedom to use our own OS with virualization?
How many "activations" are we allowed. I thought we were only allowed 3 activations.
So just out of curiosity, aren't hardware profiles supposed to take care of this stuff?
It looks like I'm going to have to go back to the "dual-boot" option at this point. *sigh* Does MS have any way of addressing this so that we are not asked to reactivate all the time?
thanks again for your help though. I did get it working... an accomplishment in itself for me

I saw this thread, and since I was hoping to do the same thing.. can you try something?

1) Backup the C:\Windows\System32\wpa.dbl file from a working dual-boot hardware profile;
2) Boot up the virtual machine and activate; then backup the working virtual machine wpa.dbl file to another place;

Then when you want to boot back into the hardware Windows, could you:

1) Shut down the VM
2) Restore/replace the wpa.dbl with the working hardware file
3) Boot into it..

And vice-versa for the VM version? I am curious if this will work; I was hoping someone could test it.. Thanks for trying!

IBJamon

P.S. If one is paranoid, I suppose you could ghost before trying this..

My windows install ended up crashing, so I took a different route and made VMs for just the work I was doing. Worked out better that way. I'm sorry I forgot to update.

Jamon/IBJamon (I forgot my old profile was here.. I wish I could combine them - Jamon was from 2002 though I prefer the name on the new one oh well)_________________Looking for a Linux PC? Check us out at
http://www.progresssystemsinc.com!

I get a black screen with a few ascii characters on random spots of the screen when it tries to boot XP. This is when it should display the Windows logo. There it just stops.

At first I thought that it is because I have the wrong HAL installed in Windows. So I reinstalled windows on top of the old install (Repair existing installation) in the Virtual world. The non graphical part of the installation goes fine, but after the reboot to the graphical part the same thing happens.

After that I just gave up for this Easter. Any ideas until I will start with it again next week?

Sounds familiar to me. I really wanted that to work since this is the only free box I have that has the cpu virtulization instructions. I would have done a clean install of XP without the raw disk access (leaving my bootable XP alone) but since the machine is a laptop with a 60GB hard drive it really does not have enough space for that._________________John