Windows xp virtual machine doesn't startup

Discussions about using Windows guests in VirtualBox.
Post Reply
melonbilly
Posts: 3
Joined: 7. Oct 2009, 11:34
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: windows xp

Windows xp virtual machine doesn't startup

Post by melonbilly »

I do the following steps for virtualize windows from an existing windows xp partition:

1 - create a backup of the partition where windows xp is installed (in this case sda1) with partimage -> windows.img
2 - create a virtual disk: VBoxManage convertfromraw windows.img windows.vdi
3 - create windows xp virtual machine and atatch the windows.vdi virtual disk
4 - startup windows xp virtual machine with the windows xp instalation cd mounted and go to the recovery console, execute command fixmbr

The virtual machine does'nt startup.

can anybody help?

Thanks in advance.
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

Re: Windows xp virtual machine doesn't startup

Post by Sasquatch »

You have to do the same steps as you would do if you cloned your installation to a new hard drive for in a totally different computer. Did you also check the P2V guide at the top of this forum?
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.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Windows xp virtual machine doesn't startup

Post by mpack »

Looking at the VBox source code, all that "convertfromraw" seems to do is create a VDI which is the same virtual size as the image file, then copy the data in. The data is not interpreted in any way, so you can't expect anything smart from it. That means that the image file is expected to a disk image (which is in fact what the manual says), and not a partition image.

If you apply "convertfromraw" to a partition image that would leave the first sector of the partition (the boot sector) in sector 0 of the disk, which is where the MBR is supposed to be, hence all that "fixmbr" will do is trash your boot sector!

In short: start with a disk image, not a partition image.
melonbilly
Posts: 3
Joined: 7. Oct 2009, 11:34
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: windows xp

Re: Windows xp virtual machine doesn't startup

Post by melonbilly »

This information is very helpful for me. Now i understand it's not posible to do what i'm trying to do.

I will just install the o.s. in the virtual machine with normal procedure because the complete image of this hard disk it's too large and there are other s.o. partitions i don´t want in the vdi.

Thank you.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Windows xp virtual machine doesn't startup

Post by mpack »

melonbilly wrote:I will just install the o.s. in the virtual machine with normal procedure
There's no need to abandon your idea completely, it just needs to be modified a bit to work.

The simplest way is to go ahead and install your guest from a normal CD, except you can stop as soon as the system partition is created (and this partition should be the same size as your image). Now boot up partimage from a rescue CD and restore your partition image over the first partition on your new guest. That should give you a working VM, provided you attend to other migration problems. Obviously the partition image will need to be available on a medium that the rescue CD can access: and without trying the partimage rescue CD myself I can't tell you what media it supports (eg. USB, network shared folder etc).
melonbilly
Posts: 3
Joined: 7. Oct 2009, 11:34
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: windows xp

Re: Windows xp virtual machine doesn't startup

Post by melonbilly »

Now i have the o.s. installed from cd in a virtual machine and i am able to do my work good enough. When i have the time to test this procedure i will try to backup/restore the full disk image. Thank you very much for the information.
Post Reply