|
|
# Create Hyper-V VM from command prompt
|
|
|
```powershell
|
|
|
new-vm -Name 'ubuntu' -MemoryStartupBytes 512MB -NewVHDPath 'C:\hv-vm\ubuntu.vhdx' -SwitchName 'Ext Virtual Switch' -NewVHDSizeBytes 20GB -Generation 1
|
|
|
set-vm -VMName 'ubuntu' -ProcessorCount 2
|
|
|
Get-VM -Name 'ubuntu' | Add-VMDvdDrive
|
|
|
Set-VMDvdDrive -VMName 'ubuntu' -Path 'D:\dist\ubuntu-16.04.3-server-amd64.iso'
|
|
|
Start-VM ubuntu
|
|
|
``` |
|
|
\ No newline at end of file |