Windows XP Mode for VirtualBox 4

Discussions related to using VirtualBox on Windows hosts.
Post Reply
EagleXK
Posts: 8
Joined: 4. May 2011, 08:17
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP, Win2000, Kubuntu

Windows XP Mode for VirtualBox 4

Post by EagleXK »

Greetings!
I tried a Windows XP Mode for Windows 7 and found that Windows Virtual PC doesn't allow to use any D3D applications, so I thought to move it to VirtualBox. I know that there are a VMLite - special virtual mashine based on VirtualBox 3.2.6, there also present a plugin for VirtualBox 3.2.6, but it is not working on current VirtualBox version (4.0.6). So I want to setup XP Mode manually. I tried to create a virtual mashine with Microsoft's Windows XP Mode on VirtualBox 4 and got error:
Failed to open hard disk g:\Work PC VirtualBox\XP Mode\Windows XP Mode.vhd. Parent medium with UUID {851e399f-90aa-e74b-9108-cd7d38634be6} of the medium g:\Work PC VirtualBox\XP Mode\Windows XP Mode.vhd is not found in the media registry C:\Users\Eagle/.VirtualBox\VirtualBox.xml
So I tried to fix image using VBoxFixHdd:

Code: Select all

VBoxFixHdd-Win.exe --filename "Windows XP Mode.vhd" --format VHD --zeroparentuuid
and got same error:
VBoxFixHdd-Win.exe: error: Cannot open the virtual disk image "Windows XP Mode.vhd": VERR_VD_INVALID_TYPE
Next I tried is to convert VHD to VDI:

Code: Select all

VBoxManage clonehd "Windows XP Mode.vhd" "XP Mode.vdi" --format VDI
and got error:
VBoxManage.exe: error: Parent medium with UUID {851e399f-90aa-e74b-9108-cd7d38634be6} of the medium 'g:\Work PC VirtualBox\XP Mode\Windows XP Mode.vhd' is not found in the media registry ('C:\Users\Eagle/.VirtualBox\VirtualBox.xml')
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component Medium, interface IMedium, callee IUnknown
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, pMedium.asOutParam())" at line 209 of file VBoxManageDisk.cpp
I was looking for the solutions in Google but found nothing that can help me... Does anyone know how to manage this? I will be very thankful!
slyt
Posts: 1
Joined: 4. May 2011, 09:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: XP SP3 Ubuntu

Re: Windows XP Mode for VirtualBox 4

Post by slyt »

Exactly the same path (activity and error codes) and situation to me. It is really to find (both VBforum and Google) any solution to this.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP Mode for VirtualBox 4

Post by mpack »

It's quite simple, and the error message in fact says it all: the VHD you imported into VirtualBox is incomplete, because it's a differencing image, a child of the master "XP Mode" VHD that Win7 uses. You need to produce a stand alone version of the XP Mode VM before you copy it around, or you need the parent image as well.
EagleXK
Posts: 8
Joined: 4. May 2011, 08:17
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP, Win2000, Kubuntu

Re: Windows XP Mode for VirtualBox 4

Post by EagleXK »

mpack wrote:It's quite simple, and the error message in fact says it all: the VHD you imported into VirtualBox is incomplete, because it's a differencing image, a child of the master "XP Mode" VHD that Win7 uses. You need to produce a stand alone version of the XP Mode VM before you copy it around, or you need the parent image as well.
It's strange - this image works fine under VPC.. but yes, the original image from Microsoft site converts as well. So thank you! :!:
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP Mode for VirtualBox 4

Post by mpack »

EagleXK wrote:It's strange - this image works fine under VPC..
Well of course - VPC (if by that you mean Win7 XP Mode) has access to the master VHD. VBox by default doesn't.
shpeka
Posts: 2
Joined: 6. May 2011, 14:48
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

Re: Windows XP Mode for VirtualBox 4

Post by shpeka »

EagleXK wrote:yes, the original image from Microsoft site converts as well.
Where you find original image? I tried convert base-file:

Code: Select all

C:\Program Files\Oracle\VirtualBox>nage clonehd "Windows XP Mode.vhd" "Windows XP Mode base.vhd" --format VDI
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 09e0afd9-e838-419a-9683-37a3be50c067
Then I run VM with this image, but it was found that system partition is corrupted.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP Mode for VirtualBox 4

Post by mpack »

shpeka wrote:I tried convert base-file:
You created a clone with a .vhd extension, but with the VDI format internally? Not good practice imho, though whether VBox cares I don't know.
shpeka
Posts: 2
Joined: 6. May 2011, 14:48
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

Re: Windows XP Mode for VirtualBox 4

Post by shpeka »

So, I found one way:
1. Convert file Windows XP Mode base.vhd to raw image:

Code: Select all

qemu-img.exe convert -f vpc "Windows XP Mode base.vhd" -O raw wxpmode.bin
2. Convert raw image to VDI-format:

Code: Select all

VBoxManage.exe convertfromraw wxpmode.bin wxpmode.vdi
Converting from raw image file="wxpmode.bin" to file="wxpmode.vdi"...
Creating dynamic image with size 136363130880 bytes (130047MB)...
Then just add converted file to virtualbox and run VM.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP Mode for VirtualBox 4

Post by mpack »

shpeka wrote:So, I found one way:
Your procedure seems pointless. It does convert the base VHD to another format... but VBox supports the VHD format directly and in any case there are much easier ways to do a direct VHD->VDI conversion (CloneVDI, VBoxManage), i.e. no messing with a raw image. Finally, it also doesn't make XP Mode differencing images usable in VBox, because the child image lacks links to the converted VDI you've created.
AzJazz
Posts: 15
Joined: 19. Aug 2011, 04:20
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP, ChromeOS

Re: Windows XP Mode for VirtualBox 4

Post by AzJazz »

mpack wrote:It's quite simple ... ... You need to produce a stand alone version of the XP Mode VM before you copy it around, or you need the parent image as well.
mpack (or anybody) - Can you please provide guidance on how to accomplish this? Even though I copied "Windows XP Mode base.vhd" and "Windows XP Mode.vhd" into the same directory, and added the "Windows XP Mode base.vhd" drive into the virtual hard drive manager, I still could not get the "Windows XP Mode.vhd" drive to get properly registered. I also saw the
Parent medium with UUID {851e399f-90aa-e74b-9108-cd7d38634be6} of the medium g:\Work PC VirtualBox\XP Mode\Windows XP Mode.vhd is not found in the media registry
type of error.

I've spent quite a few hours trying to get this to work, editing XML files, etc., with no luck at all yet.

Please help!

AzJazz
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP Mode for VirtualBox 4

Post by mpack »

I don't see why registering the base followed by the child failed, that is what I would have tried first. Next thing I would have tried is running Disk2VHD from inside the XP Mode VM (on the original Win7 host) with output to shared folder, creating a new merged VHD.

However, I should mention that I see the words "Work PC" in your file path, implying perhaps that there is some other PC involved that isn't the work PC. Note that if you attempt to move a Win7 XP mode VM to a different host PC, then it will need to be reactivated, and reactivation will fail.
AzJazz
Posts: 15
Joined: 19. Aug 2011, 04:20
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP, ChromeOS

Re: Windows XP Mode for VirtualBox 4

Post by AzJazz »

Hi, mpack - The Disk2VHD created within the MS Windows XP Mode VM did the trick. It generated a single VHD file, which I was eventually able to use for a working VirtualBox (actually, VMLite) Virtual Machine.

Thanks!

AzJazz
Post Reply