Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Virtualization
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Virtualization
For questions on VMWare, VirtualBox, Xen, QEMU and other virtualization software.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old April 26th, 2008   #1
Sand Lee
Way Too Much Ubuntu
 
Sand Lee's Avatar
 
Join Date: Mar 2007
Location: Georgia, USA
Beans: 303
Ubuntu Studio 9.04 Jaunty Jackalope
..::Updates::..

HowTo for Vista 1,2
VBoxForums Version


Introduction
I made this tutorial because I have been searching for an open source virtualization solution. I've tried VMware, but didn't like the GUI (it felt too slow) and the fact that it was closed source. Virtualbox was more appealing because it is open source and because it doesn't currently require a hack to get running in Hardy. After tons of research, I've found that the solution couldn't be simpler.
Please read or skim the tutorial before attempting it. Note: This tutorial was tested to work with VBox 1.6 and may not work for users w/ SATA drives.



Step 1: Create a grub boot cd
Creating a grub cd will let you boot straight into your target Windows partition.
Following method adapted from grub manual.

Code:
 cd ; mkdir -p iso/boot/grub ; cp /usr/lib/grub/*-pc/stage2_eltorito /boot/grub/menu.lst iso/boot/grub
Configure /home/you/iso/boot/grub/menu.lst to boot your target partition. Remove the "savedefault" option from your target entry if it exists. Then run the following to create the grub.iso file,
Code:
cd ; mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso
Step 2: Create a virtual disk (.vmdk)
When creating such a disk, it's preferable to only specify your Windows partition. This is a safety precaution that will prevent a data corruption problem that results from booting into the currently running OS. As a preliminary step, you must add yourself to the disk and vboxusers groups,
Code:
sudo usermod -G disk,vboxusers -a `whoami`
Log out and log back in here... and edit the following command to point to your WinXP partition: (I specified my WinXP partition - /dev/sda2 - with "-partitions 2")
Code:
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WinHD.vmdk -rawdisk /dev/sda -partitions 2 -relative -register
Step 3: Create a new hardware profile in WinXP
  • Click Start > Control Panel > System
  • On the Hardware tab, select Hardware Profiles
  • Click Copy, name the new hardware profile Physical
  • Rename the current profile to Virtual
Step 4: Change Windows XP's IDE controller
  • On the Hardware tab, select Device Manager
  • Right-click the IDE Controller and click Update Driver
  • Click No,.. and Next
  • Click [Advanced] and Next
  • Click Don't search... and Next
  • Select Standard Dual channel PCI IDE controller
  • Click Next, Finish, then Close and Reboot into Linux
Step 5: Run VirtualBox
  • Realize that you may have to reactivate your copy of XP
  • Create a machine that uses the created .vmdk (in the drop-down menu of the HD selection section)
  • Have this machine boot the CD-ROM first and mount the grub.iso file
  • You may have to try between the two IDE controllers types (Settings/Advanced) to see which works for you
  • Enable the IO-ACPI option and run your VM!

Step 6: Bypass Windows Activation [Experimental]
  • Follow the directions in this post
  • Give your feedback here
    • I will remove or improve this section as a result

*** TroubleShooting ***
  • Disk read error: 1, 2

*** Warning! ***
About Guest Additions!

Note: This problem may not exist for later versions of VBox (post-1.6).
Installing Guest Additions may cause the Windows installation in an existing partition to be unbootable (natively) - you might only be able to boot it from VirtualBox from there on out. This is a result of VirtualBox changing a significant amount of hardware in your configuration in order to have a user friendly virtual machine. If you already have installed Guest additions, you can try to remove it from within VirtualBox, and rebooting natively to XP.


ToDo:
  1. Find fix for native booting problem DONE*
  2. Easy .vmdk creation that doesn't require installation of another large or closed source program. DONE*
  3. Creation of boot.iso for direct booting w/o system's grub DONE
  4. Port tutorial to Ubuntu community documentation and official VirtualBox page
  5. Find constant-activation fix NOPE (see update)
Sources & Helpful Links:
VBox-migr, squidoo-virt, mazimi-virt, mazimi-bypass, mesbalivernes-virt, Dutch Translation

Comments and suggestions welcome!
Attached Images
File Type: png 2 XP Boot.png (348.8 KB, 8192 views)
File Type: png 1 Profile Selection.png (499.2 KB, 648 views)
File Type: png 4 Hardware Profiles.png (477.3 KB, 762 views)
Attached Files
File Type: doc WindowsProductActivationTechnicalMarketBulletin.doc (154.0 KB, 302 views)

Last edited by Sand Lee; April 13th, 2009 at 02:07 AM.. Reason: Tutorial Revamp, Boot Fix, Step 6
Sand Lee is offline   Reply With Quote
 

Bookmarks

Tags
existing partition, physical, virtualbox, virtualize, windows

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:45 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry