Moving your Windows installation to differrent machine (real -> virtual) may break your Windows Activation.
If you want to do it, you can try.
1. Backup you important files to somewhere else.
2. In Windows, configure your antivirus on-access scan, so that it will not start automatically at startup.
3. In Ubuntu, unmount windows partition
If some programs/daemons are using some files or directories in that partiton, close them first , then unmount the partition.
For example, let's assume Windows XP is in /dev/sda1.
You may also want to modify /etc/fstab, so that it will not be mounted automatically after reboot.
4. Create raw vmdk to access windows partition. VirtualBox OSE 1.5.6 cannot do this. Use the proprietary edition.
Make sure you have raw access to the disk device.
Code:
sudo chown username:disk /dev/sda
sudo chown username:disk /dev/sda1
Create raw vmdk, see VirtualBox manual for detailed explanation.
Code:
VBoxManage internalcommands createrawvmdk -filename /home/username/.VirtualBox/VDI/rawwin.vmdk -rawdisk /dev/sda -partitions 1 -relative
After vmdk creation complete, you don't need raw access to whole disk anymore. You still require raw read+write access to partition.
Code:
sudo chown root:disk /dev/sda
5. Create a virtual machine for your Windows.
Windows XP requires approximately at least 256MB RAM to run fast.
If the real machine that you install Windows on have ACPI + IO APIC, don't forget to enable them in virtual machine settings.
Assign your vmdk from step 2 as primary master.
6. Try booting the virtual machine.
Incompatible HAL can cause blank black screen at startup.
If it stops at Welcome screen, try using command "Insert Ctrl-Alt-Del" in VirtualBox's menu 2 times. When login dialog box comes, enter your username and password.
If you can login successfully, congratulation.
Staring windows for the first time will be slow because it discovers many new virtual hardwares. Windows XP does not have drivers for some virtual hardware.
7. Install guest additions and reboot virtual machine.
I don't know whether Windows Vista can survive hardware changes or not.
Bookmarks