Windows 8

Create a Client Hyper-V Virtual Machine for Windows XP

Learn how to create a virtual machine in Windows 8 Client Hyper-V specifically designed for Windows XP.

In a previous article, Get started with Windows 8 Client Hyper-V the right way, I reminded you that Microsoft is ending support for Windows XP SP3 on April 8th 2014. I then told you that if you are running a 64-bit version of Windows 8 Professional or Windows 8 Enterprise, you could use Client Hyper-V to run a virtual Windows XP machine inside of Windows 8. I then focused in on the steps for setting up Windows 8's Client Hyper-V.

Then, in the article Create a virtual switch in Windows 8 Client Hyper-V, I showed you how to create a virtual switch in order for your virtual machines to connect to your network and the Internet. As I did, I mentioned that once you have a virtual switch in place, you can create a virtual machine and in the process connect it to the virtual switch.

In this week's article, I'll show you how to create a virtual machine in Windows 8 Client Hyper-V designed for Windows XP. I'll then show you how to install Windows XP on your new virtual machine.

This article is also available as a TechRepublic Slideshow Gallery.

Changing the default folders

Before we get started with creating a virtual machine, I want to point out that I like to change the default folders in which Client Hyper-V stores its files in order to make it easier to have these files included in my regular backup. That way, if anything should happen to my hard disk, performing a restore operation will also return my virtual machines to their previous state.

By default, Hyper-V stores all the files and folders that make up a virtual machine in the C:\ProgramData\Microsoft\Windows\Hyper-V folder. It then stores the virtual hard disks in the C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks folder. I prefer to keep them all together in the Documents folder so that they are included in my regular backup. (Keep in mind that you may choose any location you wish or you can leave the default folders settings as they are.)

I created a folder called Hyper-V in the Documents folder and then inside of that folder, I created two subfolders called Virtual Machines and Virtual Hard Disks. I then configured Hyper-V to use those folders from within the Hyper-V Settings tool. Let's take a closer look.

With the folders in place, launch Hyper-V Manager, pull down the Action menu, and select Hyper-V Settings command, as shown in Figure A. (You'll notice that for the purpose of making my screen shots easier to read, I have disabled the Actions pane.)

Figure A

Fig A 7-12.png

From the Action menu, select the Hyper-V Settings command.

When the Hyper-V Settings window appears, you'll find that the Server section in the left pane contains items titled Virtual Hard Disks and Virtual Machines. When you select either of these items, you can then click the Browse button and change the location in which Client Hyper-V stores its files. As you can see in Figure B, using the Select Folder dialog box I have selected my new Virtual Hard Disks folder.

Figure B

Fig B 7-12.png

When you click the Browse button, you can use the Select Folder dialog box to choose where you want Client Hyper-V to store its files.

I then performed the same operation to change the default location in which Client Hyper-V stores the files for the virtual machines. As you can see in Figure C, Hyper-V will now store the Virtual Hard Disks and Virtual Machines files in my Documents\Hyper-V folder. To complete this part of the operation, just click OK.

Figure C

Fig C 7-12.png

I have changed the location where Client Hyper-V stores files for Virtual Hard Disks and Virtual Machines so that they are included in my regular backup.

New Virtual Machine Wizard

Creating a virtual machine is easy with the New Virtual Machine Wizard; to begin, pull down the Action menu and select the New | Virtual Machine command, as shown in Figure D.

Figure D

Fig D 7-12.png

To create virtual machine, select the New | Virtual Machine command.

When the first screen of the New Virtual Machine Wizard appears, as shown in Figure E, you'll discover that there are two ways that you can create a virtual machine. You can just click the Finish button and the New Virtual Machine Wizard will create a virtual machine that is configured with default values or you can work through the wizard and choose your own settings.

Figure E

Fig E 7-12.png

You can create a custom virtual machine or select a preconfigured one.

When creating a virtual machine for Windows XP for this article, we'll work through the wizard. Doing so will give you a good idea of what is involved in the procedure and will be helpful later on when you need to customize the virtual machine. To proceed, click the Next button.

On the screen titled Specify Name and Location, shown in Figure F, you'll give your machine a name. As you can see, for my example I have chosen to call the virtual machine Windows XP - VM. You'll also notice that the virtual machine will be created in the folder that I specified earlier. If you chose not to change the default location in the Hyper-V settings, you can do so here if you wish by selecting the check box, which will enable those controls. To continue, click the Next button.

Figure F

Fig F 7-12.png

When you create a custom virtual machine, you'll start by naming the computer.

On the screen titled Assign Memory, you'll specify the amount of memory that you want to dedicate to your virtual machine. As you can see in Figure G, I have highlighted the range of memory that Hyper-V will allow me to allocate to this virtual machine - between 8MB and 1804MB. To arrive at the upper value in this range, Hyper-V takes the total amount of memory on the host system (on my example system 4GB), calculates how much is currently in use, how much will be required by the host machine to run the virtual machine, and then sets the limit on how much you can assign to the virtual machine. As such, I chose to specify 1024MB in the Startup memory text box.

Figure G

Fig G 7-12.png

You'll specify the amount of memory that you want to designate to your virtual machine.

Even though the text box is titled Startup memory, in the case of the Windows XP operating system, this will be the total amount of available memory. In other words, it will essentially be static memory. Being an older operating system, Windows XP is not supported by Hyper-V's Dynamic Memory feature, so you'll leave that check box unselected

Moving ahead, you'll be prompted to link your virtual machine to the virtual switch that you created, as shown in Figure H. For now, you'll leave this setting at its default setting of Not Connected. In the case of Windows XP, some additional configuration is necessary when it comes to networking and we'll take care of that once we complete the wizard. So for now, just click Next.

Figure H

Fig H 7-12.png

You'll leave the Connection set at Not Connected for now.

On the screen titled Connect Virtual Hard Disk, you'll see that the wizard automatically fills in the Create a virtual hard disk section. As you can see in Figure I, the hard disk has the same name as the virtual machine, is saved in the folder that I specified, and is set to be 127GB in size. You can change the size if you wish. If you have an existing virtual hard disk that you want to use for your virtual machine, you can connect it now or later.

Figure I

Fig I 7-12.png

You can specify a new virtual hard disk now using the default settings or use an existing virtual hard disk.

On the Installation Options screen, shown in Figure J, you'll specify when and how you will install an operating system on the virtual machine. As you can see, I've selected to install the operating system from the DVD drive, but I could also choose to install from an ISO file, a bootable virtual floppy disk, or a network installation server. I can also choose to install the operating system later.

Figure J

Fig J 7-12.png

There are several ways that you can install the operating system on your virtual machine.

At this point you can click Next to go to a Summary screen or you can just click Finish. When the Wizard closes, you'll see your virtual machine in the Hyper-V Manager.

Configuring the network connection

As I mentioned, when it comes to networking Windows XP requires some additional configuration. This is because Windows XP is an old operating system and isn't capable of recognizing Hyper-V's default virtual network adapter. As such, you need to reconfigure the virtual network adapter.

To begin, make sure that your virtual machine is selected in the Hyper-V Manager. Then pull down the Action menu and select the Settings command, as shown in Figure K.

Figure K

Fig K 7-12.png

Make sure that your virtual machine is selected in the Hyper-V Manager and then select the Settings command from the Action menu.

When the Settings window appears, you'll see that there are a multitude of settings that you can configure to customize the hardware and management of your virtual machine. For the purposes of this article, I'll just cover the settings that you need to change to get your Windows XP virtual machine connected to the network.

Again, because Windows XP is an old operating system, it isn't capable of recognizing Hyper-V's default virtual network adapter. As such, you will need to select the Legacy Network Adapter item, as shown in Figure L, and click the Add button. This will create a virtual network adapter using a legacy configuration that Windows XP can recognize.

Figure L

Fig L 7-12.png

Windows XP requires a legacy network adapter.

When you click the Add button, Hyper V will add the Legacy Network Adapter to the Hardware list and immediately take you to that section. Since I already created a virtual switch, I'll select the Virtual Switch 1 from the drop down, as shown in Figure M. Then, click OK to save your changes and close the Settings window. If you haven't already set up a Virtual switch for the Network Adapter, you can do so at any time. (See my blog post, Create a virtual switch in Windows 8 Client Hyper-V.)

Figure M

Fig M 7-12.png

Once you specify the Legacy Network Adapter, you can connect it to your virtual switch.


Installing Windows XP

Installing Windows XP in a Hyper-V virtual machine is easy. To begin, make sure that your virtual machine is selected in the Hyper-V Manager and then insert the Windows XP CD in the optical drive. Next, pull down the Action menu and select the Connect command. When you do, you'll see a virtual machine window that tells you that the machine is turned off. At this point, just click the green Start button on the menu bar, as shown in Figure N.

Figure N

Fig N 7-12.png

To begin the Windows XP installation procedure, click the green start button.

In a moment, the Windows XP installation procedure will begin. Figure O shows the Welcome to Setup screen. Now, you'll follow through the steps to install Windows XP as you normally would.

Figure O

Fig O 7-12.png

You'll follow through the steps to install Windows XP as you normally would.

Once the installation is complete, you'll see the Windows XP desktop in a virtual machine in Windows 8, as shown in Figure P, and can begin using your virtual Windows XP system. In future articles, I'll cover some tips and tricks that will help you to get the most out of your virtual Windows XP system.

Figure P

Fig P 7-12.png

Windows XP running on a virtual machine in Windows 8 Professional.

What's your take?

Have you had a chance to experiment with Windows 8 Client Hyper-V yet? Will you install Windows XP in a Hyper-V virtual machine in Windows 8? As always, if you have comments or information to share about this topic, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

Also read:

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

24 comments
HugoDeGroot
HugoDeGroot

Windows XP Prof 32bit with SP3 works fine with the "Network Adapter" after install "Integration Services". If you install from cd, there is no need for the slow "Legacy Network Adapter".

dhamilt01
dhamilt01

This procedure creates a brand new install of Windows XP.  How can I use Client Hyper-V to do what you did in your similar article using VMWare? If possible, I want to run my very old XP system (both C: and D: drives) in a Client Hyper-V machine.


Thanks.

flintspike
flintspike

on figure A i only have the options "help" and "connect to a server"

Polymer
Polymer

Another question, can I transfer my XPmood virual drive from windows 7 pro to Windows 8 pro ?

Thanks.

jmertin
jmertin

I have followed the steps multiple times to a "T".

Get a boot failure. I see a DHCP.... that spins for 2 minutes then gives me an error . "PXE-E53: No boot filename received"

I am using the iso file I downloaded from Microsoft download website (it was an XP SP3 iso file)

g-bake10
g-bake10

has taken 4 attempts but finally have installed XP in hyper-v on a HP envy dv6 notebook.Have carried out all software upgrades.The problem I have now is it does not recognise the USB. thanks for your posts Gary

inertman
inertman

fine, except so far i've found that even installing hyper-v disables hdcp video streaming... from netflix, vudu and even my in house tv tuner...

not sure if i'm missing something, but i've had this issue since consumer preview on 3 different machines. 

JoeBlowCoLLP
JoeBlowCoLLP

You are strangely silent about the licensing question posed by marathonit, and you conveniently skipped that slide in your presentation. I too want to know if a valid XP license is required to run the Client Hyper-V Virtual Machine for Windows XP in W8. If a valid license is required this is really an exercise in futility since new licenses are hard to obtain (if possible at all) and without one the XP installation will expire soon after installation. What say you about the licensing issue?

JT8901
JT8901

The links in the article are bogus because there is a 4-digit number at the links' end.  A workaround is to click on the link and edit the number off, then hit enter.  Worked for me!

marathonit
marathonit

Windows 7 allowed the installation of "XP Mode" without a separate XP license.  I suppose that's not the case with Win 8?

If so, it's not likely that anyone will be able to source XP licenses now anyway.

marathonit
marathonit

I would like to see the original article too:  any chance you could provide a working link?  Tried googling it, got the same "Page not found"

midlantic
midlantic

Great! Thanks, I love the hyper-v power in Win 8 and have been using it for testing. We have some legacy apps that just will not run properly on Win 7 and, I am sure, Win 8 once we begin roll outs. I have been using XP Mode on the Win 7 boxes with great success but seeing how to get this running on Win 8 is a big help.

Mark W. Kaelin
Mark W. Kaelin moderator

Do you have legacy programs that require Windows XP? How do you plan to maintain those legacy requirements? Is virtualization going to be the primary tool?

Greg Shultz
Greg Shultz

@jmertin The XP SP3 ISO file that you downloaded is just the Service Pack, it's not the full Windows XP operating system. You need to have a Windows XP CD in order to perform this technique.

Greg Shultz
Greg Shultz

@inertman@msn.com I have seen this reported on the MS forum too. When you want to watch something have you tried disabling Hyper-V with the following command line:

bcdedit /set hypervisorlaunchtype off

and a reboot. To turn it back on:

bcdedit /set hypervisorlaunchtype on (or auto start)

and reboot.

Greg Shultz
Greg Shultz

@JoeBlowCoLLP I didn't mean to skip anything, but I did make the assumption that readers would understand that in all cases of installing a Windows operating system, a valid license is required.

I apologize for any confusion that my omission/assumption caused.

As you may know, the one exception to this rule was Windows XP Mode for Windows 7. But that was in actuality a special license agreement in that the operating system was a preinstalled configuration that only required you download and install the package. You did, however have to accept the license before you could download and install the package.

(If you are interested, you can check out the Windows XP Mode details here: http://windows.microsoft.com/en-us/windows7/install-and-use-windows-xp-mode-in-windows-7)

In the situation described in this article, I was assuming that someone would be installing Windows XP using an existing license--either installing Windows XP using a Volume License Key or transferring a Windows XP license from one system to another.

Keep in mind that you can only transfer a Retail license that you acquired by purchasing a Windows XP disc, not an OEM license that you acquired by purchasing a computer with Windows XP preinstalled. (An OEM license is specifically tied to that computer.)

You can investigate a PDF version of the Windows XP Professional license agreement (EULA)  that I found on Microsoft's Download page (http://download.microsoft.com/documents/useterms/Windows%20XP_Professional_English_9e8a2f82-c320-4301-869f-839a853868a1.pdf)

In Section 1 - Grant of License, you'll discover that is says "You may install, use, access, display and run one copy of the Product on a single computer, such as a workstation, terminal or other device ("Workstation Computer").

In Section 4 - Transfer, you 'll see that it says "You may move the Product to a different Workstation Computer. After the transfer, you must completely remove the Product from the former Workstation Computer."

In some cases, when you transfer Windows XP to another computer, Product Activation prompts you to call Microsoft for validation. In other cases, you can simply activate it online. Not sure why that happens in some cases...

Greg Shultz
Greg Shultz

@JT8901@Gmail.com This article was written before the site update and it would seem that the old style links, that include the for digits, don't work anymore.

I'll notify the TR staff and let them know.

Thanks!

Greg Shultz
Greg Shultz

@marathonit In the situation described in this article, I was assuming that someone would be installing Windows XP using an existing license--either installing Windows XP using a Volume License Key or transferring a Windows XP license from one system to another.

Please see the detailed explanation in the answer @JoeBlowCoLLP above.

Greg Shultz
Greg Shultz

@marathonit This article was written before the site update and it would seem that the old style internal  links, that include the for digits, don't work anymore.

Until this can be fixed, the workaround is to click the link and then go to the Address bar and remove the last 4 numbers. When you press [Enter], you'll be able to get to the article.

Greg Shultz
Greg Shultz

@techsmith@cox.net This article was written before the site update and it would seem that the old style internal  links, that include the for digits, don't work anymore.

Until this can be fixed, the workaround is to click the link and then go to the Address bar and remove the last 4 numbers. When you press [Enter], you'll be able to get to the article.

I'll be investigating the dual-boot of Windows 8 and XP with XP in a VHD for a future article.

jmertin
jmertin

@Greg Shultz @jmertin Thank you Greg. I ended up finding an old XP installation disc I had for an old Dell PC. Got the XP machine up and running, updated to SP2 and IE 8. :)

Is there another thread that talks about sharing files/folders between the Host and the VM?

I need to be able to save an output file in Excel 2003 in the XP VM to a location that a Win 8 app can access the data for further use.

Thanks again for these very helpful posts/tutorials and also for any further assistance you can provide.

Editor's Picks