Changes

Jump to: navigation, search

Creating Hyper-V Virtual Machines

3,148 bytes added, 18:43, 29 May 2016
m
Text replacement - "<google>BUY_HYPERV</google>" to "<htmlet>hyperv</htmlet>"
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="20%">[[Understanding and Configuring Hyper-V Virtual Networks|Previous]]<td align="center">[[Hyper-V Essentials|Table of Contents]]<td width="20%" align="right">[[Configuring Hyper-V Virtual Machines|Next]]</td>
<tr>
<td width="20%">Understanding and Configuring Hyper-V Virtual Networks<td align="center"><td width="20%" align="right">Configuring Hyper-V Virtual Machines</td>
</table>
<hr>
 
 
<htmlet>hyperv</htmlet>
 
 
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 host system, or on a remote system which with 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.
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 if the selection made now proves to be problematic. Once the memory allocation has been made, click ''Next'' to configure Networking.
== Configuring Virtual Machine Networking ==
== 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.
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 is 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.
 
Additional information about creating and configuring virtual hard disks can be found in the [[Creating and Configuring Hyper-V Virtual Hard Disks (VHDs)]].
== Assigning a Passthrough Disk to a Virtual Machine ==
 
As previously described, Hyper-V allows a entire physical disk to be allocated to a virtual machine. This configuration is also referred to a ''passthrough disk''. Unfortunately, the Hyper-V virtual machine creation wizard does not provide the option to configure a passthrough disk, leaving this configuration to be performed later. If a passthrough disk is required, select the option to ''Attach a virtual disk later'' on the wizard's ''Connect Virtual Hard Disk'' screen.
 
Once the remainder of the virtual machine creation process is completed, right click on the new virtual machine from the ''Virtual Machines'' list in the Hyper-V Manager main window and select ''Settings...''. The settings dialog for the selected virtual machine will appear containing a list of devices in the left hand panel. One of these devices will be IDE Controller 0. This was created by default and is intended to have the virtual disk attached to it. If a SCSI controller is required instead, select the ''Add Hardware'' option at the top of the device list, select ''SCSI Controller'' from the right hand panel and click on the ''Add'' button.
 
In order to add a physical passthrough disk to the virtual machine, select IDE controller 0 (or the SCSI controller if one was added), select ''Hard Disk'' from the right hand panel of the dialog and click the ''Add'' button as illustrated in the following figure:
 
 
[[Image:hyper-v_add_virtual_disk.jpg|Adding a new virtual disk to a hyper-V virtual machine]]
 
 
Once the ''Add'' button is pressed, the hard drive settings will appear. As illustrated in the following figure, the hard drive settings screen provides the option to create a Virtual Hard Disk (VHD) file, or to ''Assign a physical hard disk'', the latter being the option we need. At this point it is possible that this configuration option will be disabled. This is most likely because the disk in question is currently online. To take the disk offline, open the Server Manager for the host system and click on ''Storage -> Disk Management'' in the left hand panel. In the main panel, right click on the disk name in the graphical section of the view and select ''Offline'' from the menu.
 
Once the disk is offline, the ''Assign a physical hard disk'' option will be enabled. Select this option, choose the appropriate disk drive from the drop down list and click ''Apply'' to commit the change. The virtual machine has now been assigned a physical disk for its storage purposes.
== Virtual Machine Installation Options ==
== Completing the Virtual Machine Creation Process ==
Once installation option method 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.  <htmlet>hyperv</htmlet>

Navigation menu