Creating and Managing a Virtual Machine
Ultimately, you deploy Hyper-V to host virtual machines, and in this section I walk
you through creating a basic virtual machine by using Hyper-V Manager and
PowerShell. Once the virtual machine is created, the next step is to deploy an
operating system to it. That typically means attaching to the virtual machine an ISO
containing an operating system installation or even booting the virtual machine over
the network by using a legacy network adapter for a generation 1 virtual machine, or
booting from the synthetic network adapter for a generation 2 virtual machine. This
type of virtual machine creation is manually intensive and time-consuming and is not
taking advantage of the fact that the virtual machine storage is essentially a file that
could just be copied, which is why using templates is a much better option and is
covered in a later section.
To create a virtual machine using Hyper-V Manager, perform the following steps:
1 . Select the New ➣ Virtual Machine action.
2 . Click Next on the introduction wizard screen.
3 . Enter a name for the new virtual machine and optionally an alternate path for the
virtual machine instead of the default location configured for the host. Click Next.
There is a difference in behavior if the option to store the virtual machine in a
different location is selected, even if the actual path is the same as the default.
When Store Virtual Machine In A Different Location is selected, a folder is created
under the specified location with the name of the new virtual machine, and that’s
where all of its files and virtual hard disks are created. Without this setting
enabled, the virtual machine configurations and disks are stored in the root of the
default location in a standard structure.
4 . Select the generation for the virtual machine. Remember, generation 2 virtual
machines work only on Hyper-V 2012 R2 and above, and only Windows Server
2012/Windows 8 64-bit and above is supported within the virtual machine. If you
need compatibility with versions of Hyper-V prior to Windows Server 2012 or, at
the time of this writing, Windows Azure IaaS, you should use generation 1. You
cannot change the generation of a virtual machine post creation. Click Next.
5 . Select the amount of startup memory for the virtual machine. Note that the default
value of 512 is insufficient for the latest generation of Windows client operating
systems, which require 1GB for 32-bit versions and 2GB for 64-bit versions.
Additionally, the option to use Dynamic Memory can be selected, and the values
can be tweaked post creation. Click Next.
6 . By default, virtual machines have a single network adapter, and the switch to
connect it to should be selected. Click Next.
7 . The virtual hard disk for the virtual machine is selected by default. This can be a