Deploying Windows DNS feature on Nano Server

Posted: January 22, 2017 in Windows Server

Nano Server is a remotely administered server operating system optimized for private clouds and datacenters,it  has no local logon capability.In this post we create basic nano server image,without going deep in configuration,in this one we’ll configure DNS server in Nano server

Import nano server CMD-lets

From Windows Server 2016 installation disk browse to NanoServer\NanoServerImageGenerator,

Set-ExecutionPolicy RemoteSigned
Import-Module .\NanoServerImageGenerator.psm1

Create Nano Image (with DNS packages) 

New-NanoServerImage -MediaPath d:\ -BasePath C:\nano\ -TargetPath C:\nano\nano_dns.vhdx -Package microsoft-nanoserver-dns-package -InterfaceNameOrIndex ethernet -Ipv4Address 192.168.0.20 -Ipv4SubnetMask 255.255.255.0 -Ipv4Gateway 192.168.0.1 -DeploymentType guest -E
nableRemoteManagementPort -Ipv4Dns 127.0.0.1 -Edition Datacenter -MaxSize 10GB -ComputerName nano_dns -AdministratorPassword (ConvertTo-SecureString "Pass
word01" -AsPlainText -Force)

All available packages are available in Windows Server 2016 installation DVD,Nanoserver\Packages folder

Capture.PNG

Create Hyper-V VM and start it

New-VM -Name 'nano-dns' -MemoryStartupBytes 1gb -VHDPath 'C:\nano\nano_dns.vhdx' -Generation 2 -switchname 'new virtual switch'

start-vm nano-dns

Establish connection to Nano Server and Extract the DNS Role

set-item wsman:\localhost\client\trustedhosts "192.168.0.20"
Enter-PSSession -ComputerName 192.168.0.20 -Credential administrator
Enable-WindowsOptionalFeature -Online -FeatureName dns-server-full-role
Import-Module DnsServer

Creating Forward lookup zone and A record

Add-DnsServerPrimaryZone -ZoneName test.com -ZoneFile test.com.dns
Add-DnsServerResourceRecordA -Name www -ZoneName test.com -IPv4Address 192.168.0.21

From client computer (where Preferred DNS server is set as Nano Server),test DNS resolution:

 

Capture.PNG

Advertisements
Comments
  1. Miguel Paton de Escalada says:

    I deployed the nano server and added the packages in the manual way and off line. However, for creating the VM and operating with the DNS, I use Hyper-v manager and DNS manager. The video on the link shows everything step by step. At the end it show how I add packages on line:

    I hope it helps

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s