4/30/2009 Update: Now that the Windows 7 Release Candidate (RC) is available to MSDN / Technet Subscribers, and soon to the rest of the world, this post is starting to get a lot more traffic. The steps outlined in this article still apply to the RC, however you will need to substitute step #2 with the appropriate steps based on where you are downloading the RC from.
Yesterday we made the Windows 7 Beta available for public download. Hopefully you’re as excited as I am that the beta is here! The Windows 7 Beta is already getting some rave reviews for its new features, performance, and stability. But it is a beta, and with that comes the potential risk that some things may not work as well as they will in the final release.
If you have a spare test machine that supports the system requirements then I highly recommend installing the beta on your test machine. But if not, one way to mitigate the risks of using pre-release software is to use virtualization technology such as Microsoft Virtual PC 2007.
Creating a Windows 7 Beta 1 virtual image (aka virtual machine) is fairly similar to the process you would go through to install the Windows 7 Beta “on the metal” (non-virtualized). But for people who have never used Virtual PC before there are some differences.
Here is how to install the Windows 7 Beta with Virtual PC 2007.
1. Download and install Virtual PC 2007 SP1. If you already have Virtual PC 2007 installed, make sure you have SP1 by clicking on Help –> About and confirming that the version number is at least 22.214.171.124. If not, then you can follow the same link to upgrade to SP1.
2. Download the 32-bit edition of the Windows 7 Beta from here. The file is about 2.5GB, so while you are waiting for the download to finish it’s a good time to go whet your appetite by watching some Windows 7 preview videos here and here.
Note: It is important that you download the 32-bit edition of the Beta even if you’re running on 64-bit hardware since Virtual PC 2007 only supports 32-bit guest operating systems. If you want to try the 64-bit edition in a virtualized environment, then I suggest using Hyper-V to do so (if I get a chance I’ll write up a separate blog post for Hyper-V, as this article applies specifically to Virtual PC 2007).
Note 2: Be sure to record the Windows 7 Beta product key you are given since you’ll need this later.
3. Open Virtual PC (Start –> Programs –> Microsoft Virtual PC) and click New… to launch the New Virtual Machine Wizard. Click Next.
4. Ensure that “Create a virtual machine” is selected and click Next.
5. Provide a name and location for your virtual machine and click Next. I suggest saving this in the same location that you will create your VHD file (step 8).
6. The next dialog prompts you for the operating system you will be running. Since Virtual PC 2007 SP1 isn’t familiar with Windows 7, just select Windows Vista from this list. Click Next.
7. The next dialog asks you how much RAM you would like to assign to your virtual machine. This is always a balancing act to determine the right amount of RAM to allocate to your virtual machine and how much to allow your host operating system to utilize, but as a rule of thumb I suggest allocating 50% of your physical RAM to your virtual machine. For example, if you have 1GB of RAM in your computer, try assigning 512MB to the virtual machine. Click Next when you have allocated your RAM.
8. Select “A new virtual hard disk” and click Next.
9. Give your new virtual hard disk a name and location. I suggest using a location that has at least 16GB of disk space available. An external (e.g. USB2) hard drive works well for this purpose since it’s portable and it allows your computer to load balance disk IO between your system drive and the external drive. For “Virtual hard disk size” leave the default value and click Next when ready.
10. Click Finish.
11. Your Virtual PC Console should now have a new entry representing your new virtual machine. Highlight this entry and click Start.
12. Your virtual machine should now boot up and look for an operating system to boot to. Since you haven’t installed an operating system yet, it will eventually time out with the message below. It might take a minute or two to time out while it looks for a network device to boot off of, so be patient.
13. Now from the top of the Virtual PC 2007 window click on CD –> Capture ISO Image and select the Windows 7 beta ISO image you downloaded in step 2. It should be called 7000.0.081212-1400_client_en-us_Ultimate-GB1CULFRE_EN_DVD.iso. This will mount the ISO image as a DVD drive available to your virtual machine.
14. Now simply select your virtual machine and press <Enter>. If you’ve done everything right so far, then your virtual machine should now launch the Windows 7 Beta setup!
15. The first few screens should be self-explanatory. When asked what type of installation you want, be sure to choose “Custom (advanced)” since you are not upgrading from a prior version of Windows.
16. The rest of the setup steps should be fairly straightforward, so I won’t document them all here. But you may notice that Virtual PC “captures” your mouse when you click inside of the window and you won’t be able to move your cursor outside of the virtual machine. We’ll address this later (see “Virtual Machine Additions” below), but for now you can press the <right-ALT> key to release your mouse pointer. That’s the ALT key to the right of your space bar.
Enabling Networking: You will need to enable networking for your virtual machine in order to activate the Windows 7 Beta with the product key you received when you downloaded it in step 2. In order to enable networking, click Edit –> Settings –> Networking. If “Number of network adapters” is set to “0” then you’ll need to increase this value to “1” the next time you shut down your virtual machine since you can’t modify this value while your virtual machine is running. Next, select your physical network adapter from the “Adapter 1” drop-down. Click OK when finished. Your virtual machine should now be capable of using your network adapter.
Note: If you are completing these steps on your work machine, be sure to first check with your IT staff to determine if you’re allowed to enable networked virtual machines. Some companies have a policy against this to help protect against the risk of viruses. If you don’t activate the Windows 7 Beta you can still try it out, but it will stop working after 30 days.
Ctrl+Alt+Del to log in: When you get Windows 7 installed and it’s time to finally sign in it will expect you to send the usual Ctrl+Alt+Del characters to log in. But since you are running within Virtual PC, you will need to click Action –> Ctrl+Alt+Del in order to send this command to your guest virtual machine instead of your host operating system.
Virtual Machine Additions: After you log in for the first time I suggest installing the Virtual Machine Additions. This will allow your mouse to move in and out of the virtual machine without the need to press <right-Alt>, in addition to some other integration enhancements between your host and guest operating systems. To install virtual machine additions simply click Action –> Install or Update Virtual Machine Additions and follow the prompts. You will need to reboot in order for these changes to take effect.
Congratulations! You now have the Windows 7 Beta installed in a virtual machine using Virtual PC 2007. Remember that this won’t run quite as fast as Windows would run if you installed it into a non-virtual environment, but virtualization is a great way to try out pre-release software in a risk-free environment. I hope you have as much fun exploring Windows 7 as I have been. Bookmark http://www.microsoft.com/windows/windows-7/ for all of the latest news, and don’t forget to send us your feedback by clicking the icon on the desktop (you will need to have networking enabled in order for this to work).
Pingpack from: http://blogs.technet.com/alead_msft/archive/2009/01/13/how-to-run-windows-7-on-a-virtual-machine.aspx
Thanks for the step by step approach to installing Win7 on Virtual PC.
I would have been lost without it.
Hi thanks for that. It was great and well-explained. However, I can't go beyond step 14. Everything works fine but then it says 'the virtual machine could not be started because there is not enough memory on the host'. I looked for solutions but I couldn't find any that is helpful. I had nero and uninstalled it and also roxio but still the problem persists. Also, when I go to settings>memory on the virtual machine menu, I can NOT allocate more than 502 MB of RAM. My RAM is 1024MB (1GB) but it seems the virtual pc requires at least 512 MB but I can not allocate more than 502 although I have more than double of that (1024MB). Is there a way in which I can allocate 512 MB of RAM to the virtual PC? Any help is appreciated. Thanks in advance!
Allocating 50% of your physical RAM to your virtual machine is just a rule of thumb and isn't guaranteed to be the best setting for your machine. If 512MB doesn't work, try turning it down further - maybe 400MB or 450MB will do the trick. You'll just have to experiment (although keep in mind that the less RAM you have to allocate, the slower your virtual machine will run - it might be time to buy some more physical RAM).
Brian, I'm having the same problem as Chris (the "Expanding files" portion of the setup sitting at 0%). I've confirmed that all Virtual PC settings or other dialog boxes are closed. There does appear to be some activity (the elipses beside the percentage keep moving, but the percentage never goes up).
It's been running like this for at least 45 minutes now, after flying through the "Copying files" step very quickly.
Any suggestions? I'm running Virtual PC 2007 SP1 on a Windows XP Pro SP3 workstation. I have just over 1GB of memory allotted to the Windows 7 virtual machine out of a total of 3GB available.
The only other difference from your tutorial is that I'm running the install from a physical DVD instead of an .iso file. That shouldn't make a difference, should it?
Thanks for any help you can provide.
Interesting. No I wouldn't expect that running from the DVD as opposed to the ISO would make a difference, but I would try the following:
1) Reboot the virtual machine and see if you can get past this. (I would consider it frozen at this point, it definitely shouldn't take 45 mins)
2) Try running from the ISO as I did in my steps above instead of from a DVD.
Hope that helps!
If you’ve been missing these updates previously subscribe to MSDN Flash... If you have disconnected yourself
Brian, thank you, that was helpful. I tried 402 MB and t accepted. I now installed and everything is working fine. I thought if it doesn't accept 502 MB, it won't accept 402 but seems tat is now how wit works, It is a bit like trial by error where you will choose different value and see which one works. But thanks!
I can't connect to the internet. It says that the network adapter does not have a valid IP configuration. What can I do?
Please see my earlier response to Andi for some ideas. There are a myriad of things which can be causing networking issues so I'm afraid I probably won't be able to help you troubleshoot that one for you.
Brian, sorry for asking too many questions but I am back again. You remember earlier that after I adjusted the virtual ram to 402 everything worked? After I restarted my PC, now I am back to that same old story of 'not enough memory on the host'. But why did it accept and install in the first place and is now saying no memory? Everything was working fine and the pc was OK but now it is refusing again. I just want to ask you, the virtual PC doesn't allow me to allocate more than 502 MB, is there a way in which I can change? I want to allocate 512 so that it won't bother me. Is there a way in which I can do this? Bear in mind that at the moment it doesn't allow me allocating more than 502 MB of RAM and I don't know why.
Hi Brian, it worked again with 370 MB. Now this is funny. Does it mean that every time I have to try it with different amount of RAM to see if it will work?
I think you're interpreting the error message incorrectly. When it says you don't have enough memory available on the host, it means that you have allocated too much memory to your virtual machine. So if you try going higher (e.g. to 502MB) it won't work if your host only has (for example) 350MB free. The actual amount of memory you can allocate depends on how much memory your host computer has free. If you have other programs running, it will leave less memory to run a virtual machine. You might also have viruses, or programs with bugs that "leak" memory over time and don't re-allocate it. There are any number of potential causes for this problem. But I would really, really, suggest buying more memory if you plan to run a virtual machine for long. You essentially have to have enough memory to satisfy 2 computers running on the same machine, so it cuts your effective RAM in half.
Suprised how easy this was. It's been a while since I have done anything technical.
Great instructions! Running VPC under XP SP3 with 2GB of memory; 1 GB allocated to the image. Everything seems to be working fine.