An Engineers Notebook

Installing Nano Servers

To install a Nano server we need the Server 2016 ISO mounted and attached to the HV Host. we then run a series of PowerShell commands to installed the Nano Server.

#Import Nano server PS Module
Import-Module D:NanoServerNanoServerImageGenerator
#Create a basic NanoServer VHDX
New-NanoServerImage -MediaPath D: -BasePath .Base -TargetPath .NanoServer1.vhdx -DeploymentType Guest -Edition Datacenter -ComputerName NanoServer1 -AdministratorPassword (ConvertToSecureString -String 'Pa$$w0rd' -AsPlainText -Force)
#Create and Start the VM
New-VM -Name NanoServer1 -VHDPath .NanoServer1.vhdx -MemoryStartupBytes 1GB -Generation 2 | Start-VM
#Begin Remote PowerShell session
Enter-PSSession -VMName NanoServer1

We can run the following to create a Nano Server with features already installed

#Import Nano server PS Module
Import-Module D:NanoServerNanoServerImageGenerator
#Create a NanoServer VHDX
New-NanoServerImage -MediaPath D: -BasePath .Base -TargetPath .NanoServer1.vhdx -DeploymentType Guest -Edition Datacenter -ComputerName NanoServer1 -InterfaceNameOrIndex Ethernet -Ipv4Address 192.168.16.10 -Ipv4SubnetMask 255.255.255.0 -Ipv4Gateway 192.168.16.1 -Ipv4Dns ("192.168.16.100","8.8.8.8") -Package Microsoft-NanoServer-IIS-Package -AdministratorPassword (ConvertToSecureString -String 'Pa$$w0rd' -AsPlainText -Force)
#View available packages
Get-NanoServerPackage -MediaPath D:
#create and start the VM
New-VM - Name NanoServer1 -VHDPath .NanoServer1.vhdx -MemoryStartupByte 1GB -SwitchName vSwitch -Generatino 2 | Start-VM
#Start remote PS Session
Enter-PSSession -NMName NanoServer1

 

Remember, there is a GUI tool for this that can be downloaded at https://www.microsoft.com/en-us/download/details.aspx?id=54065

 

 

 

Leave a Reply

Your email address will not be published.