Boot Camp Windows XP from VirtualBox

Discussions related to using VirtualBox on Mac OS X hosts.
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

I have figured out how to get my Windows XP installation on a Boot Camp partition to work with VirtualBox. I need to document how I did it though. I'll explain it here, but if anyone want to add, go ahead :)

It boots up logs in, and then freezes. Input would be greatly appreciated. Ideas should be shared around
SlaunchaMan
Posts: 65
Joined: 6. Apr 2009, 22:28
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Ubuntu 18.04
Location: Detroit, MI
Contact:

Re: Boot Camp Windows XP from VirtualBox

Post by SlaunchaMan »

Are you using NTFS or FAT for the volume? Did you use the VBoxManage internalcommands createrawvmdk command to create the VMDK?

I've tried that command to boot to my NTFS-based Boot Camp partition (running Vistax64) to no avail.
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Re: Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

I used ntfs and the VboxManage Commands. The trick is to use vmware (Trial) to create a boot camp VMDK that you merge with the Vbox VMDK. I'll write it up when i get home
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Re: Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

Here is what I have so far:
First Thing: Create a folder to work in. Call it what you like, just don't get the modified files confused with the originals


1. Download VMware Fusion Trial. You will probably need to get an account. Don't worry, it doesn't cost anything.

2. Install VmWare Fusion.

3. Launch it and have it create the Boot Camp virtual machine.

4. Navigate to ~/Library/Application Support/VMware Fusion/Virtual Machines/Boot Camp/%2Fdev%2Fdisk0/

5. Right click on "Boot Camp Partition" and select "Show Package Contents"

6. Copy the contents to your "work" folder.

7. Create a VMDK through "VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/disk0s3"

8. Open the "Boot Camp Partition.vmdk" file you got from VMware in Textedit.

9. Open the VMDK you just created with VirtualBox in Textedit.
I boot into the Windows partition directly to fix some things. It works fine if booted into. I'll continue the instructions when I get back the the Mac side. (I hate venturing into Windows, I much prefer Leopard :lol: )
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Re: Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

It's finished. Sorry the screenshots are so large.

Its in a pdf on my mobileme public folder. Here's the link

http://public.me.com/tlangs

(Is there any way I can post the file directly to the forum?)
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Re: Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

If someone does it, will they please tell me if it works
SlaunchaMan
Posts: 65
Joined: 6. Apr 2009, 22:28
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Ubuntu 18.04
Location: Detroit, MI
Contact:

Re: Boot Camp Windows XP from VirtualBox

Post by SlaunchaMan »

Could you send me those two text files you're working with in your example? I'd like to take a closer look at the differences between the two to see if I can write a script to automate this. My e-mail address is slauncha@umich.edu. Thanks!
SlaunchaMan
Posts: 65
Joined: 6. Apr 2009, 22:28
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Ubuntu 18.04
Location: Detroit, MI
Contact:

Re: Boot Camp Windows XP from VirtualBox

Post by SlaunchaMan »

OSX@Linux wrote:(Is there any way I can post the file directly to the forum?)
http://homepage.mac.com/tlangs/.Public/Boot%20Camp.pdf
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Re: Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

The PDF didn't format right, so i uploaded a Word file. You can view it in textedit i think
http://public.me.com/tlangs/
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Re: Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

I'll also load the .vmdk files, as well as the finished, as examples to the same folder
http://public.me.com/tlangs
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Re: Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

You may have to modify the permissions of /dev/disk0s1 and /dev/0s3(or whatever your windows partition is) using chmod to get it to load into Virtualbox. Also, make sure you unmount your Boot Camp partition before trying
phed
Posts: 11
Joined: 3. Mar 2009, 00:02
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP

Re: Boot Camp Windows XP from VirtualBox

Post by phed »

You may have to modify the permissions of /dev/disk0s1 and /dev/0s3(or whatever your windows partition is) using chmod to get it to load into Virtualbox. Also, make sure you unmount your Boot Camp partition before trying
Why need to modify /dev/disk0s1? What permissions need to changed?
When I use the VBoxManage internalcommands createrawvmdk, I got:
Error opening the raw disk '/dev/disk0s3': VERR_DEV_IO_ERROR
The raw disk vmdk file was not created
Any idea?

I used these two commands already:

sudo chgrp admin /dev/disk0s3
sudo chmod 660 /dev/disk0s3

Thanks!
Phed
OSX@Linux
Posts: 28
Joined: 13. Apr 2009, 01:37
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP
Location: San Diego, CA

Re: Boot Camp Windows XP from VirtualBox

Post by OSX@Linux »

Did you eject the boot camp partition? Also, running "sudo Virtualbox" may fix the problem. "disk0s1" is the partition that the boot loader is on, so Virtualbox needs to be able to read that too.
phed
Posts: 11
Joined: 3. Mar 2009, 00:02
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Windows XP

Re: Boot Camp Windows XP from VirtualBox

Post by phed »

Finally, I created the .vmdk.
When I tried to add it to VirtualBox, I got the following error
Could not open the hard disk 'User/Admin/Library/VirtualBox/VDI/raw-disk.vmdk'.
VD: error opening image file 'User/Admin/Library/VirtualBox/VDI/raw-disk.vmdk' (VERR_ACCESS_DENIED).


Result Code: NS_ERROR_FAILURE (0x80004005)
Component: HardDisk2
Interface: IHardDisk2 {ed6e2525-c2fd-42a4-917a-7a9045ac9e15}
Callee: IVirtualBox {339abca2-f47a-4302-87f5-7bc324e6bbde}
The ls for it is
-rw-rw-rw- 1 Admin admin 538 Apr 20 21:51 /Users/Admin/Library/VirtualBox/VDI/raw-disk.vmdk
This is how I created it
sudo VBoxManage internalcommands createrawvmdk -filename /User/Admin/Library/VirtualBox/VDI/raw-disk.vmdk -rawdisk /dev/disk0s3 -register
Any idea?

Thanks in advanced!
SlaunchaMan
Posts: 65
Joined: 6. Apr 2009, 22:28
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Ubuntu 18.04
Location: Detroit, MI
Contact:

Re: Boot Camp Windows XP from VirtualBox

Post by SlaunchaMan »

phed wrote:Finally, I created the .vmdk.
When I tried to add it to VirtualBox, I got the following error
Could not open the hard disk 'User/Admin/Library/VirtualBox/VDI/raw-disk.vmdk'.
VD: error opening image file 'User/Admin/Library/VirtualBox/VDI/raw-disk.vmdk' (VERR_ACCESS_DENIED).


Result Code: NS_ERROR_FAILURE (0x80004005)
Component: HardDisk2
Interface: IHardDisk2 {ed6e2525-c2fd-42a4-917a-7a9045ac9e15}
Callee: IVirtualBox {339abca2-f47a-4302-87f5-7bc324e6bbde}
The ls for it is
-rw-rw-rw- 1 Admin admin 538 Apr 20 21:51 /Users/Admin/Library/VirtualBox/VDI/raw-disk.vmdk
This is how I created it
sudo VBoxManage internalcommands createrawvmdk -filename /User/Admin/Library/VirtualBox/VDI/raw-disk.vmdk -rawdisk /dev/disk0s3 -register
Any idea?

Thanks in advanced!
You also need to change permissions for the device. It's probably /dev/disk0s3 or something like that; make sure you have read/write permissions to that device.

I've been trying to do this too; I got to the point where the VM starts, but then I get an error from inside the VM that says it can't read the disk. My Boot Camp partition is Windows Vista 64-bit in an NTFS partition, so I need to do some more investigation to see if I can get this working.
Post Reply