Configuring Hyper-V Virtual Machines
|Previous||Table of Contents||Next|
|Creating Hyper-V Virtual Machines||Creating and Configuring Hyper-V Virtual Hard Disks (VHDs)|
Once a Hyper-V virtual machine has been created, there are a number of configuration options which may be modified to alter the behavior of the virtual machine. An overview of the virtual machine configuration options and details on how to change them are the topic of this chapter.
Accessing Hyper-V Virtual Machine Settings
Hyper-V virtual machine settings are accessed using the Hyper-V Manager tool which may be invoked by selecting Start->Administration Tools->Hyper-V Manager. Within the Hyper-V Manager tool, ensure that the manager is connected to the appropriate Hyper-V server, right click on the desired virtual machine from the list and select Settings... from the popup menu.
Once loaded, the settings dialog will appear as illustrated in the following figure:
Adding, Removing and Configuring Virtual Hardware Devices
One of the most satisfying aspects of virtualization is the ability to add new hardware devices to a virtual machine, without actually having to purchase and install the physical device. We are, of course, talking about virtual devices. If an additional disk drive is required by the guest operating system, all that needs to be done is to create a new virtual hard disk image file and assign it to the virtual machine. The same is true of virtual network adapters, disk controllers, COM ports and DVD drives.
New virtual hardware devices are added to a virtual machine by selecting the Add Hardware item in the hardware list located in the left hand panel of the settings dialog, selecting the type of device to be added from the list in the main panel and clicking Add. This will display the device settings page, where the device may be configured to meet the necessary requirements. Clicking Apply will commit the changes.
In the case of new virtual hard disks and DVD drives, the disk controller to which the disk is to be attached must first be selected, followed by the type of device from the main list. More detailed information about adding and configuring Hyper-V virtual hard disks can be found in the chapter entitled Creating and Configuring Hyper-V Virtual Hard Disks (VHDs). In terms of new DVD drive devices, the virtual drive may either be mapped to an existing physical device attached to the host system, or to a CD/DVD ISO image file residing on a host accessible file system.
Devices may be removed from a virtual machine by selecting the device from the hardware list so that the device settings are displayed in the main panel and clicking on the Remove button.
Virtual Machine BIOS Settings
Just like physical computer systems, a virtual machine has a Basic Input Output System (BIOS). As with physical computer systems, the virtual machine BIOS settings may be changed, although the range of options for a virtual machine is considerably narrower than those of a physical BIOS. In fact, the Hyper-V virtual machine BIOS settings are limited to selecting the device from which the guest operating system is to be loaded from when the virtual machine is powered on and choosing whether or not the Num Lock key is on by default:
To raise or lower a device in the boot sequence, select it and move it up and down using the two arrow buttons provided.
Virtual Machine Memory Settings
Virtual machines share the memory of the host system on which Hyper-V is running. This means that the amount of memory allocated to a virtual machine may be increased or reduced. This is achieved by selecting the Memory entry in the hardware list:
Any amount of memory may be specified between 8MB and 3069MB. When specifying large amounts of memory, it is important to be aware of the amount of physical memory in the host system and the needs of other virtual machines and applications.
Virtual Machine Processor and Resource Configuration
Virtual machine processor configuration is perhaps one of the more complex areas of configuration. Access to the processor configuration is gained by selecting the Processor item from the hardware list. The processor setting panel will subsequently appear as follows:
The Processor section of the settings panel allows the number of virtual processors or processor cores to be made available to the virtual machine to be configured. Note that this number will be limited by the number of physical processors or processor cores on the host system. It is not, for example, possible to allocate four virtual processors to a virtual machine running on a host with only two physical processors or processor cores.
The Resource Control section of the panel specifies how the physical resources are allocated to the virtual machine:
- Virtual Machine Reserve - The percentage of the resources of the physical CPU in the host system which are guaranteed to be available to the selected virtual machine.
- Virtual Machine Limit - The maximum percentage of the total resources of the host's physical CPU to be made available to a virtual machine.
- Relative weight - The weight of total physical CPU resources available to the virtual machine relative to all other virtual machines running on the same host. This setting is effective when virtual machines on the same host are in contention for physical CPU resources. Value may range from 1 to 10,000, with a higher value representing a greater share of available resources.
Finally, the Limit processor functionality check box prevents the virtual CPU from presenting CPUID code which is unacceptable to some older guest operating systems such as Windows NT. Unless problems are encountered running a guest operating system, however, it is probably best to leave this feature switched off.
Virtual Machine Management Settings
Beneath the list of hardware devices in the virtual machine settings page is a section entitled Management. This is essentially a "catch-all" section where a number of miscellaneous settings may be configured:
- Name - The name of the virtual machine. This option also allows notes about the virtual machine to be recorded.
- Integration Services - Indicates whether Hyper-V Integration Services are installed on the guest operating system and lists which services are currently enabled. Individual services may be disabled if required by deselecting the corresponding check boxes. More details on Hyper-V integration Services are provided in the Understanding and Installing Hyper-V Integration Services chapter of this book.
- Snapshot File Location - The location where virtual machine snapshot images will be stored.
- Automatic Start Action - Defines what action should be taken with regard to the virtual machine when the host system boots. Options include not starting the virtual machine, starting the virtual machine or only starting the virtual machine if it was running when the host last shut down. The option is also provided to delay the start up by a specified number of seconds. This avoids all virtual machines starting at the same time and allows critical virtual machines to start before less critical ones.
- Automatic Stop Action - Defines what action should be taken with regard to the virtual machine when the host system shuts down. Options include powering off the virtual machine, saving the virtual machine state and performing an orderly guest operating system shutdown. Note that the latter requires the installation of Hyper-V Integration Services on the guest and the Operating Shutdown Control option supported and enabled.