Create a Virtual Machine in Microsoft Hyper-V
If you have been in the IT field for any length of time you most likely have heard the term virtualization thrown around when talking with colleagues. What it boils down to is when you run computers within software that is running on another computer. For more details you can check out our article that explains how virtualization works.
There are many companies that provide virtualization platforms that allow you to create VMs (virtual machines) such as VMware with their vSphere and VMware Workstation products and Oracle with their VirtualBox product (which is free by the way). And of course you would expect Microsoft to get into the game with their Hyper-V software that runs on Windows servers and also on certain Windows 10 versions including the Enterprise, Professional, and Education editions.
The way you create a VM in Hyper-V is similar to the way you do it in the other virtualization platforms and we will walk you step by step through the process on how to get a VM up and running. Keep in mind the choices during the VM creation may differ between Hyper-V running on Windows 10 and running on Windows Server. Once you have your Hyper-V software configured all you need to do is the Hyper-V Manager and connect to your Hyper-V server if it’s not connected already. Then you can either right click on your server and choose New and then Virtual Machine or you can click on New under the Actions menu on the right side of the window and then choose Virtual Machine.
This will open up the New Virtual Machine Wizard and it will first ask you to name the VM and decide if you want to place the VM in the default folder location or choose a specific folder of your own. This comes in handy if you have a different drive other than the drive Hyper-V is installed on that you want to store your virtual machine files.
After clicking on Next you will need to choose a generation of VM to run. Choose Generation 1 if you are planning on using an older operating system or one that only supports 32 bit hardware. Choose Generation 2 for newer operating systems like Windows 10 and Windows Server 2016. Once you choose a generation then you are stuck with that so make sure it’s going to work with your VM otherwise you will be recreating it from scratch.
The next step involves assigning memory (RAM) to the virtual machine. The amount of memory to utilize will depend on what operating system you will be running and what you plan to do with that VM. One very important thing to remember is that the VM (or guest) uses resources from the host (your computer) so you can only utilize memory that you have physically available on your computer. So if your computer has 16GB of RAM installed you should not be allocating memory to VMs so that they take up more than the 16GB when running. If they are not running they are not using the memory so you can have 5 VMs with 8GB or RAM each if you like as long as they are all not running at the same time.
The Dynamic Memory option will allocate more memory to the VM as needed and the range of memory that can be used for this can be changed after the VM is configured.
Next you will need to assign the VM a network connection so it can communicate on the network with other VMs as well as connect to the Internet. Hyper-V will have a default switch that you can use or you can connect to other switches that have been preconfigured before setting up your VM.
The hard disk for your VM will be stored on your local hard drive unless you have some network or other shared storage where you can keep these files. The default option is to create a new virtual hard disk and you can change things like its name, storage location and size. If you have an existing virtual disk from another VM that you aren’t using then you can attach it to the VM and run it from there. Or you can skip this step and go back to it later but you will need to have some kind of storage attached to install your operating system.
In order to install an operating system on your VM you will need to connect it to some sort of installation media. You can do this after the VM is created or choose a bootable image file (ISO file) to mount and boot from. Of if you have an installation server on your network you can point the VM to the files there.
Finally you will see a summary page showing everything you have configured and if something doesn’t look right you can go back to the previous screens and make any changes before clicking on the Finish button.
After the VM is created it will show up under your Virtual Machines listing in the Hyper-V manager and from there you can either make changes to its configuration or start it up so that you can install an operating system and then start using the VM itself.