Showing posts with label Nano Server 2016. Show all posts

Nano Server - How to Configure iSCSI Target Portal and MPIO on Nano Server Step by Step

No comments

Configuring iSCSI Target Portal and MPIO on Nano Server step by step

clip_image002

Before you start

Configuring iSCSI Target Services

  • On the PowerShell session execute the following cmdlet:
#Enable and start the iSCSI Service on the Nano Server.
Set-Service –Name MSiSCSI –StartupType Automatic
Start-Service MSiSCSI
#Setup the iSCSI Target Portal make sure you set all your iSCSI NICS.
New-IscsiTargetPortal –TargetPortalAddress 10.x.x.01
New-IscsiTargetPortal –TargetPortalAddress 10.x.x.02
#Get all iSCSI configured NIC's and initiate the connection and also Multipath.
$Nics = Get-NetIPAddress –AddressFamily IPv4 -InterfaceAlias "(Your iSCSI Adapters)"
Get-IscsiTarget | Connect-IscsiTarget  -IsPersistent $True –IsMultipathEnabled $True –InitiatorPortalAddress $Nics.IPAddress







 

Map Disk From Storage (SAN)

This step may vary depending on your Storage system.
  • Map Volumes to the Nano Server and then proceed to configure MPIO

Setup MPIO

  • Run the following cmdlet to enable MPIO:
Enable-WindowsOptionalFeature -Online -FeatureName MultiPathIO
Important: Microsoft has published a PowerShell script so it configures/claims disks for MPIO.
Download the MPIO on Nano Server Script
  • Copy the sample script to a PowerShell and then copy to the Nano Server by utilizing the Explorer if not then the copy-item cmdlet.
  • Run the script
clip_image003

Initialize SAN/iSCSI Volumes on the Nano Server

  • On a Remote Server Manager session connect to your Nano Server and then navigate to File and Storage Services workspace then select Disks.
clip_image004
  • Initialize the SAN(iSCSI) Volumes and then that's it now you have your iSCSI SAN storage configured on your Nano Server.






Nano Server - How to enable iSCISI Target, MPIO and File Services Roles

No comments

Nano Server - How to enable iSCISI Target, MPIO and File Services Roles

image
On this example I’m going to be utilizing an existing Hyper-V Nano I have deployed via Nano Server Image builder  in the past. In order to get the iSCSI Target Services enabled you will need to install the File Server role and Other Storage components Package.

Step by step

On the Nano Server Image builder packages page, select File Server Role and other storage components.
image
After the Nano Server image is created and deployed then connect with your Server Manager Console.
After connecting to your Nano Server navigate to Server Manager,  All Servers then right click on your Nano Server and select Add Roles and Features.
On the Add Roles and Features Wizard select your Nano Server and Next.
clip_image001
On the Server Roles page, select File and iSCSI Service, File Server and Data Deduplication.
clip_image001[6]
On Features page, select MPIO and Windows Standards-Based Storage Management. I selected them all as I’m going to be using them later.
clip_image001[8]
Confirm the installation of the new Roles and click on Install
clip_image001[10]
Restart your Nano Server and connect via Powershell and access the iSCSI cmdlets.

On the current  Powershell Session and type in Get-Command - Module iSCSI to list all the Cmdlets.
clip_image001[12]
Now you can configure your iSCSI Target server and map your LUN’s.

Here’s some examples from the TechNet library More here.
New-IscsiTargetPortal -TargetPortalAddress testIscsi
#Conect to iSCSI target on your Nano Server.
$Tar = Get-IscsiTarget
Disconnect-IscsiTarget -NodeAddress $Tar.NodeAddress
Connect-IscsiTarget -NodeAddress $Tar.NodeAddress







Nano Server - How to deploy IIS Web Services Role on Nano Server 2016 and create custom IIS websites step by step

No comments

How to deploy IIS Web Services Role on Nano Server 2016 and create custom IIS websites step by step.

image
On this tutorial I'm going to be using Nano Server Image builder (Here's a post on how to install) and Windows 10 Hyper-V as my virtualization host. I will cover the Nano Server image creation, deployment and management.

Step by Step

  • On the Nano Server Image builder select Create a new Nano Server image and then continue to the packages selection.
clip_image002
  1. On the Packages selection page, select Web Server (IIS) and any other needed then Next.
clip_image003
  • On the Destination Machine info page, specify the details for your new Nano IIS Web Server and then Next.
clip_image004
clip_image005
  • After Creating the Nano VHDX then Create a VM GEN2 in my case and startup, then login.
clip_image006
  • From the Remote system connect to the IIS default Website with the IP or name you assigned to your Nano IIS Web Server.
clip_image007
  • Connecting to your Nano Web Server via PowerShell PSSession
clip_image008
Important: You might get the following error if WinRM is not configured correctly.
clip_image009

How to Configure WinRM and enable Nano Server Remote Management

  • winrm quickconfig
  • winrm set winrm/config/client @{TrustedHosts="NanoServerIP"}
  • chcp 65001
Now you should be able to execute commands remotely on the Nano Server. F
  • winrs -r:NanoServerIP -u:Administrator -p:Password ipconfig
clip_image010
  • Managing via the Server Manager Console, All Servers, right click on the new server and Manage As… (`\Administrator and Password) then Ok and the server should come up. After discovering the services you will be able to manage the installed roles/services.
clip_image011
clip_image012
clip_image013
  • Now you should be able to manage your Nano IIS Web Server and also install more features to the IIS role if required. In this demo I have installed some extra features so I can customize and utilize other features.
clip_image014

Creating a new IIS Website on Nano Server via PowerShell

Before creating the website make sure you have an active connection to the Nano Server. In my case it’s a bit different because is a workgroup machine, if you have it in a domain is much easier.
  • Connect via PowerShell to your Nano IIS Web Server
clip_image015
  • Import-module IISAdministration
  • Get-IISSite to check the module importation worked as expected.
clip_image016
  • To create the new site use the following command line:
Important: if you a creating a new site that will utilize the port 80 then you will need to either stop or delete the default IIS site.
New-IISSite -Name "NanoWebSite" -bindinginformation "*:80:" -PhysicalPath C:\Inetpub\yourpath
clip_image017
  • Stopping the Default IIS Website and starting the new Custom Nano IIS Website
clip_image018
  • That's it now you should be able to access your new IIS website.
clip_image007[1]

Customizing your new website

You could customize the site contents by utilizing the Copy-Item PowerShell Command line or the Windows Explorer and copy your custom HTML/CSS files.
clip_image019
This is my new customized Nano IIS Website.
clip_image001[1]
That’s it you have now deployed a Nano IIS Web Server and Sites.

























How to Join a Nano Server 2016 to a Domain Offline Mode via PowerShell

No comments

How to Join a Nano Server 2016 to a Domain Offline Mode via PowerShell

In this post I will cover the step by step of joining an already deployed non-domain joined Nano Server.
clip_image001
 

Non-domain joined Nano Server

clip_image002

Step by Step

  1. Make sure you have access to the Nano Server via PowerShell
  2. Create a offline Join File
  3. Copy the file to the Nano Server
  4. Run the offline join command line

Creating the Offline Join file

Open PowerShell as admin and run the following commands:
#Joining a Nano Server to a domain offline mode
$Domain=’YourDomain’
$Computername=’NanoServerName’
$Filename=’domainjoin.djoin’
Djoin.exe /Provision /Domain $Domain /Machine $Computername /Savefile $Filename
clip_image003
Successfully created
clip_image004
Important: The file will be placed on C:\Windows\System32 if you didn't assigned a path.

Copy the File to the Nano Server using explorer (in my case I copied to C:\SysMgr)

Connect the Nano server

clip_image005

Run the offline join command line to join the Nano Server to the domain

On the already opened session run the following command:
Djoin.exe /RequestODJ /loadfile C:\Windows\setup\scripts\domainjoin.djoin /windowspath c:\windows /localos
clip_image006
Restart (Ctl+F6) the Nano Server and then validate the Server is joined and also accessible via the server manager console.
clip_image007

clip_image008

That's it! you have now joined your Nano Server to a domain.




















Nano Server - Configuring Nano Server 2016 Network, Managing via PowerShell and Server Manager Console

No comments

Configuring Nano Server 2016 Network, Managing via PowerShell and Server Manager Console step by step

image

Configuring network settings on your Nano Server

On you Nano Server Console, Login and then select Networking

clip_image001
clip_image002
After selecting the Ethernet adapter press F11 to enter into the IPV4 settings
clip_image003
Then Press F4 to disable DHCP and set your static IP, then type in the IP ,SM and GW.
clip_image004
Enter to Save
clip_image005
After assigning the IP address try pinging from a different server on the same network.
clip_image006
That's it now you Nano Server 2016 has an static IP assigned.

Managing your Non-Domain Joined Nano Server from a Windows Server 2016 Server Manager Console

On you Windows Server GUI, go to the Server Manager, Manage and then Add Server
clip_image007
clip_image008
After adding the server you will get an error and the WinRM is not able to negotiate in order to fix this go to the All Servers node then right click on the server and select Manage As… (enter IP\Administrator and Password).
clip_image009
clip_image010

Manage Nano Server via Server Manager and PowerShell

Before you try to manage a non-domain joined Nano make sure your WinRM is configured and it trusts the remote Nano Server
WINRM commands to enable remote management on your 2012 or 16 server.
Open CMD as Administrator and type in the following command;
- winrm  set /winrm/config/client @{TrustedHosts=”YOURSERVERIP”}
- chcp 65001
Test the connection
- winrs –r:YourServerIP –u:Administrator –p: Password ipconfig
 
clip_image011
Enter to a PowerShell Session to confirm the winrm is configured and you can also manage your Nano Server 2016.
clip_image012

Installing Roles and Features to the Nano Server via Remote Server Manager console.

clip_image013
clip_image014
clip_image015
clip_image016
Nano Server will be automatically restarted and after that features will be installed.
clip_image017
 
That’s it Smile