13–Windows Server 2016
Deploying and Managing a Nano Server
233
AH0054601-00 B
Deploying a Nano Server in a Virtual Machine
To create a Nano Server virtual hard drive (VHD) to run in a virtual machine:
1.
Download the Windows Server 2016 OS image.
2.
Go to the
NanoServer
folder from the downloaded file in
.
3.
Copy the following files from the
NanoServer
folder to a folder on your hard
drive:
NanoServerImageGenerator.psm1
Convert-WindowsImage.ps1
4.
Start Windows PowerShell as an administrator.
5.
Change directory to the folder where you pasted the files from
.
6.
Import the NanoServerImageGenerator script by issuing the following
command:
Import-Module .\NanoServerImageGenerator.psm1 -Verbose
7.
Issue the following Windows PowerShell command to create a VHD that
sets a computer name and includes the Hyper-V guest drivers:
New-NanoServerImage –DeploymentType Guest –Edition
<Standard/Datacenter> -MediaPath <path to root of media>
-BasePath
.\Base -TargetPath .\NanoServerPhysical\NanoServer.vhd
-ComputerName
<computer name> –GuestDrivers
Example:
New-NanoServerImage –DeploymentType Guest –Edition Datacenter
-MediaPath C:\tmp\TP4_iso\Bld_10586_iso
-BasePath .\Base -TargetPath .\Nano1\VM_NanoServer.vhd
-ComputerName
Nano-VM1 –GuestDrivers
The preceding command takes about 10 to 15 minutes to create a VHD file.
A sample output for this command follows:
PS C:\Nano>
New-NanoServerImage –DeploymentType Guest –Edition
Datacenter -MediaPath
C:\tmp\TP4_iso\Bld_10586_iso -BasePath .\Base -TargetPath
NOTE
This following command will prompt you for an administrator password
for the new VHD.