Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Windows Server 2016 Hyper-V Cookbook

You're reading from   Windows Server 2016 Hyper-V Cookbook Save time and resources by getting to know the best practices and intelligence from industry experts

Arrow left icon
Product type Paperback
Published in Jan 2017
Publisher Packt
ISBN-13 9781785884313
Length 524 pages
Edition 2nd Edition
Languages
Tools
Concepts
Arrow right icon
Authors (4):
Arrow left icon
Patrick Lownds Patrick Lownds
Author Profile Icon Patrick Lownds
Patrick Lownds
Leandro Carvalho Leandro Carvalho
Author Profile Icon Leandro Carvalho
Leandro Carvalho
Leandro Eduardo S Carvalho Leandro Eduardo S Carvalho
Author Profile Icon Leandro Eduardo S Carvalho
Leandro Eduardo S Carvalho
Charbel Nemnom Charbel Nemnom
Author Profile Icon Charbel Nemnom
Charbel Nemnom
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Installing and Managing Hyper-V in Full, Server Core, and Nano Server FREE CHAPTER 2. Migrating and Upgrading Physical and Virtual Servers 3. Managing Disk and Network Settings 4. Saving Time and Cost with Hyper-V Automation 5. Hyper-V Best Practices, Tips, and Tricks 6. Security and Delegation of Control 7. Configuring High Availability in Hyper-V 8. Disaster Recovery for Hyper-V 9. Azure Site Recovery and Azure Backup for Hyper-V 10. Monitoring, Tuning, and Troubleshooting Hyper-V A. Hyper-V Architecture and Components Index

Managing Nano Server using Server Management Tools – SMT

The Server Management Tools (SMT) is a new service hosted in Microsoft Azure, which is still in preview at the time of this writing.

The Server Management Tools includes the following features:

  • View and change system configuration
  • View performance across various resources and manage processes and services
  • Manage devices attached to the server
  • View event logs
  • View the list of installed roles and features
  • Use a PowerShell console to manage and automate

Using the Azure portal from anywhere, on any browser, Server management tools is a free cloud service that requires Azure subscription which enables you to remotely manage machines running Windows Server 2016 including Nano Server, Windows Server 2012 R2, and Windows Server 2012 with and without Hyper-V.

Getting ready

To create a new connection for the first time, you will need to create a new gateway by configuring an existing server to connect to Azure as the gateway to your environment, as shown in the following diagram. The gateway allows connections to be routed to other servers and you can then use web-based versions of familiar tools, such as PowerShell, Task Manager, Event Viewer, Firewall, File Explorer, Network Settings, Windows Update, Registry Editor, and so on, to manage servers in that network:

Getting ready

The server management gateway can be a Windows Server 2012 R2 Server running the Windows Management Framework 5.0—WMF 5.0 (https://www.microsoft.com/en-us/download/details.aspx?id=50395) or Windows Server 2016 with no additional preparation. You also need a Microsoft Azure subscription and an account.

The gateway will handle the connection to Azure and the Server Management Gateway that is deployed on-premises needs connection to the Internet. The managed Nano servers do not need a direct connection to the Internet; the gateway will connect to the managed Nano servers. With that, the gateway needs a connection to Nano server(s) that will be managed from Azure.

One of my favorite remote management features in SMT is the web-based PowerShell console, as shown in the following screenshot:

Getting ready

How to do it...

In order to manage Nano server installation using SMT carry out the following steps:

  1. Prepare a new Windows Server 2016 virtual machine on the premises in which you would connect to the Internet, it should have the latest updates installed.
  2. Create a Nano machine that you want to be able to manage via Server management tools.
  3. To begin your deployment, log in to your Azure portal account and search for Server management tools in Marketplace or navigate to Marketplace | Management | More | Server management tools.
  4. Select the Server management tools, read the description, review the terms of this release, and click on Create.
  5. In the computer name field, make sure you enter the Nano Server machine name, which you have deployed on-premises in Step 2, as shown in the following screenshot.
    How to do it...
  6. After the connection is created, you can see the connection as shown in the following screenshot; however, you will get the information that the gateway is not ready. As the next step, you will configure the gateway on the prepared server:
    How to do it...
  7. Under the Server Management Tools Gateway, you can find a setup for the gateway that will generate a custom install package for your gateway. As shown in the following screenshot, you can copy this link, download this package, which is around 4 MB in size, and install it on your gateway server:
    How to do it...
  8. Unzip the gateway package from the machine that you want to designate as the gateway; the package contains two files, profile.json and GatewayService.MSI. Run the GatewayService, as shown in the following screenshot and walk through the steps in the MSI setup file.
    How to do it...

    Note

    Note that you can also install the Gateway on a Windows Server Core machine using the following MSI parameters through the command line:

    GatewayService.msi /qn GATEWAYPROFILEJSON=c:\temp\gateway\profile.json ACCEPTEULA=true ACCEPTPRIVACYPOLICY=true
    

    You need to replace the preceding path with the appropriate absolute path to the profile.json.

  9. After you have installed the Server Management Gateway package on your gateway server you can see the connection in the Azure portal.
  10. Once the gateway installation is completed, return to the Microsoft Azure portal and reopen your SMT connection, click on the Manage as command and enter administrative credentials of your Nano Server, as shown in the following screenshot:
    How to do it...

As shown in the following screenshot, you should be able to manage your Nano machine if the Microsoft Azure portal can reach it through the gateway:

How to do it...

Now you can start remote managing your Nano server. As mentioned earlier, the new management tool is really handy if you want to manage Server Core or Nano Server.

How it works...

The main management story in Nano Server is core PowerShell:

  • Windows Management Instrumentation (WMI)
  • Windows Remote Management (WinRS)
  • Emergency Management Services (EMS)

PowerShell relies on the .NET Framework, as you noticed Nano Server is a small and tiny OS and only has the Core Common Language Runtime (CLR). The Core CLR is a tiny subset of the .NET Framework, the PowerShell team went ahead and refactored PowerShell to run on Core CLR, which was a huge effort. The good news is that PowerShell users probably will not miss the most important features. It has full language compatibility and supports PowerShell remoting, so you can use the most popular remote command, such as (Invoke-Command, New-PSSession, Enter-PSSession, and so on).

Each Nano Server image contains, by default, Core CLR that takes up 45 MB of space, PowerShell itself takes about 8 MB of space, and there is 2 MB available for two built-in modules. Remoting is turned on by default, so a Nano server installation will always be ready to be remoted into and be managed remotely.

See also

Managing virtual machines with PowerShell Direct recipe in Chapter 4, Saving Time and Cost with Hyper-V Automation.

You have been reading a chapter from
Windows Server 2016 Hyper-V Cookbook - Second Edition
Published in: Jan 2017
Publisher: Packt
ISBN-13: 9781785884313
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime