Tuesday, March 21, 2017

Experience Nano Server

Experience Nano Server

Objective

In this lab, you will use tools included with Windows Server 2016 to deploy new Nano Server images as virtual machines. In the first exercise, you will learn how to deploy domain-joined instances of Windows Server 2016 Nano Server. In the second exercise, you will learn about the management tools used to manage Nano Server images. In the third exercise, you will learn how to deploy a Nano Server virtual machine that is a member of a workgroup, and then you will learn how to leverage the offline domain-join process to join this server to a domain. Finally, you will create a Scale-Out File Server cluster from the two Nano Server images you deployed in the environment.

Scenario

Nano Server is a lightweight, compact version of Windows Server 2016 that has a significantly reduced footprint compared with the Server Core or GUI versions of Windows Server. A key benefit of Nano Server is that the reduced footprint allows for greater density of virtual machines running on physical servers. To achieve the reduced footprint of Nano Server, Microsoft has removed 32-bit compatibility, Remote Desktop Services, and Microsoft Installer (MSI) support, as well as full support for the .NET Framework. Additionally, Nano Server requires remote administration, either using standard Remote Server Administration Tools (RSAT), PowerShell Remoting, or System Center.

In this lab, you will familiarize yourself with the creation of Nano Server images and virtual machines, as well as some of the basic tools for managing Nano Server.

Virtual Machines

  1. DC01
  2. VMHost

Exercise 1: Deploying Nano Server in a domain

In this exercise, you will use the New-NanoServerImage PowerShell script to deploy a domain-joined Nano Server virtual machine.
  1. Knowledge and automation
    This Integrated Digital Lab features both knowledge and automation. Whenever you see the Action [Bolt] icon next to text, all or part of the step has been automated, and you can click the Action icon to perform the step. Whenever you see the Knowledge [Bulb in Head] icon, the Alert [Triangle] icon, the Screenshot [Camera] icon, or the Video [Movie Camera] icon, additional information has been provided to enhance your lab experience. Try them now.
    This is an alert. Alerts are mandatory elements that will pop up to draw your attention to critical information or to provide warnings.
    Whenever you see the Type Text icon next to a step, you can click this icon to paste a text string into an open window. This feature is often used to make it easier to insert strings, such as long PowerShell commands, into open windows. The Screenshot shows what the Type Text icon looks like.
    PowerShell -Command "Write-Host 'Nice work, you ran this command.'" 
  2. Ensure you are signed in to VMHost
    If you are not already signed in to the VMHost virtual machine, on the Machines tab, click VMHost. Alternatively, click the Virtual Machine icon to the right of this instruction. If necessary, sign in as CONTOSO\Administrator using Passw0rd! as the password.
    *IT IS IMPORTANT TO ENSURE YOU ARE ON THE CORRECT VM OR THE STEPS WILL FAIL AT EXCERCISE 2*
  3. Open Windows PowerShell as administrator
    On the taskbar of VMHost, right click Windows PowerShell, and then click Run as Administrator.
  4. Change to the NanoServerImageGenerator folder
    At the Windows PowerShell command prompt, type cd c:\WS2016Source\NanoServer\NanoServerImageGenerator, and then press ENTER. Alternatively, click the Type Text icon to the right of this instruction to paste the command into the Windows PowerShell Command Prompt window, and then press ENTER.
    This folder contains the files from the Windows Server media
    cd c:\WS2016Source\NanoServer\NanoServerImageGenerator
  5. Import a PowerShell module
    At the Windows PowerShell command prompt, type Import-Module .\NanoServerImageGenerator -Verbose, and then press ENTER. Alternatively, click the Type Text icon to the right of this instruction to paste the command into the window, and then press ENTER.
    Import-Module .\NanoServerImageGenerator -Verbose
  6. Create a Nano Server image
    At the Windows PowerShell command prompt, type the following command, and then press ENTER. Alternatively, click the Type Text icon to the right of this instruction, and then press ENTER.
    New-NanoServerImage -Edition Datacenter –MediaPath c:\WS2016Source –BasePath c:\nanobase –TargetPath c:\vmstore\nano1\nano1.vhd -DeploymentType Guest –Storage -Clustering –ComputerName Nano1 –DomainName contoso.com –Verbose
    New-NanoServerImage -Edition Datacenter –MediaPath c:\WS2016Source –BasePath c:\nanobase –TargetPath c:\vmstore\nano1\nano1.vhd -DeploymentType Guest –Storage -Clustering –ComputerName Nano1 –DomainName contoso.com –Verbose
  7. Enter the password
    When prompted to enter a password, type Passw0rd!, and then press ENTER.
  8. Create a virtual machine from your first image
    Type the following command, and then press ENTER. Alternatively, click the Type Text icon to the right of this instruction to paste the command into the window, and then press ENTER.
    new-vm –name Nano1 –vhdpath c:\vmstore\nano1\nano1.vhd –generation 1 –switchname ((get-vmswitch).name)
    new-vm –name Nano1 –vhdpath c:\vmstore\nano1\nano1.vhd –generation 1 –switchname ((get-vmswitch).name)
  9. Start the Nano Server image
    At the Windows PowerShell command prompt, type Start-VM Nano1, and then press ENTER.
    Start-VM Nano1
  10. Connect to Nano1
    At the Windows PowerShell command prompt, type vmConnect VMHost Nano1, and then press ENTER.
    vmConnect VMHost Nano1
  11. Sign in to Nano1
    In the Virtual Machine Connection window, press the TAB key to navigate between fields, and then sign in using the following credentials.

    Username: Administrator
    Password: Passw0rd!Domain: Contoso
    The fields will glow slightly as you use the TAB key to move through them.
  12. Open Networking
    In the Nano Server Recovery Console, ensure Networking is selected, and then press ENTER.
  13. Select the network adapter
    In Network Settings, ensure that the network adapter is selected, and then press ENTER.
  14. Verify the IP address
    In Network Adapter Settings, verify that the Nano Server image has received a DHCP address on the 10.10.10.0/24 subnet.
    Note that the actual IP address might be different from the one shown in the Screenshot. Please make a note of the IP address.
  15. Sign out of Nano1
    Press ESC three times.
  16. Close the Virtual Machine Connection
    Close the Virtual Machine Connection window.
  17. Leave the PowerShell window open
    Leave the Windows PowerShell Command Prompt window open for the next exercise.
You have now deployed your first Nano Server image.

Click Continue to advance to the next exercise.

Exercise 2: Managing Nano Server

In this exercise, you will use various management tools, including the Windows PowerShell and MMC consoles, to manage Nano Server.
  1. Connect to Nano1
    At the Windows PowerShell command prompt that you left open in the previous exercise, type Enter-PSSession Nano1, and then press ENTER.
    Enter-PSSession Nano1
  2. Review Windows PowerShell cmdlets
    Type get-command *, and then press ENTER.
    get-command *
  3. Review the firewall cmdlets
    At the Windows PowerShell command prompt, type get-command *firewall*, and then press ENTER.
    get-command *firewall*
  4. Review the firewall rules
    At the Windows PowerShell command prompt, type Get-NetFirewallRule | Select DisplayName, Enabled | FT, and then press ENTER. Alternatively, click the Type Text icon to the right of this instruction to paste the command into the window, and then press ENTER.
    Note that a number of firewall rules are disabled. To perform subsequent tasks in the lab, it is necessary to enable additional rules. You will do this in the next task.
    Get-NetFirewallRule | Select DisplayName, Enabled | FT
  5. Enable the firewall rules
    Type Get-NetFirewallRule | Enable-NetFirewallRule, and then press ENTER.
    This command enables all the firewall rules. Note that in a production environment, you would want to follow the principle of least privilege and allow only the minimum required traffic.
    Get-NetFirewallRule | Enable-NetFirewallRule
  6. Exit the remote Windows PowerShell session
    At the Windows PowerShell command prompt, type Exit-PSSession, and then press ENTER. Leave the Windows PowerShell Command Prompt window open for a subsequent exercise.
    Ensure that you exit the remote PowerShell session. In a later lab exercise, you will need to use the local Windows PowerShell session.
    Exit-PSSession
  7. Leave Windows PowerShell open
    Leave Windows PowerShell open for tasks in the next exercise.
  8. Open Server Manager
    On the taskbar, click Server Manager, and then in Server Manager, click All Servers.
    Servermanager.exe
  9. Add Servers
    On the top right tool bar, click Manage, and then click Add Servers.
  10. Add Nano1
    Click Find Now, click Nano1, click the Add button (right arrow), and then click OK.
  11. Select Nano1
    On the Servers tile, click NANO1.
  12. Review the Nano1 information
    Take a few minutes to review the contents of the Events, Services, and Roles and Features tiles for Nano1.
    You will need to use the scroll bar on the right side to view all the information. Note the lack of Performance and Best Practice Analyzer (BPA) information. This is expected.
  13. Select File and Storage Services
    In the left navigation pane, click File and Storage Services.
  14. View the Nano Server disk
    Click Disks, and then in the Disks tile, select the disk under Nano1 (1).
  15. Review the Nano Server volume
    In the left navigation pane, click Volumes. Under Nano1 (1), click C:.
    Note that there are no shares. To create files shares on Nano1, you need to add the File Server role service.
  16. Start the Add Roles and Features Wizard
    In the Shares tile, click Start the Add Roles and Features Wizard.
  17. Complete the wizard
    Click Next twice, accepting the defaults, and then click Install. When the wizard completes, click Close.
  18. Start the New Share Wizard
    In the Shares tile, click TASKS, and then click New Share.
    You may have to refresh the display.
  19. Select a profile for the share
    On the Select the profile for this share page, select SMB Share - Quick, and then click Next.
  20. Select a server
    Under Server, select Nano1, and then click Next.
  21. Configure the share name
    Enter NanoShare as the name, and then click Next.
  22. Complete the New Share Wizard
    Click Next on the remaining pages, accepting the defaults, and then click Create. Click Close when the wizard completes.
  23. View the file share
    Open File Explorer. In the address bar, type \\Nano1, and then press ENTER.
    You should see the NanoShare share that you just created.
  24. Close windows
    Close File Explorer and Server Manager.
    In Server Manager, note that the NanoShare share is visible.
You have now used several methods to manage Nano Server.

Click Continue to advance to the next exercise.

Exercise 3: Build and manage a Nano Server image in a workgroup

In this exercise, you will create a new Nano Server image in a workgroup, and then use remote management tools to join that computer to a domain.
  1. Switch to Windows PowerShell
    On VMHOST, switch to the Windows PowerShell Command Prompt window you left open in the previous exercise.
  2. Create your second image
    Type the following command, and then press ENTER. Alternatively, click the Type Text icon to the right of this instruction, and then press ENTER.
    New-NanoServerImage -Edition Datacenter –MediaPath c:\WS2016Source –BasePath c:\nanobase –TargetPath c:\vmstore\nano2\nano2.vhd -DeploymentType Guest –Storage -Clustering –ComputerName Nano2 –Verbose
    New-NanoServerImage -Edition Datacenter –MediaPath c:\WS2016Source –BasePath c:\nanobase –TargetPath c:\vmstore\nano2\nano2.vhd -DeploymentType Guest –Storage -Clustering –ComputerName Nano2 –Verbose
  3. Enter the password
    When prompted for the password, type Passw0rd!, and then press ENTER.
  4. Create a new virtual machine
    Type the following command, and then press ENTER. Alternatively, click the Type Text icon to the right of this instruction to paste the command into the window, and then press ENTER.
    new-vm –name Nano2 –vhdpath c:\vmstore\nano2\nano2.vhd –generation 1 –switchname ((get-vmswitch).name)
    new-vm –name Nano2 –vhdpath c:\vmstore\nano2\nano2.vhd –generation 1 –switchname ((get-vmswitch).name)
  5. Start the Nano2 virtual machine
    At the Windows PowerShell command prompt, type Start-VM Nano2, and then press ENTER.
    Start-VM Nano2
  6. Connect to the Nano2 virtual machine
    At the Windows PowerShell command prompt, type vmConnect VMHOST Nano2, and then press ENTER.
    vmConnect VMHOST Nano2
  7. Sign in to Nano2
    In the Virtual Machine Connection window, press the TAB key to navigate between fields, and then sign in using Administrator as the username and Passw0rd! as the password. Leave the domain field blank.
    Note that you left the domain field blank. This virtual machine is not a member of a domain. Recall that in the Windows PowerShell command you used to create the image, you did not use the –DomainName parameter.
  8. Determine the IP address
    In the Nano Server Recovery Console window, select Networking, and then press ENTER. In Network Settings, press ENTER. In Network Adapter Settings, note and record the IP address.
    The IP address should be 10.10.10.x., where x is an integer. Please make sure you record the actual IP address. You will need to use it in a subsequent step.
    TIP: You can use the up or down arrow keys to navigate the selections on this screen.
  9. Close the Virtual Machine Connection window
    Close the Virtual Machine Connection window.
  10. Store the IP address in a PowerShell variable
    Switch to the Windows PowerShell Command Prompt window. At the Windows PowerShell command prompt, type $ip = "10.10.10.x" (where x is an integer), and then press ENTER.
    Please use the value you determined in step 8. The IP address you enter must match the actual IP address for Nano2.
    You are creating this variable to use in a later Windows PowerShell command that will create a trusted list so that you can use Windows Remote Management to manage Nano2.
  11. Store credentials in a variable
    At the Windows PowerShell command prompt, type $cred = Get-Credential. When prompted, enter Administrator as the username and Passw0rd! as the password.
    $cred = Get-Credential
  12. Create a trusted hosts list for WinRM
    At the Windows PowerShell command prompt, type Set-Item wsman:\localhost\client\trustedhosts $ip, press ENTER, and then press Y.
    This command creates a trusted hosts list so that Admin can establish a remote Windows PowerShell session with Nano2.
    Set-Item wsman:\localhost\client\trustedhosts $ip
  13. Test Windows Remote Management
    At the Windows PowerShell command prompt, type Test-WSMan $IP, and then press ENTER.
    This command determines whether the WinRM service is running on the remote computer. The output should be similar to that shown in the Screenshot.
    Test-WSMan $IP
  14. Enter a remote session
    At the Windows PowerShell command prompt, type Enter-PSSession Computer $ip Cred $Cred, and then press ENTER.
    You are using the variables you created earlier as input to the command.
    Enter-PSSession –Computer $ip –Cred $Cred
  15. Enable file and print sharing firewall rules
    At the Windows PowerShell command prompt, type Get-NetFirewallRule FPS* | Enable-NetFirewallRule, and then press ENTER.
    This command enables all the firewall rules for the File and Print Sharing service.
    Get-NetFirewallRule FPS* | Enable-NetFirewallRule
  16. Open a Command Prompt window
    Right-click Start, and then click Command Prompt.
  17. Create an offline domain-joined blob file
    At the command prompt, type djoin /provision /domain contoso /machine Nano2 /savefile nano2.odj, and then press ENTER.
    djoin /provision /domain contoso /machine Nano2 /savefile nano2.odj
  18. Copy the domain-joined blob to Nano2
    At the command prompt, type copy nano2.odj \\10.10.10.x\c$ (where x is an integer), and then press ENTER.
    Make sure you enter the actual IP address of Nano2 in the command.
  19. Switch to Windows PowerShell
    Switch to the Windows PowerShell Command Prompt window that has a remote session with Nano2 (10.10.10.x).
  20. Join domain using the offline domain-joined blob
    At the Windows PowerShell command prompt, type djoin /RequestODJ /LoadFile C:\Nano2.odj /WindowsPath C:\Windows /LocalOS, and then press ENTER.
    djoin /RequestODJ /LoadFile C:\Nano2.odj /WindowsPath C:\Windows /LocalOS
  21. Restart Nano2
    At the Windows PowerShell command prompt, type restart-computer, and then press ENTER.
    restart-computer
  22. Exit the remote Windows PowerShell session
    At the Windows PowerShell command prompt, type Exit-PSSession, and then press ENTER. You will receive an error message. This is expected. Leave the Windows PowerShell Command Prompt window open for the next exercise.
    You are issuing this command to return to the local Windows PowerShell Command Prompt window.
    Exit-PSSession
  23. Open Server Manager
    On the taskbar, click Server Manager, and then in Server Manager, click All Servers.
  24. Add servers
    Click Manage, and then click Add Servers.
  25. Add Nano2
    Click Find Now, click Nano2, click Add, and then click OK.
  26. Review Nano2 details
    In Servers, click Nano2, and then review the contents of the EventServices, and Roles and Features tiles.
  27. Leave Server Manager open
    Leave Server Manager open for tasks in the next exercise.
You have now deployed a new Nano Server virtual machine and then moved it from a workgroup to a domain.

Click Continue to advance to the next exercise.

Exercise 4: Build a Scale-Out File Server

In this exercise, you will create a new Scale-Out File Server.
  1. Switch to the Windows PowerShell command prompt
    On VMHOST, switch to the Windows PowerShell Command Prompt window you left open in the previous exercise.
  2. Switch to DC01
    Click the Switch to Machine icon to the right of this instruction to switch to DC01. If necessary, sign in as CONTOSO\Administrator using Passw0rd! as the password.
  3. Create a new failover cluster
    At the Windows PowerShell command prompt, type new-cluster –name Cluster1 –node nano1, nano2 –nostorage, and then press ENTER.
    You might see warning messages. These are expected and can safely be ignored.
    new-cluster –name Cluster1 –node nano1, nano2 –nostorage
  4. Enable file services on Nano2
    At the Windows PowerShell command prompt, type ICM Nano2 {DISM /Online /enable-feature /featurename:file-services}, and then press ENTER.
    ICM Nano2 {DISM /Online /enable-feature /featurename:file-services}
  5. Create a new Scale-Out File Server
    At the Windows PowerShell command prompt, type Add-ClusterScaleOutFileServerRole Name SOFS1 Cluster Cluster1, and then press ENTER.
    Add-ClusterScaleOutFileServerRole –Name SOFS1 –Cluster Cluster1
  6. Open Failover Cluster Manager
    To the right of this instruction, click the Action [lightning bolt] icon to open Failover Cluster Manager.
    %windir%\system32\cluadmin.msc
  7. Connect to the cluster
    In the Actions pane, click Connect to Cluster, in the Select Cluster dialog box, type cluster1.contoso.com, and then click OK.
  8. Examine the cluster roles
    In the left navigation pane, expand Cluster1.contoso.com, and then click Roles.
     
  9. Examine the cluster nodes
    In the left navigation pane, click Nodes.
    You will see both Nano1 and Nano2 as nodes of the Scale-Out File Server cluster.
  10. Complete the lab
    Click Done to complete the lab.
    Clicking Done will cause the lab to end. Please click Done only if you are sure you want to finish and exit the lab.
You have now created a new Scale-Out File Server, running on Nano Server.

Click Continue to complete the lab.

No comments: