Running Windows 8 Using VirtualBox
HACK 07 Use Hyper-V to Install and Run Other Operating Systems Inside Windows 8
Have the need to run other versions of Windows—or even Linux—inside Windows 8? Here’s how to do it.
Figure 1-24.
The VirtualBox manager
Some people need to run multiple versions of Windows, including Windows Vista and Windows 7, either for testing purposes, for development, or just because they’re en-thusiasts. That used to mean buying and maintaining multiple computers.
If you’ve got Window 8 Pro or Windows 8 Enterprise, though, there’s a much better way—Hyper-V. This software lets you run virtual machines in Windows 8, each running their own operating system. Hyper-V works in much the same way as other virtualized environments (see Hack #06, “Installing and Running Windows 8 on a Mac”). For each instance of an operating system you want to test, you create a virtual machine into which you install the operating system, using either a physical disc or an .iso file.
Note: If you don’t have Windows 8 Pro or Windows 8 Enterprise, there’s still a way to run other operating systems inside Windows 8. Get the free VirtualBox soft-ware. For details about using it, see the VirtualBox section of Hack #06, “Installing and Running Windows 8 on a Mac”.
Hyper-V has some specific hardware requirements, so before getting started, get familiar with them:
Hyper-V only works on 64-bit versions of Windows 8 So if you’ve got a 32-bit version, you’re out of luck.
You need at least 4 GB of RAM
Also, keep in mind that more is better. When you run a VM, it uses system RAM, and Windows 8 is using system RAM as well. If you have more RAM, you can run more VMs simultaneously.
Your hardware must be 64-bit and support Second Level Address Translation (SLAT)
If you’ve got a relatively new machine, it probably supports this. But machines with older dual-core processors probably won’t cut it.
You won’t be able to connect to hardware attached to your PC
So you won’t, for example, be able to make use of a USB flash drive or other USB device.
If you’re not sure whether Hyper-V will work on your system, don’t fret, because when you try to install and use Hyper-V, it will tell you if it won’t work.
By default, Hyper-V isn’t enabled on Windows 8, so you’ve got to turn it on. Go to the Control Panel and select Programs→“Turn Windows features on or off.” You’ll see a screen like the one shown in Figure 1-25. Scroll to the Hyper-V section and turn on the checkbox next to it. Expand the category and make sure that all of the boxes under-neath it are turned on as well. Then click OK.
Note: If the box next to Hyper-V is grayed out, that means that your Windows 8 PC can’t run it.
Windows will spend a little while finding the files. You’ll be prompted to reboot Windows 8 in order to complete the installation. After you reboot, click the Hyper-V Manager tile that’s been added to the Start screen.
To create a new virtual machine, click the name of your Windows 8 device on the left side of the screen. Then, in the Actions panel on the right, select New→Virtual Machine, as shown in Figure 1-26.
Figure 1-25.
Enabling Hyper-V
Figure 1-26.
Starting to create a Virtual Machine
A wizard launches. Click Next. You’re asked to give your new VM a name (Figure 1-27).
Be as clear and descriptive as possible, because you might create multiple VMs and want to easily distinguish among them. At a minimum, it’s a good idea to include the version of the operating system, such as Windows 7.
Figure 1-27.
Naming your Virtual Machine
You’re also asked whether to use the default location for storing the VM’s file, which is C:\Program Data\Microsoft\Windows\Hyper-V. Generally, using the default is a good idea. However, if you’ve got a relatively small hard disk, you should consider storing the files on a different physical hard disk than your main one, because each VM uses a substantial amount of hard disk space, generally more than 25 GB.
Click Next after making your choice. On the next screen, you’re asked how much startup memory to use, and whether to use dynamic memory for the virtual machine.
Consider the requirements of the operating system you’re going to install, and use that amount. If you’ve got a lot of memory on your computer, turn on the box next to
“Use Dynamic Memory for this virtual machine.” Doing so allows Hyper-V to grow and shrink the amount of memory the VM uses. It’s an especially useful option if you’re going to run more than one VM at a time. Click Next.
Now you’ll come to a screen that lets you configure networking for the VM. At first it appears there’s no way to do this, because in the Connection drop-down box, there’s only one choice: Not Connected. You’ll need to create a virtual switch in order to con-nect to a network and the Internet. Back on the Hyper-V Manager main screen, click Virtual Switch Manager at right. On the next screen, select External, and then click Create Virtual Switch. On the screen that appears, give it a name if you want (Figure 1-28). If you’ve got more than one network adapter, select it from the drop-down list. Click OK when you’re done.
Figure 1-28.
Creating a virtual switch to enable networking
Once you’ve done that, go back to the wizard, select the new network connection from the drop-down list, and then click Next. On the screen that appears, you’ll create a virtual hard disk in which to run your operating system. Again, check the operating system you’re installing to find out installation requirements. Generally, if you’re going to install Windows 7, you’ll do fine with the default size of 127 GB. Click Next.
Note: You’ll need to have a registered version of Windows to run it on Hyper-V. It can’t have the same registration code as the version you run on your PC, unless you have the rights to run it on multiple devices.
On the next screen, you tell the wizard where to find the installation media for the operating system, such as a disc or .iso file. Make your selection, and you’re ready to run your new VM. You’ll go through the normal operating system installation process the first time you run it, but after then, you won’t need to run the installation process each time.
To run a VM, launch the Hyper-V Manager and run it from there.