Can you think of a better past time than to start working (or playing) with some upcoming beta software? OK, I can too, but it still beats most aspects of getting back to the daily grind. If you have already installed Hyper-V on a compatible machine, you can get started with creating and configuring new virtual machines (VMs). I'll present the steps required to configure the server and to create and import VMs.
Note: For more information on the architecture of Hyper-V, see my previous article, Inside Microsoft's Hyper-V Windows 2008 virtualization architecture and Microsoft Hyper-V virtualization: Installation and system requirements.
Also, all of the steps and screenshots in this tip are based on Windows Server 2008 RC1 Enterprise with Hyper-V Beta. You can download this build from Microsoft's Windows Server 2008 evaluation site.
Using the Hyper-V management tools
Hyper-V in Windows Server 2008 gets its own Microsoft Management Console (MMC)-based administration tools. If you have used Web-based configuration utilities in the past, this will probably be a very welcome change. To launch it, search for "Hyper-V" from the Start Menu or click on Hyper-V Manager in the administrative tools program group. The console will automatically connect to the local server instance. Figure 1 shows the primary Hyper-V Manager user interface.
Figure 1: Using the Hyper-V manager in Windows Server 2008
The display is divided into three sections: The left pane shows the server(s) to which you're connected, the right pane provides a list of context-sensitive actions, and the center pane lists virtual machines and they details. If you want to connect to a remote computer that is running Hyper-V, right-click on the Microsoft Hyper-V servers icon in the left pane and select "Connect To Server." Get used to this, as you'll be doing it a lot if you plan to deploy Hyper-V using the server core installation of Windows Server 2008.
Configuring the Hyper-V server
The first settings you'll want to configure are for the Hyper-V server itself. To do this, select the server in the left pane and select the "Hyper-V Server Settings" command in the "Actions" pane. The most important settings are related to the file system location in which you want to store virtual hard disks and where you want to store virtual machines. Both of these settings are default locations, and you can always change them when creating new virtual hard disksor VMs.
For most installations, that's all there is to it – the other settings can be modified to affect the user experience, but the default server configuration will work well for most deployments.
Creating virtual machines with Hyper-V
The Hyper-V manager includes a new virtual machine wizard which walks you through the steps of creating a new VM. To start the process, click "New" and select "Virtual Machine" in the "Actions" pane. The first step involves specifying the logical name of the VM and its physical file system path on the host. The next steps will allow you to specify details for the amount of physical memory that should be allotted and the networking options. The "Connect Virtual Hard Disk" step lets you specify whether you want to create a new VHD, if you want to select an existing VHD, or if you want to attach a VHD later (see Figure 2).
Figure 2: Configuring Virtual Hard Disk options when using the New Virtual Machine Wizard
The most common first step involved with creating a new VM is to install a guest OS. The "Installation Options" step simplifies the process by allowing you to automatically connect to an ISO or to the server's physical DVD drive (see Figure 3). If you have enabled networking features, you can also install from a network server using PXE-based booting.
Figure 3: Specifying installation options for a new virtual machine
The final step will summarize your selections. Click "Finish" to create the new VM and to (optional) start it. If you selected an installation option (and the appropriate media is available), the OS installation process will start automatically.
Configuring virtual machine settings
You can modify the settings of a VM by right-clicking on it in the Hyper-V manager and selecting "Settings." The left side of the interface includes the usual suspects, including disk, memory, network, and removable media options. For example, you can use the "Processor" section to determine how many virtual CPUs will be available to the VM and how CPU resources should be allocated (see Figure 4). Note that many of the options will be disabled if the virtual machine is running.
Figure 4: Configuring settings for a virtual machine
Other useful settings include options for automatically saving, starting, and shutting down the VM when the server is rebooted.
Importing virtual machines
As you might have guessed, Hyper-V supports the migration of virtual machines that were created in Microsoft Virtual Server 2005 and Microsoft Virtual PC. To get these VMs running, use the "Import Virtual Machines" command in the "Actions" pane. You can then browse to the folder that contains the virtual machine configuration (.vmc) file. Because saved state and undo disks cannot be migrated, you should be sure to completely shut down the VM and commit or discard changes before attempting to import it.
Also, keep in mind that this is intended to be a one-way process. If you plan to use the VM in Virtual Server 2005 or Virtual PC sometime in the future, be sure to make a copy of the VM's configuration and VHD files.
Working with virtual machines
The Hyper-V Manager includes a built-in method for connecting to and working with VMs. You can easily access the VM by double-clicking on it in the center pane or by right-clicking on it and choosing "Connect." Figure 5 shows the virtual machine connection tool in action. The toolbar and menus allow you to perform common operations such as starting and stopping the VM.
Figure 5: Using the virtual machine connection tool to manage a virtual machine
More to come
So far, I have only touched on the basics of working with Hyper-V. In a future tip, I'll describe details about virtual hard disk and virtual networking options, as well as new features such as the ability to create multiple snapshots of a VM. I'll also provide details on installing the appropriate version of the integration services components to improve VM performance. There's a lot left to cover, so stay tuned!
About the author: Anil Desai is a Microsoft MVP and a Microsoft Certified Professional with numerous credentials including MCITP, MCSE, MCSD, and MCDBA. He is the author or coauthor of nearly 20 technical books, including several study guides for Microsoft Certifications.