brief introduction
Hyper-V is built into windows 10. Hyper-V provides hardware virtualization, and each virtual machine runs on the virtual hardware.
system requirements
- Windows 10 enterprise, professional or educational. Home version, mobile version and mobile enterprise version cannot be used.
- 64 bit processor with second level address translation (slat).
- CPU supports VM monitor mode extension (vt-c technology of Intel CPU).
- At least 4 GB of memory.
- Virtualization technology needs to be enabled in the system BIOS.
- After Hyper-V is turned on, VirtualBox cannot be used.
Enter the following contents in the command line to view the hardware support:
> systeminfo
MSI A320 motherboard turns on Virtualization Technology:
Press del to enter BIOS settings / overcracking settings / other settings / CPU features / SVM mode / enabled / F10 to save and exit
Enable Hyper-V using PowerShell
- Open the PowerShell console as an administrator.
- Run the following command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
- Restart after installation.
Using CMD and dism to enable Hyper-V
- Open a PowerShell or CMD session as an administrator.
- Run the following command:
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
Enable Hyper-V through settings
- Right click the windows button and select applications and features.
- Click under “related settings” on the right“Procedures and functions“。
- Choice“Turn windows features on or off”。
- Choice“Hyper-V”, and then click“determine”。
- Restart after installation.
Create virtual machine
- Open Hyper-V quick create from the start menu.
- Select an operating system from the left
- Or use the operating system of the local installation source.
- Click local installation source.
- Click change installation source.
- If it is a Linux image, uncheck the safe boot option.
- Click “create virtual machine”.
Manage virtual machines
Return to the list of virtual machines:
#View all virtual machines
Get-VM
#View the list of started virtual machines
Get-VM | where {$_.State -eq 'Running'}
#View the list of virtual machines in shutdown state
Get-VM | where {$_.State -eq 'Off'}
Start and shut down the virtual machine:
#Starting a specific virtual machine
Start-VM -Name
#Start all shut down virtual machines
Get-VM | where {$_.State -eq 'Off'} | Start-VM
#Shut down all running virtual machines
Get-VM | where {$_.State -eq 'Running'} | Stop-VM
Create VM checkpoint:
Get-VM -Name | Checkpoint-VM -SnapshotName
reference resources:https://docs.microsoft.com/zh-cn/virtualization/hyper-v-on-windows/quick-start/quick-create-virtual-machine