Create Virtual Machine with Hyper-V on Windows 10

Acquire how to create a virtual machine and install an operating organisation in your new virtual machine. You volition need an .iso file for the operating organization that you would similar to run. If needed, grab an evaluation re-create of Windows x from the TechNet Evaluation Center.

Create a Virtual Automobile with Hyper-V Manager

  1. Open up Hyper-V Manager by either pressing the Window'due south key and typing "Hyper-V Director" or by finding Hyper-V Manager in your applications.

  2. In Hyper-V Director, click Activity > New > Virtual Machine to bring up the New Virtual Machine Wizard.

  3. Review the 'Before You Brainstorm' content and click Next.

  4. Requite the virtual car a name.

Note: This is the proper name Hyper-V uses for the virtual car, not the computer name given to the guest operating system that volition be deployed inside the virtual auto.

  1. Choose a location where the virtual machine files will be stored such as c:\virtualmachine. You can besides accept the default location. Click Next when done.

  1. Select a generation for the machine and click Next.

Generation two virtual machines were introduced with Windows Server 2022 R2 and provide a simplified virtual hardware model and some additional functionality. You can only install a 64-chip operating system on a Generation two virtual car. For more data on Generation 2 virtual machines, see the Generation 2 Virtual Machine Overview.

If the new virtual motorcar is configured as Generation two and volition be running a Linux distribution, secure boot will need to be disabled. For more than data on secure kick, see Secure Kicking.

  1. Select 2048 MB for the Startup Memory value and leave Use Dynamic Memory selected. Click the Next button.

Memory is shared betwixt a Hyper-V host and the virtual motorcar running on the host. The number of virtual machines that tin run on a single host is in part dependent on available retentiveness. A virtual automobile can besides be configured to use Dynamic Memory. When enabled, dynamic memory reclaims unused memory from the running virtual machine. This allows more than virtual machines to run on the host. For more information on Dynamic Memory, see the Hyper-V Dynamic Retentivity Overview.

  1. On the Configure Networking wizard, select a virtual switch for the virtual machine and click Side by side. For more information, meet Create a Virtual Switch.

  2. Give the virtual hard drive a proper name, select a location or keep the default, and finally specify a size. Click Next when set.

A virtual hard drive provides storage for a virtual machine similar to a physical hard drive. A virtual hard drive is required so that you can install an operating organization on the virtual machine.

  1. On the Installation Options wizard, select Install an operating system from a bootable image file then select an operating organisation .iso file. Click Next once completed.

When creating a virtual machine, you can configure some operating organization installation options. The three options available are:

  • Install an operating organization afterwards – this option makes no additional modification to the virtual auto.

  • Install an operating organisation from a bootable image file – this is similar to inserting a CD into the physical CD-ROM drive of a physical estimator. To configure this option, select a .iso image. This image will exist mounted to the virtual CD-ROM drive of the virtual machine. The boot club of the virtual car is inverse to kick first from the CD-ROM drive.

  • Install an operating system from a network-based installation server – This option is not bachelor unless you have connected the virtual machine to a network switch. In this configuration, the virtual machine attempts to boot from the network.

  1. Review the virtual machine details and click Finish to complete the virtual machine cosmos.

Create a Virtual Machine with PowerShell

  1. Open up the PowerShell ISE as Administrator.

  2. Run the following script.

              # Fix VM Proper noun, Switch Proper name, and Installation Media Path. $VMName = 'TESTVM' $Switch = 'External VM Switch' $InstallMedia = 'C:\Users\Administrator\Desktop\en_windows_10_enterprise_x64_dvd_6851151.iso'  # Create New Virtual Auto New-VM -Name $VMName -MemoryStartupBytes 2147483648 -Generation ii -NewVHDPath "D:\Virtual Machines\$VMName\$VMName.vhdx" -NewVHDSizeBytes 53687091200 -Path "D:\Virtual Machines\$VMName" -SwitchName $Switch  # Add DVD Drive to Virtual Car Add-VMScsiController -VMName $VMName Add together-VMDvdDrive -VMName $VMName -ControllerNumber 1 -ControllerLocation 0 -Path $InstallMedia  # Mount Installation Media $DVDDrive = Get-VMDvdDrive -VMName $VMName  # Configure Virtual Machine to Boot from DVD Gear up-VMFirmware -VMName $VMName -FirstBootDevice $DVDDrive                          

Complete the Operating Organisation Deployment

In social club to finish building your virtual auto, you demand to showtime the virtual automobile and walk through the operating system installation.

  1. In Hyper-V Managing director, double-click on the virtual machine. This launches the VMConnect tool.

  2. In VMConnect, click on the green Start button. This is like pressing the power button on a physical calculator. You lot may exist prompted to 'Printing any key to kicking from CD or DVD'. Get ahead and do and so.

Note: Yous may demand to click inside the VMConnect window to ensure that your keystrokes are sent to the virtual automobile.

  1. The virtual auto boots into setup and you can walk through the installation like you would on a physical computer.

Note: Unless you're running a volume-licensed version of Windows, you lot need a carve up license for Windows running within a virtual auto. The virtual car's operating system is contained of the host operating system.