Setting Up a Virtual Machine |
IntroductionA "Virtual Machine" is a computer inside a computer. This is done by creating a file that works like a real hard drive. You install the OS just as you would on a real machine. Note that many virtual machine programs support other operating systems such as Linux and OS/2. In this tutorial, we are dealing with the freeware program Microsoft Vitual PC 2007, which supports (what else) only Microsoft operating systems. See Wikipedia - Virtual machine for a list of virtual machine software. What can you do with a virtual machine? You can test different operating systems, download pre-configured VM files to run on your machine, test programs loaded with malware, then test cleaning programs to see how well they work. You can visit poison sites. You can set up several VM's and run them side by side. You can access files on your actual hard drive with the VM, as well as drag and drop any file out of the VM straight to your own desktop. You can save a VM on a DVD to run on other computers. VM's are dream machines, because no matter what you do, it doesn't actually affect your real computer. The entire thing is just a large file on your real hard drive. When you partition or format the VM, it's happening within that file, which, to the actual computer, is no different than changing text in a file. Your actual hard drive is never touched. Hardware RequirementsAs stated before, this tutorial is for the Microsoft Virtual PC 2007, which can be downloaded here. As you set up your virtual computer, you'll need to specify how much RAM the computer will use. When in operation, the VM reserves a chunk of your actual RAM to use as its own. Microsoft recommends a minimum of 128megs of RAM for a VM running XP, but keep in mind, many programs require more RAM, so you need to set the RAM as high as possible. It's good if you have at least 1gig of RAM on your computer, so you can allocate 512megs to the VM.
The VM will also be sharing processor power, so the more powerful the CPU, the better. Still, it's the RAM that's most critical, and will affect the performance most. The VM set up in this tutorial shows its hard drive as 63.9 gigs, with 62 gigs of Free Space. Don't believe it. The VM is actually the .vhd file, which only takes up about 1.4 gigs after a fresh install of XP. It will change size as more programs are added to the VM, but all those gigabytes of free space are parked in virtual reality. They don't exist until actually used. All the other hardware on your computer isn't important to the VM, which sets itself up as a full computer with its own hardware (virtual, of course). For example, once the VM is set up, you can open it's device manager (pictured at right) and see that the graphics card is listed as an S3 Trio, no matter what your actual graphics are. You never have to worry about drivers with the VM. Install the SoftwareDownload and install the Microsoft Vitual PC 2007. There are no hidden tricks here. Setup is fairly straightforward. Once installed, open the program, then follow the illustrated steps below to build your virtual PC. |
Build it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use the Machine
The screen shot below shows the Virtual Machine booting up just like a real PC. Follow the next steps carefully to begin your installation. ![]() |
Install the OS
You can also boot from an ISO image of an installation CD, by selecting to "Capture ISO Image..." instead, then browsing to the image when prompted. Note that if you move your cursor into the VM window and click, it may get stuck there. Press the right-hand ALT key on your keyboard to release the cursor back into the real-world computer. This little quirk will be fixed once the OS is installed. Also note, pressing the right-hand ALT and ENTER keys together will bring the VM to full screen mode, and back. It's best to leave the window in the smaller size for now. And once again note, if you need to reboot the VM, don't use the ALT + CTRL + DEL method. Press the right-hand ALT + DEL, or select the appropriate command from the "Action" tab at the top of the VM window. Your VM should now be booting from the CD or ISO, as shown below: ![]() |
|
The VM behaves just like a real computer. As shown below, you have the same options in partitioning and formatting the virtual hard drive as you would the real thing. Rest assured, you are not actually formatting any part of your real hard drive. All this takes place within the .vhd file.
|
|
Finish installing the operating system. We can then move on to tweaking the Virtual PC. |
Finishing TouchesWith the system now fully installed, there's still the problem of moving the cursor in and out of the VM window. The problem is, the VM still stands as a completely separate computer. We need to tie it in with the real world, so we can access the Internet and files on the host computer. Remove any CD's from your CD drive. At the top of the VM window, select the "Action" tab and "Install or Update Virtual Machine Additions." ![]() |
|
|
|
|
|
There are a couple of important settings you can adjust, though. |
|
Note: This setting assumes you are connected through an ethernet card. If the VM can't access the Internet with the NAT setting, try changing it to a different setting. Not all computers are the same, of course. |
|
|
|
The Virtual PC is now complete. Shown below, the VM cruises the Net. But keep going, we're not quite done yet.
|
|
Save State; Next time you start the VM, it will return to exactly the same state it was in when closed. It's like Standby. Shut Down Windows XP; this is the same as shutting down the system from the Start menu. The next time you activate the VM, it will boot from a cold start. Turn Off; This is the same as unplugging the computer. Any work you're doing could be lost. The next session will start with a normal boot. At least it won't try checking the disk for errors on the next boot. |
|
Congradulations! You should now have a fully operational Virtual PC with which to do all the things you dare not do on your real-world computer. As you get more accustomed to using the program, you can start experimenting with VMs imported from the Net, or you may want to try other Virtual PC programs. Now, go have fun. |
Return to Tutorials
|