Import .VHD file

Discussions related to using VirtualBox on Windows hosts.
nics
Posts: 30
Joined: 17. Apr 2015, 14:49

Import .VHD file

Post by nics »

Thought it best to get advice here before I start, I've got XP Mode / Windows Virtual PC running smoothly under host Win7 Pro 64-bit.
Which version of VirtualBox should I install (v4.3.26?) and how do I import the .VHD file (13.5 GB) from Windows Virtual PC\Virtual Machines?
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: Import .VHD file

Post by mpack »

Import means something else, so best not use that word.

VirtualBox can use VHD format natively, so there's no need to import anything. You just create a new VM, and when it gets to the disk creation step you select "use existing" and select your VHD. The VHD needs to be stand alone (not a linked clone). In an ideal world you would move the VHD into the newly created VM folder before selecting it.

There are caveats: just because VirtualBox supports the VHD container format doesn't mean that anything that can be stored on a disk will run in a VM. In particular, AFAIK "Win7 XP mode" VMs only activate on the original Win7 host. The feature was a bait and switch to get XP users to switch to Win7, it was never intended to work into the indefinite future. Plus you need to make sure that the new VMs hardware is identical, which may be difficult because you are running the same OS image on two different makes of virtual PC.
nics
Posts: 30
Joined: 17. Apr 2015, 14:49

Re: Import .VHD file

Post by nics »

Thanks mpack, when I select the VHD file (under "use existing") I just receive the error pop-up 0x80004005:
Result Code: E_FAIL (0x80004005)
Component: Medium
Interface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}
Callee: IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

I'm sure I'm doing something wrong?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Import .VHD file

Post by loukingjr »

I think you need to re-read the last paragraph of mpack's reply. You may not be doing anything wrong at all.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
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: Import .VHD file

Post by mpack »

nics wrote:Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
Well, assuming you didn't make a basic mistake such as move the VHD after selecting it, I'm going to guess that "object not found" means that the VHD you have there is a difference image, i.e. a linked clone, and not a stand alone VHD. This was normal for XP mode - the template XP VM was tucked away in a folder.
nics
Posts: 30
Joined: 17. Apr 2015, 14:49

Re: Import .VHD file

Post by nics »

I selected the only .vhd file on my system:
C:\Users\larb\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines\Windows XP Mode.vhd (13,546,988 KB)
In the above folder there's another file - Windows XP Mode.vmc (15 KB), nothing else.

Would this be a compatibility issue? A great pity because VirtualBox is way better from all aspects.
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: Import .VHD file

Post by mpack »

No, it is not a compatibility issue, the issue is that you don't seem to have a valid VHD.

This is easily tested. Try cloning the VHD using CloneVDI. That will soon tell you if you have a stand alone VHD. It also eliminates VirtualBox VHD compatibility from the equation.
nics
Posts: 30
Joined: 17. Apr 2015, 14:49

Re: Import .VHD file

Post by nics »

Yr program confirms that the VHD is not valid, "Source is a difference image". That was the 13+ GB .vhd file.
As you mentioned yr program will not damage anything I decided to select the official .vhd file which is part of XP Mode/Windows Virtual PC, it is named "Windows XP Mode base.vhd" - 1,184,290 KB

That converted in a snap and VirtualBox does open it. A few steps followed w/o any input from my side, XP started and I have a small black screen but my mouse not available. I do not see anything else, no taskbar, start button, etc.

Seems a step forward, so close but so far. Naturally I would like to install some progs but I have no access.
Will this virtual XP also be validated/registered automatically?
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Import .VHD file

Post by BillG »

The question of validation/registration/activation (whichever you prefer to call it) was answered in the first reply to your original post. XP Mode is not supported on any device except the original Windows 7 machine on which it was installed. Microsoft regards the XP Mode installation as part of the Windows 7 OS and is covered by the Windows 7 license. It does not and cannot have a license of its own.

If you are hoping to see the XP installation in its final form, using the base VHD will be a disappointment, even if you get it to run. The base VHD is the image of the original installation of XP. That is why it is only about 1G.
Bill
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: Import .VHD file

Post by mpack »

If you put the base VHD and your diff-VHD into a single folder then CloneVDI should let you clone the diff-VHD to create a stand alone VDI clone. You can mount this in another VM, which will allow you to copy off any files you desperately need.

However, as already mentioned, AFAIK it still won't activate if you try to use the clone. Plus the XP mode tools all need to be uninstalled (i.e. the XP mode equivalent of VirtualBox's Guest Additions). These won't work on any other VM platform.

If all you want is an XP VM and don't care about accessing any files or apps, then you'd be better off buying an OEM XP license off eBay. Make sure it's not branded (Dell, HP etc - otherwise you'll have exactly the same problem with it), and not an upgrade disk or recovery CD.
nics
Posts: 30
Joined: 17. Apr 2015, 14:49

Re: Import .VHD file

Post by nics »

Thanks mpack for yr input, it made it clear where I stand. I've managed to get XP up and running (base VHD) within VirtualBox but it will be only for 30 days. I will have to purchase XP which is not worth it because it's not an essential.

I will have to go back to VMLite because it can install/run a legitimate activated WindowsXPMode_en-us.exe. The negative is that there is no support, their forum now filling with spam.

I appreciate the quick responses I received here.
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: Import .VHD file

Post by mpack »

AFAIK, VMLite can't run XP mode on the wrong host either. It's not a matter of which VM platform you use, it's a matter of what that XP image expects to see when it runs. Like any retail XP when it finds itself on the wrong "hardware", it wants to be reactivated. However MS has ensured that XP mode VMs have a CD key that will not activate on the wrong host.

All VMLite have is a standard VirtualBox XP VM, which they call XP mode. You can create that for yourself. I don't know where you are in the world, but I can buy a genuine OEM (not branded) XP install pack on eBay UK right now for about £25 (about $40). No doubt it's even cheaper on eBay US. Then you can create XP VMs forever.
nics
Posts: 30
Joined: 17. Apr 2015, 14:49

Re: Import .VHD file

Post by nics »

These are are the steps I used:
Run VMLiteWorkstationSetup.exe (66,645 KB)
Once done, 1st pop-up "Specify Package for VMLite Mode"
I select "Specify the path of the XP mode package or a virtual disk file"
and select WindowsXPMode_en-us.exe (481,051 KB)
I accept the MS license terms
Specify a password
Select preferred base memory size
MS ask/advise that I select automatic updates, I select "Not right now"
"Virtual Disk Initialization" happens
"Setting up VMLite XP Mode for first use..."
Done, VMLite with XP Pro on my monitor
I select Windows Update from the start menu
Before I can install any security updates MS request that I install x2 files which is to check if I'm running a legitimate setup, I accept, once MS satisfied I can select from x112 security updates, I install all, takes about 20 minutes
Then I start with optional security updates regarding .NET Framework - x21 files, a bit slower than the original x112
All done and I install my av & firewall
Install the latest Adobe Flash Player v17.0.0.134
XP running now IE 8 as the original package was IE 6, not too critical as I'll still install Firefox

All drivers etc. up to date and I can connect to all host partitions on my two hard drives.
I can make .vhd snapshots whenever required.
No 30-day issue, fully activated with the special key of XP Mode.

What can go wrong, plenty cause if I click anywhere wrong at any stage while using VMLite then I receive an error code that nobody can assist with :roll:
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: Import .VHD file

Post by mpack »

Well, I have to say that I don't understand how VMLite can do that legally, but I guess that isn't my problem. I bought an XP license to use in my VMs, so I don't have to worry about what Microsoft will do with XP mode.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Import .VHD file

Post by BillG »

I remember from a few years back, when this was a hot topic, that VMLite was touted as the best solution. I have no idea about the legality of it either.
Bill
Post Reply