Help: To avoid reinstalling Windows XP in VirtualBox VM ...

Discussions related to using VirtualBox on Linux hosts.
Post Reply
CoolBreeze
Posts: 2
Joined: 3. Feb 2009, 14:52

Help: To avoid reinstalling Windows XP in VirtualBox VM ...

Post by CoolBreeze »

There are there primary partitions and one extended partition on the hard disk in my laptop.

- The first primary partition is serving a Windows XP installation;
- The second is serving Ubuntu root file system;
- The third is its swap;
- There are four logic partitions in the extended partition.

I was annoyed by rebooting and swithing to another OS to work, so I need to leverage Virtualbox to run Windows XP virtual machine on Ubuntu. AND, I do hope to avoid reinstalling a Windows XP instance for that will waste my disk space.

I found many articles and discussion on the web, and I practised per the instructions, just as
- http://mesbalivernes.blogspot.com/2008/ ... sting.html

Unfortunately, I failed when trying to create a vmdk pointing to a raw disk. The error can also be found here: http://forums.virtualbox.org/viewtopic. ... sc&start=0

The command I use is :
VBoxManage internalcommands createrawvmdk -filename ./WinXP.vmdk -rawdisk /dev/sda -partitions 1 -mbr ./myBootRecord.mbr -relative -register
and the output :
VirtualBox Command Line Management Interface Version 2.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Overlapping partition description areas. Aborting
Error reading the partition information from '/dev/sda'
The raw disk vmdk file was not created


'fdisk -l /dev/sda' shows :
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x92fc5002

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1305 10482381 7 HPFS/NTFS
/dev/sda2 1306 2849 12402180 83 Linux
/dev/sda3 2850 3098 2000092+ 82 Linux swap / Solaris
/dev/sda4 3099 14593 92333587+ f W95 Ext'd (LBA)
/dev/sda5 3099 5460 18972702 b W95 FAT32
/dev/sda6 5461 8071 20972826 b W95 FAT32
/dev/sda7 8072 10682 20972826 b W95 FAT32
/dev/sda8 10683 14593 31415076 7 HPFS/NTFS

It's said that the reason is a bug in current version of VirtualBox (the version I'm using is 2.1.2), anybody could tell me whether there is a fix for it now? or other workarounds available ?

Thanks !! :oops:
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

There is a nice howto in the Windows Guests forum. It's a sticky. If you follow that guide, it should get you running happily with your physical install of Windows.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
CoolBreeze
Posts: 2
Joined: 3. Feb 2009, 14:52

Post by CoolBreeze »

Thank you, Sasquatch.

The howto you recommended is really amazing, but it seems the point of departure is doing that from scratch.

I just hope I needn't backup all the data on my hard disk and ajust the partitions per the best practice, and then reinstall Ubuntu and install Windows XP as guest (or as a host OS). Maybe too many troubles if we choose not to do it from scratch... :cry:
Post Reply