Difference between revisions of "Creating Hyper-V Virtual Machines"

From Virtuatopia
Jump to: navigation, search
(Configuring a Virtual Hard Disk)
(Configuring a Virtual Hard Disk)
Line 49: Line 49:
 
== Configuring a Virtual Hard Disk ==
 
== Configuring a Virtual Hard Disk ==
  
The guest operating system running in a virtual machine will typically require access to disk storage both to contain the system files and any user data. The first requirement is that the storage to be used by the virtual machine must be accessible to the host system. In terms of storage access, Hyper-V supports ''Direct Access Storage (DAS) drives including IDE, SATA, SCSI and SAS, and ''Storage Area Network'' standards such a fiber channel and iSCSI.
+
The guest operating system running in a virtual machine will typically require access to disk storage both to contain the system files and any user data. The first requirement is that the storage to be used by the virtual machine must be accessible to the host system. In terms of storage access, Hyper-V supports ''Direct Access Storage (DAS)'' drives including IDE, SATA, SCSI and SAS, and ''Storage Area Network'' standards such a fiber channel and iSCSI.
  
  

Revision as of 19:52, 12 January 2009

The key to virtualization is the ability to create virtual machines. As such, the objective of this chapter is to focus on the steps involved in creating virtual machines using Hyper-V and the Hyper-V Manager.




Launching the Hyper-V Manager

The first step in creating a new virtual machine is to launch the Hyper-V Manager tool. This can either be run directly on the Hyper-V hosts system, or on a remote system which network access to the host by selecting Start -> Administration Tools -> Hyper-V Manager.

If connecting from a remote system, it will be necessary to connect to the Hyper-V host from within the Hyper-V Manager before creating new virtual machines. This can be achieved by selecting the Action -> Connect to Server... menu option.

To begin the virtual machine creation process, ensure that the correct Hyper-V server is selected from the left hand panel and click on the New link in the Actions panel. From the resulting menu, select Virtual Machine... to invoke the New Virtual Machine Wizard.


Creating a Default Virtual Machine

The New Virtual Machine Wizard will work through a series of steps to define the new virtual machine. If, at any time, the Finish button is pressed, the wizard will create a new virtual machine using default values. This will create a virtual machine with 512MB of memory, one network adapter, one legacy network adapter, a CD drive and a virtual hard disk located in the default location on the host file system.

To configure a virtual machine to a specific specification, click Next to proceed to the Specify Name and Location screen.

Virtual Machine Name and Location

The Specify Name and Location screen provides the opportunity to define a name for the new virtual machine and specify the location where the configuration files will be stored. The location field is populated with the default location, although this may be changed to any location accessible to the host system by selecting the option to Store the virtual machine in a different location:


Configuring the name and location of a new Hyper-V virtual machine


It is important to keep in mind that the location specified here is solely for the configuration files and does not specify the location of any virtual disks which will be assigned to the virtual machine.

Once the information is complete, click Next to proceed to the memory configuration step.

Configuring Virtual Machine Memory

As the name suggests, the Assign Memory screen allows the amount of memory allocated to the virtual machine to be specified. The amount to allocate will depend on a number of factors including:

- The memory requirements of the guest operating system which will run inside the virtual machine.

- The amount of physical memory present in the host system.

- The requirements of other virtual machines which will run concurrently with the virtual machine currently being created.

Note that the amount of memory allocated at this stage may be modified at a later date is the selection made now proves to be problematic.

Once the memory allocation has been made, click Next to configure Networking.

Configuring Virtual Machine Networking

Virtual machines are assigned a network adapter which allows the guest operating system to connect to a virtual network. Virtual networks are configured outside of the virtual machine creation process and can be configured using the Virtual Network Manager... link in the Hyper-V Manager Actions panel. Virtual networks can be external (the virtual machine has access to the external network), internal (virtual machine can connect to other virtual machines on the physical host and also with the physical host itself, but not the external network) or private (communication only between virtual machines on the same physical host, no communication with physical host or external network). For an overview of virtual networks refer to the chapter entitled Understanding and Configuring Hyper-V Virtual Networks.

Either select a pre-existing virtual network from the drop down list, or select Not Connected if there is to be no network connection, or the connection is to be configured at a later time. Click Next to proceed to the hard drive configuration screen.

Configuring a Virtual Hard Disk

The guest operating system running in a virtual machine will typically require access to disk storage both to contain the system files and any user data. The first requirement is that the storage to be used by the virtual machine must be accessible to the host system. In terms of storage access, Hyper-V supports Direct Access Storage (DAS) drives including IDE, SATA, SCSI and SAS, and Storage Area Network standards such a fiber channel and iSCSI.


Specifying the Virtual Hard Disk for a Virtual Machine


Assuming that the storage is connected to the host system in some way, there are a number of choices as to how a virtual hard disk is made available to the virtual machine:

- New Virtual Hard Disk (VHD) - The virtual hard disk created as a file which resides on a storage volume which is accessible to the host server. Disks can be dynamic expanding (starts small and grows as space is required) or fixed in size. The maximum size of VHD is 2040GB.

- Existing Virtual Hard Disk (VHD) - A virtual machine can be configured to use a pre-existing disk image file.

- Passthrough disk - A passthrough disk assigns a physical disk drive to the virtual machine enabling the guest operating system to perform raw read and write actions on the disk. Hyper-V imposes no constraints on the size of a pass-through disk.

To configure a passthrough disk, select the option to Attach a virtual hard disk later.

Having selected the type of disk, and assuming that a pre-existing disk is not being used, select an appropriate disk size and click Next to continue.

Assigning a Passthrough Disk to a Virtual Machine

Virtual Machine Installation Options

Clearly, a virtual machine without a guest operating system is of little use. The next screen in the virtual machine creation process defines how the guest operating system is to be installed. Options provided are to install the operating system later, install from a physical CD or DVD drive, install from a floppy disk drive, install from an ISO image of a CD or DVD or to install from a network based server.

If the option to install from a physical CD/DVD drive is selected, the wizard will provide a list of physical devices attached to the host server. Be sure to select the device which will contain the operating system media.

Completing the Virtual Machine Creation Process

Once installation option has been selected, click Next to proceed to the summary screen. Review the information provided and click Finish to complete the installation process. Once the virtual machine is created, it may be started by double clicking on the corresponding name in the Hyper-V Manager Virtual Machines list. Once the Virtual Machine Connection dialog appears, click on the Start button to power on the machine.