How to Create a New Virtual Machine in Hyper-V Manager

In this article, we will examine how to install a new virtual machine and configure its settings using the Hyper-V virtualization software on the Windows 10 64 Bit operating system.

How to Create a New Virtual Machine in Hyper-V Manager

How to Install a New Virtual Machine on Windows 10 or Windows 11 Using Hyper-V

Hyper-V is a free virtualization program developed by Microsoft that comes built into Windows 8, 8.1, and 10 operating systems. This virtual PC program has been designed for home users’ plans and the Windows Server family used by businesses.

Using Microsoft Hyper-V software, you can create VMs on your physical host computer and use them as a real computer.

This software supports the hardware virtualization feature and allows to use of the hardware resources of the host device in virtual machines thanks to the Hypervisor system.

Hyper-V is widely used in companies’ computing departments to save hardware costs and provide faster solutions. When installed on a Windows server, this virtualization tool eliminates the need for multiple physical servers. It facilitates the management of services in LAN and WAN networks by enabling multitasking to be managed on a single virtual server.

How to Set Up a Virtual Machine

Suppose you have a computer that supports virtualization. In that case, you can use both Hyper-V and VMware, VirtualBox, or Fusion to create a virtual PC that shares the hardware resources of your host device and install an operating system supported by virtualization software on it.

When preparing a new virtual machine using Hyper-V, you must determine the hardware-software type of the operating system you will install because you cannot change the Firmware type from UEFI to BIOS or BIOS after preparing the VM.

After learning from this article whether your computer supports the virtualization feature, install Hyper-V on your operating system and then run it.

Step 1

After running the HyperV Client software, click Action / New / Virtual Machine from the tool menu to open the VM wizard. You can also open this wizard from the quick access panel on the right side of the program.

Opening the Virtual Machine Wizard

Step 2

When the Virtual PC wizard opens, you will be greeted with the Before You Begin window. In this window, you can create a new VM with the default settings by clicking the Finish button or manually create a VM by clicking the Next button.

If you don’t want to display this window when you open the VM wizard later, you can check the option Do not show this page again.

Click the Next button to create a more detailed and professional VM.

Virtual Computer Wizard

Step 3

In the Specify Name and Location window, type the name of the operating system you will install in the Name field. You can also choose a different location to avoid the VM being backed up on the storage area of your host disk.

If you use an SSD or NVMe-based disk on your host computer and only use a single virtual machine, you can install it on your host disk. Backing up the VM to an external SSD storage device is beneficial for performance at this step, as the read and write speeds of the disk are pretty slow on computers with older hardware.

After selecting the Store the virtual machine in a different location option, select a folder on your portable disk via the Browse button and click Next to continue.

Configuring the Name and Installation Location of the Virtual PC

Step 4

If you install a newer 64 Bit based distribution of Windows, you must select Generation 2 in the Specify Generation window. Generation 2 is the preferred type in terms of both security and performance.

  • Generation 1: It supports both 32-bit and 64-bit based systems and includes BIOS firmware.
  • Generation 2: It only supports 64 Bit based systems and includes UEFI firmware.

Generation Selection

Step 5

In the Assign Memory window, you need to set a RAM size according to the RAM capacity of your host for the operating system to run on the guest machine. For example, for Windows 10 system, when you type 4096 MB (4 GB) instead of the default size in the Startup Memory field, the guest system will run with 4 GB RAM.

By activating the Dynamic Memory feature in this window, you can automatically increase the RAM size from the host resources when the guest system needs more RAM than the Startup RAM size.

When you configure the maximum size of 8 GB in the RAM settings of the virtual machine, when the guest system needs more RAM, the RAM of your host computer will reach the maximum size of 8 GB so that the virtual PC will run more stable and performance.

If you do not enable the dynamic memory feature, the virtual computer will only use the size specified in Startup Memory. In short, the VM will only use 4GB RAM size and will not automatically increase RAM size by hypervisor when it needs more space.

Configuring the Minimum Recommended RAM Size for the Operating System

Step 6

Suppose you have not created an Internal Switch or External Switch using the Virtual Switch Manager on Hyper-V. In that case, you can use a NAT connection to connect the virtual computer to the Internet by selecting Default Switch in this window.

Since Default Switch uses NAT to access your host computer’s network, you cannot transfer files between the host and the VM or access the guest system over the web. It is important for security because the operations you will do on the virtual PC will not affect your host system. Thus, when your virtual system is infected with a virus, you prevent it from accessing your host system over the network.

Selecting Default Switch

Step 7

In the Virtual Hard Disk configuration, you can create a new virtual disk or add the virtual disk of a virtual machine you have previously installed. Suppose you have configured the virtual PC’s storage location to a location on an external disk. In that case, it will be backed up to the exact location on the virtual disk you will create.

You can increase or decrease the disk size of the virtual machine you will install from the Size section according to your needs.

Create a Virtual Hard Disk

Step 8

When you install the operating system on the guest machine later in the installation options window, you can add the ISO image from the virtual machine’s settings. However, in this step, after adding a bootable ISO image to the VM via the Browse button, you can start the system installation immediately.

Suppose you have Windows Server in your network environment. In that case, you can install the operating system on the virtual machine over the network with Windows Deployment Services by enabling the option at the bottom.

Adding a Bootable Image File to a Virtual Machine

Suppose you select the Generation type of the virtual machine as 1. In that case, you can install the system using the physical CD/DVD drive in the setup options. Also, you can add a Floppy disk device with a VFD file extension to install legacy systems.

Generation 1's Installation Options

Step 9

After clicking the Browse button, select the Windows 10 ISO image you downloaded to your computer and click the Open button.

Adding Windows 10 ISO File

Step 10

After specifying the location of the Windows ISO file in the installation options, click Next to continue.

Specifying the Location of the ISO File

Step 11

After checking the summary window stating the settings you made in the last step of the virtual machine creation wizard, click Finish.

Closing the VM Summary Window

Step 12

After creating the virtual computer, you must set it up correctly before installing it. Therefore, right-click on the VM and click Settings to open the hardware and management window.

Opening the VM's Settings

How to Configure the Hardware Settings of the Virtual Machine

By configuring the virtual machine settings in Hyper-V, you can make the guest operating system more efficient and secure. As with other virtualization software, you can change the number of virtual processors or adjust the RAM size with this software.

Step 1: Add Hardware

The first setting in the Hyper-V settings window is hardware addition. You can add a virtual HDD, network adapter, RemoteFX 3D video adapter, and Fiber Channel adapter to the VM.

The RemoteFX 3D Video Adapter is disabled by default because it is disabled on your host computer system. You can enable this feature and add the host GPU to the VM using PowerShell.

Adding Hardware

Step 2: Firmware

When you select Generation 2, you can change the boot order of the VM in the Firmware section of the settings window. You can also review the detailed boot record of the selected device.

Firmware Settings

Generation 1 has a BIOS option to install operating systems that do not support UEFI. You can configure one of the CD, IDE, network card, and floppy devices in boot order as primary in the BIOS settings.

BIOS Software Settings

Step 3: Security

You can enable the Secure Boot feature for the operating system you install in the Security settings and change the UEFI structure from the Template section.

  • Microsoft Windows: You must select this option to enable secure boot in the VM when you install Windows operating systems.
  • Microsoft UEFI Certificate Authority: When you install Linux-based operating systems such as Ubuntu, and Debian, you should select this option to enable secure boot in the VM.
  • Open Source Shielded VM: You must select this option to enable secure boot on Linux-based protected virtual computers.

After enabling virtualized TPM (Trusted Platform Module) for your VM in the Encryption Support tab, you can encrypt your virtual HDD using BitLocker. Thus, your virtual disk with the VHDX extension will not work on other Hyper-V guest machines.

You can enable the use of features such as BitLocker encryption, Secure Boot, Virtual Trusted Platform Module, and Host Guardian Service in the virtual machine by checking the Enable Shielding option in the Security Policy tab. You can also create a security layer for unauthorized access to virtual machines running on the server using the Host Guardian Service introduced in Windows Server 2016.

Secure Boot Settings

Step 4: Memory

In the memory configuration of the virtual computer, you can write the RAM size to be allocated from the host resource to the VM by the system to be installed. If your host computer has high RAM capacity, you can configure more memory size for the VM to run more stable.

Suppose you enable the Dynamic Memory feature in the guest operating system. In that case, resource allocation will be made automatically up to the value specified in the maximum size if processes need more RAM size. Suppose there is no operation in the system, and it is idle. In that case, the system’s stability is increased by allocating more efficient resources from the host computer using only the RAM size specified in the minimum area.

Memory Buffer specifies the amount of RAM the virtual machine needs instantly. This buffer value allocates 20% of the current RAM size and keeps it idle. Thus, the buffer size is used before the host assigns the guest machine RAM size. In short, if you set a height of 5GB for the VM, 20% of it, 1GB, will be kept idle, and this size will be used when the VM needs instant RAM.

On the other hand, Memory Weight is configured to give more RAM priority to the VM, which is determined by comparing the RAM size used by other VMs running in Hyper-V.

Virtual Computer's RAM Settings

Step 5: Processor

In the processor hardware settings, you can increase the number of virtual processors for the virtual machine according to the capacity supported by your host computer and get more performance gains.

The Virtual Machine Reserve feature in the Resource Control settings ensures that the number of virtual processors specified for the VM is strictly allocated through the host CPU. This feature puts more load on the host CPU but can be used for services like SQL Server.

Suppose you configure the VM’s vCPU count to 4 and set the Virtual Machine Reserve to 100%. In that case, the logical processor count for the VM is guaranteed. However, reserved logical processors cannot be used in other VMs.

The Virtual Machine Limit feature limits the number of logical processors allocated to the VM. Relative weight, on the other hand, sets the priority of the host CPU resource over other VMs due to evaluating a number between 1 and 10000 assigned to the guest machine.

Virtual Processor Settings

Step 6: Processor Compatibility

The processor compatibility setting provides the ability to run a VM that you run with Hyper-V installed on your physical computer on a different physical computer. When used in a redundant server structure, in case of any failure, the VM can be easily migrated to the other server and run smoothly. However, the processor compatibility setting is not available between servers with Intel and AMD-branded processors.

Virtual Processor Compatibility Settings

Step 7: Processor NUMA (Non-Uniform Memory Architecture)

NUMA (Non-Uniform Memory Access) is a feature that helps improve the processor speed without increasing the load on the processor bus. The processor can fast access the near parts of memory, while it may take longer to access the far features.

Each CPU has memory groups in a multiprocessor structure on Hyper-V Host. When a VM needs more space than the processor’s cache memory, it uses its local memory group. Accessing the local memory group is fast, but it may take longer for the other CPU on the motherboard to access the memory group. Therefore, NUMA technology prevents bottlenecks in accessing remote memory groups by adjusting the priority between CPU and RAM groups for better scalability and performance in the VM.

All VMs running on Hyper-V Client or Host have NUMA topology. This feature is set automatically depending on the host’s hardware and the VM. When a VM needs more virtual memory or CPU than a single NUMA node, it needs more NUMA groups.

The maximum number of processors the host supports is automatically set in the NUMA Topology settings. However, the number of processors the VM will use in the NUMA group can be changed to a maximum of 64 CPUs. In the Maximum memory size field, each NUMA group’s size can be changed. In the number of NUMA nodes per socket field, the NUMA groups that the host CPU will use can be increased. You can look at the whitepaper in this article to get the NUMA settings right on a physical server.

The Virtual NUMA fabric automatically discovers and configures the hardware topology by default. It may be better to use the NUMA settings as they are, but you will get more performance gains by changing these settings. Suppose you have changed these settings and want to return to the default settings. In that case, you can reset the NUMA topology of the host computer with the Use Hardware Topology button.

Processor NUMA (Non-Uniform Memory Architecture)

Step 8: SCSI Controller

In the SCSI controller settings, you can add or delete a new virtual CD, DVD, or HDD in the virtual machine. After selecting the type of driver you want to add to the VM, click the Add button and adjust its settings.

Suppose you want to add a physical disk instead of a new virtual disk to your virtual computer. In that case, you must enable Physical Hard Disk in the window that opens after clicking the Add button and select the disk installed on your host from the list. If the HDD is not visible in the settings, you must configure it offline in disk management.

If you selected Generation 1, the VM’s settings would have an IDE controller instead of a SCSI disk controller because you cannot add a SCSI controller in Generation 1.

SCSI Controller

Step 9: Hard Drive

You can add a physical disk instead of a virtual disk in the Hard Drive device settings listed under SCSI Controller. But the option you will use most in these HDD settings is Edit. To increase the performance or capacity of the VM’s virtual disk, you can:

  • Compact: You can compress the existing disk to expand the virtual disk’s capacity.
  • Convert: You can convert the extension of the virtual disk from VHD to VHDX or vice versa.
  • Expand: You can increase the size of the virtual disk.

With the Inspect option, you can check the location where the virtual disk is stored, its name, maximum file size, and current file size. To delete the vHDD from the VM and add a new virtual HDD, click the Remove button and add a new disk with Add.

Virtual Hard Disk Settings

Step 10: Quality of Service

You can use it to manage the performance of the storage resources allocated from the host to the VMs by enabling the Quality of Service feature in the disk configurations of virtual machines.

By monitoring the virtual HDD’s operational activity, you can examine I/O performances and prevent bottlenecks on disks by managing I/O resources among other virtual disks.

Configuring the Quality of Service of the Virtual Disk

Step 11: DVD Drive

If you didn’t add an ISO file when creating the VM, you could add it from the Image File location in the DVD Drive settings. Also, if you want to erase the DVD drive, you can click the Remove button while the device is selected.

Creating a Generation 1 virtual machine will show the Physical Drive option in the DVD settings. With this option, you can install with a Windows installation media inserted in the host DVD drive.

Virtual DVD Drive Settings

Step 12: Network Adapter

Default Switch is selected by default in Virtual Switch options in Network Adapter settings because no Internal or External Switch is configured on Virtual Switch Manager.

Default Switch uses a NAT connection to access the host computer’s network. The VM can access the Internet using this Switch, but not the local network to which your physical computer is connected. To fix this problem, create an External Switch and select the host’s Ethernet or WiFi card as the network adapter.

To make the VM a member of any VLAN group in the VLAN ID settings, you must first enable the appropriate option and type the VLAN number. You can optimize your network connection by assigning minimum and maximum Mbps values to all virtual machines running in Hyper-V in Bandwidth Management settings. If you want to add a new network adapter, you can delete the device with Remove and add a new one.

Network Adapter Settings of the Virtual Machine

Step 13: Hardware Acceleration

You can configure the VM Queue, IPsec Task Offloading, and Offloaded SA options in the hardware acceleration settings for the VM’s network card.

  • Virtual Machine Queue: This feature enables data transfer over the network directly using the shared memory of the VM. The host’s physical NIC device must support this feature.
  • IPsec Task Offloading: IPsec encrypts the data stream in network traffic. To avoid overusing hardware resources, you can enable this feature and transfer the network load to the network card.

Virtual Network Adapter Hardware Acceleration Settings

Step 14: Advanced Features

The advanced features of the network adapter include advanced security-related settings.

  • MAC Address: It allows you to configure the source MAC address as Dynamic or Static in outgoing packets in network traffic.
  • DHCP Guard: It lowers the packets of servers that send response messages, such as the DHCP server, without authorization in the network environment and takes the network security to the next level.
  • Router Guard: It prevents receiving Advertisement and Redirection messages from Routers located unauthorized on the network or sending packets.
  • Protected Network: This feature is only used for Clustered VMs. The VM is automatically migrated to other hosts with the Live Migration feature when any network failure occurs.

Advanced Features of Virtual Network Card

  • Port Mirroring: The management of local traffic is followed by programs that monitor and analyze the network by copying the incoming and outgoing packets and sending them to the destination port or machine. Port Mirroring is selected as None by default, but you can configure this setting as Source or Destination.
  • NIC Teaming: Configuring all NICs as a single card in virtual servers with multiple network cards helps to take precautions against network failures.
  • Device Naming: It allows the renaming of network adapters installed in a single virtual machine and minimizes complexity.

Advanced Features of Virtual Network Adapter

How to Configure the Management Settings of the VM

After configuring the guest machine hardware settings in Hyper-V, we will cover the management settings such as backup, services, or the behavior of the VM in case of failure.

Step 1: Name

When you plan to change the name of the Guest operating system later, you can change the name from the Name section under the Management settings. You can also add the services you run in the VM or the changes you make in the note field.

Rename Virtual PC

Step 2: Integration Services

Hyper-V Integration Services is a software package that offers both performance and functionality to users on a host server or VM.

  • Operating System Shutdown: This service allows normal shutdown of the guest operating system in the VM.
  • Time Synchronization: It synchronizes the system time of the host server and the virtual machine.
  • Data Exchange: The host exchanges metadata between the server and the virtual machine and collects general configuration information about the computer.
  • Heartbeat: It periodically checks that the Guest operating system has been started correctly.
  • Backup: It allows the backup of the VM against potential failures and backs up all system files in one file.
  • Guest Services: Disabled by default, this feature allows copying files between the host and virtual machines without a network connection. On older versions of Windows, it automatically installs drivers for unrecognized devices. It also offers a better video display, a remote desktop experience, and more functional mouse support.

Configuring Integration Services

Step 3: Checkpoints

Checkpoint is a feature that saves the instantaneous state of the virtual machine and reverts from the previous snapshot to resolve any system errors that occur quickly.

There are two types of Hyper-V Checkpoint settings:

  1. Production Checkpoints: It provides a complete backup solution to get a consistent data backup for the VM. It uses Shadow Copy Service for Windows and File System Freeze for Linux systems. It does not back up the snapshot of virtual memory.
  2. Standard Checkpoints: It takes a snapshot of the VM and memory when the image is created. However, it must provide a complete backup solution as it may cause data inconsistency in environments where services such as Active Directory are used.

You can create a stable backup solution by configuring a checkpoint method according to your personal or corporate solutions. Suppose you back up the snapshots taken in the Checkpoint File Location section to a location other than where the VM is installed. In that case, you can configure the site of an external storage unit.

Note that the Hyper-V Checkpoints feature is enabled by default. If it doesn’t matter what you do in the VM, you can turn this feature off.

Checkpoint Settings

Step 4: Smart Paging File Location

The partition is allocated from disk space and managed automatically by the system in cases where the virtual memory is insufficient for the guest operating system. You can change the storage location of the intelligent paging file from this window.

Configuring Smart Paging File Location

Step 5: Automatic Start Action

You can automatically restart the virtual machine after the host system is booted when the physical computer or host server restarts or automatically restart from any error.

  • Nothing: When the Hyper-V server restarts, it does not affect the selected VM.
  • Automatically start if it was running when the service stopped: If the VM was running before the Hyper-V server was shut down, the VM is automatically created when the server is turned back on. This option is most useful in test environments.
  • Always start this virtual machine automatically: It enables it to restart automatically according to the time specified in the Startup Delay value when the server is restarted. Virtual machines that run essential services such as Active Directory and SQL Server used by corporate companies in the domain structure can be automatically renewed upon server restart, and a stable management order can be created.

For example, suppose the Active Directory service runs on VM1. In that case, the AD service is guaranteed to be up and running immediately by restarting the host server using a 0-second startup delay. After AD service, a 40-60 seconds startup delay can be specified for SQL Server running in VM2. It ensures that SQL Server automatically connects seamlessly with Active Directory services.

Auto Start Settings

Step 6: Automatic Stop Action

You can choose the behavior of virtual machines when the host computer suddenly shuts down due to a power outage or power supply system.

  • Save the virtual machine state: In case of host interruption, it saves the instant state of the VM to a file, and when the system is turned on again, it reads that file and guarantees that the VM will start from where it left off as if nothing had happened.
  • Turn off the virtual machine: In the event of a host computer outage, the power plug in the VM is pulled directly. Restarting the VM may result in system errors.
  • Shut down the guest operating system: In case of host interruption, the VM shuts down properly, but when it restarts, running services may take time.

Auto Shutdown Settings

How to Connect the Virtual Machine and Start Windows Installation

After creating a virtual computer with Hyper-V and configuring the VM’s settings in detail, you can start the Windows installation.

Step 1

After the virtual computer installation, you will see the system you created on the main screen of Hyper-V. Here you can start the VM directly with the Start option or first connect to the VM with the Connect option.

Connecting to the VM

Step 2

After connecting to the virtual PC, you need to boot the system because the VM is in the off state. Click Start to boot your system with the ISO file you added to the guest machine.

Starting Windows Setup

Step 3

When the VM is started with the Windows 10 21H1 ISO image, you can switch to the setup screen by pressing any key on your host keyboard.

Windows 10 Setup Screen

Video

Related Articles


How to Enable the Virtualization Support on Host
How to Install Windows 10 in Hyper-V
How to Install Windows 7 in Hyper-V
How to Install Windows 8.1 in Hyper-V
How to Install Windows XP in Hyper-V

Add a Comment

Your email address will not be published. Required fields are marked *