Howto: Windows XP in both VM and native - DISCUSSION

Discussions about using Windows guests in VirtualBox.
Post Reply
pacut
Posts: 16
Joined: 29. Dec 2008, 20:27

Post by pacut »

More in detail: USB 2.0 puts XP on halt. Standard USB (no 2.0) doesn't.
I could accept USB 1.0, though, any USB device is shown as "not connected" and I wonder why.

Do any of you have any idea about the hell can be ?

Thanks
Paolo
pacut
Posts: 16
Joined: 29. Dec 2008, 20:27

Post by pacut »

This helped me.
I'd say these instruction should be put into the main procedure described here
http://www.ailano.net/tag/virtualbox

It's in Italian but should be easy to understand anyway.

With my system there was an error about devgid parameter, which was set up incorrectly.

It's done now. I have my running XP !

THANKS guys !
Well done.
Paolo :wink:
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Or in English translation, but in a nutshell what this says is that you need to place the usbfs in the vboxusers group and enable group rw access, and that way the VMM can control USB devices. You can then mount the usbfs for use with VirtualBox in /etc/init.d/mountkernfs.sh.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
pacut
Posts: 16
Joined: 29. Dec 2008, 20:27

Post by pacut »

TerryE wrote:you need to place the usbfs in the vboxusers group .
?!?!? Non very clear to me. Placing usbfs in the vboxusers ? I put login name into vboxusers + i have made Linux mounting usbfs in /etc/init.d/mountkernfs.sh

Can you pls better explain ?

Maybe I am missing something yet, which makes me possible to access USB resources under USB 1.0 and NOT under USB 2.0 as in fact system hangs when I enable USB 2.0 under VB profile for my VM


Thanks
Paolo
poplin
Posts: 2
Joined: 6. Feb 2009, 06:57

SATA + lilo problem.

Post by poplin »

Thanks guys for the help provided along the tutorial + discussion. This made me able to install everything smoothly in both a desktop and a laptop using IDE drives. But the problem arose when I've tried to do the same in a laptop with a SATA drive.

My laptop is a Lenovo x61s running slack 12.2 (lilo 22.8 ). When I installed xp (tried both IDE or SATA through f6) inside the VM, following the tutorial (hardware profiles, with and without MergeIDE), it worked flawlessly but when I tried to boot it natively the computer freeze (black screen showing lilo message: Loading winxp...) and that's all. Besides, I also installed xp natively, and in this way I was able to boot it (through lilo) but not on the VM.

As I said, I followed all the steps in the tutorial in the same way that I did with other 2 computers. I googled and I couldn't find so much. Has anyone experienced this?. Does anyone know if it is possible to solve it?. Please let me know if you need any information that you think could help.

Thanks in advance.

Diego.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

I confess that I just put my SATA drive into IDE compatibility mode when dicking around with dual boot + VM boot Ubuntu + XP. I just haven't had the bandwidth to get to grips with this one. Vkov is no longer able to support this. Perhaps some other king expert can help.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Post by vbox4me2 »

Read this and verify the sata drivers are in the proper location.
With this I have never ever had any problems switching between and using both ide and sata, real or vm.
poplin
Posts: 2
Joined: 6. Feb 2009, 06:57

Post by poplin »

Thanks TerryE and vbox4me2.

I followed the link posted by vbox4me2, it made possible to boot from VM using SATA (I have already succeeded doing so) but it didn't solve my problem (native is not booting). I'm tempted to give a try to grub, since I think most of you are using it and the problem seems to appear when lilo is passing the control to winxp.

Any other advice will be very welcome.

Thanks again.

Diego.
Last edited by poplin on 13. Feb 2009, 19:10, edited 1 time in total.
milosDS
Posts: 1
Joined: 13. Feb 2009, 13:34

Post by milosDS »

Hi,

I have followed the exact instructions from the howto, (almost) everything went fine but there is one big show stopper for me: keyboard, mouse and touchpad don't work when running Windows on native hardware. I have disabled automatic logins and inserted Windows CD into drive as said in howto, but this did not help - nothing shows on the screen except the login form (I was expecting "new hardware was found" pop-ups or something) and I'm still unable to type anything, the only keyboard button that works is the power switcher. Connected USB devices doesn't seem to be powered (all LEDs are turned off).

I'm using Asus F3SG notebook with usb mouse, I'm sure that proper drivers are on Windows CD because keyboard and mouse worked fine when I was doing standard installation. Keyboard and mouse also work inside virtual machine. In step IV - 4 (Disable any VirtualBox related hardware using Device Manager) I was eperimenting with different settigns, like uninstalling current keyboard and mouse drivers, but it did not make any difference. I also thought that guest additions might be responisble for my issue so I have done everything from the beginning but without installing them.

Do you have any clues what else could be done to make keyboard and usb devices work on native hardware?

And btw, here are two problems with solutions that I ecouraged but haven't found in this guide:
- to repair hang on drvmain.sdb issue when starting windows on native hardware: boot virtual machine from windows CD and go to repair console. Type "fixboot"
- to repair blue screen of death while booting from virtual machine: boot virtual machine from windows cd and go to repair console. Type: "disable intelppm"
kai4785
Posts: 8
Joined: 20. Dec 2008, 03:24

Native boot won't chainload from grub

Post by kai4785 »

I've done the following to create my VM.

Added myself to the 'disk' group. I'll probably switch to doing a sudo for another user later.

I have two drives in my system, so I used the entire /dev/sdb drive for the install. Fdisk looks like this:

Code: Select all

[kai@gamer ~]$ fdisk -l /dev/sdb

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0006a252

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       24320   195350368+   7  HPFS/NTFS
grub looks like this:

Code: Select all

title Fedora (2.6.27.12-170.2.5.fc10.x86_64)
	root (hd0,0)
	kernel /vmlinuz-2.6.27.12-170.2.5.fc10.x86_64 ro root=UUID=41175868-a857-4307-877e-c87d99bbabde 
	initrd /initrd-2.6.27.12-170.2.5.fc10.x86_64.img
title Windows XP
	rootnoverify (hd1,0)
        chainloader +1
title Windows XP remaped
        map (hd0) (hd1)
        map (hd1) (hd0)
	rootnoverify (hd0,0)
        chainloader +1
A note about the grub configuration mentioned by vkov_tinsky:
http://forums.virtualbox.org/viewtopic. ... 2865#42865
I found that 'map (hd0, hd1) would give me a 'syntax' error in grub. You know the "unrecognized string" error. But no matter, in either the case where I'm trying to map (i even tried to map partitions like 'map (hd0,0) (hd1,0)'), I get the same

Code: Select all

Grub Error 13: "Invalid or unsupported executable format" 
error. This seems to be the error you get when the chainloader fails to hand off to another boot loader. I dunno....

Any ideas?
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Have you read the caveats on this in the grub documentation? (See http://www.linuxselfhelp.com/gnu/grub/h ... html#SEC21). I don't think that this will work for XP. You handle the drive letter assignment in XP through the Computer Services->Disk management interface which allows you to remap the assignment of drive letters to physical partitions.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
kai4785
Posts: 8
Joined: 20. Dec 2008, 03:24

Figured it out

Post by kai4785 »

Alright, I'm not exactly sure what the chain of events were, but at one point, I could boot the VM but not native because of the grub error. Then when I tried to skip grub and switch the boot order of thed isks in my bios, I still couldn't get Native to boot, and the BIOS said that it couldn't find a valid OS. So I went back to teh VM and it gave the same error in VirtualBox as it did in my OS. So I googled around a bit and found a microsoft article that let me download 6 floppy images that would allow me to run the recovery console, which I did, and was able to run 'fixboot' which solved all my problems!

Yay, I'm posting this from the Native install after I've set up the video and network drivers for my PC. I'm very very happy!

-Kai Meyer
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

You can just stick you XP media into the CD and boot in recovery mode from that. You didn't need to load floppies. But the problem with this is that you have lost the ability to dual boot from XP and Linux. I really don't understand why you need swap hard disks in the first place. Why are you trying to do this? You don't need to.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
urnew
Posts: 9
Joined: 1. Apr 2009, 01:30
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: XP x86

Re: Howto: Windows XP in both VM and native - DISCUSSION

Post by urnew »

Hi!
Following the tutorial when I try to start Virtualbox as the disk user 'rawvb' I get (I try to create the vmdk file first and then create a virtual machine, in which I want to add the vmdk raw file):

Code: Select all

sudo -u rawvb /usr/bin/VirtualBox
No protocol specified
Qt WARNING: VirtualBox: cannot connect to X server :0.0
I use Debian Lenny/Sid and Virtualbox 2.2 (non-OSE) from the VirtualBox homepage.
When I try to add the raw vmdk file to the Virtual machine as myself, it complains about permissions.
I have a SATA disk (sda) and an IDE (hda) and I want to install XPSP3 on /dev/sda2 (Lenny is on /dev/sda1).

Code: Select all

fdisk -l

Disk /dev/sda: 320.0 GB, 320071851520 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x33013301

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       24426   196201813+  83  Linux
/dev/sda2   *       24427       38913   116366827+   b  W95 FAT32

Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xdf67ef2a

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         200     1606468+  82  Linux swap / Solaris
/dev/hda2   *         201         398     1590435    7  HPFS/NTFS
/dev/hda3             399       14946   116856810   83  Linux
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Re: Howto: Windows XP in both VM and native - DISCUSSION

Post by TerryE »

The X issue is due to authorisations and permissions. All child processes of the desktop manager inherit an environment variable which contains an authorisation cookie to allow the process to be a client to the X service. Without this cookie, you will get the permissions issue that you mention. IIRC, this is discussed in the tutorial or the discussion an the howto on getting around this.

The second issue is because you need to be in the disk group to directly access the HDD and this is what the rawb account it for. You need to add this to this disk group, and once you have set up the correct X authorizations, then the sudo -u rawvb /usr/bin/VirtualBox should work fine.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Post Reply