My first book is published! (VMM 2016 Cookbook)

My first book that I have been working day and night on for the last four months is published and globally available! The System Center Virtual Machine Manager 2016 Cookbook (English, 575 pages) includes multiple tips, tricks and techniques to help you make the perfect VMM fabric (see What this book covers  section at the bottom of this post for details)

I have done a complete makeover of the previous edition and,therefore, we have the  chapters written from the scratch, plenty of new recipes and revised old ones to meet changes in VMM 2016.  This book is essentially intended to system engineers, solution architects, administrators and anyone who want to learn and master Virtual Machine Manager 2016 (however, since we have two channels (LTSB/SAC), you will also find references to the latest VMM 1801 release in the semi-annual channel).

The book is available in paperback and ebook formats at Amazon and Packt

Please don’t forget to write your feedback/review on Amazon.


I am grateful to all of those with whom I have had the pleasure to work during this project. This book would not be possible without Packt team who found me and offered to take up the writing. I say thank you to Devika Battike, Manish Shanbhag, Heramb Bhavsar and Prateek Bharadwaj for supporting and helping me along the way.

A special thank goes to Edvaldo Alessandro Cardoso, an author of two previous editions, for an active participation and for being a technical reviewer together with Tomica Kaniski. I could not have finished this edition without your help.

In addition, I wish to mention the Microsoft team for helping to make this book as accurate as possible, in particular: Steven Ekren, Elden Christensen Sai Prasanna Vudataneni, Krupesh Dhruva and Sonal Agarwal. I am pretty sure our long discussions and your feedbacks will be appreciated by readers.

I have worked nonstop on the book for the last months and truly couldn’t survive without my family. Nobody has been more important to me than you. Thank you very much for your support, inspiration and love.

What this book covers
  • Chapter 1, VMM 2016 Architecture, provides an understanding of the VMM modular architecture, which is useful when designing VMM and troubleshooting deployment. This chapter also covers all requirements that must be satisfied to make a private cloud.
  • Chapter 2, Upgrading from Previous Versions, walks through all the necessary steps to upgrade the previous version of Virtual Machine Manager to the new VMM 2016, covering its database, highly available configurations and post-upgrade tasks.
  • Chapter 3, Installing VMM 2016, focus on deploying VMM and it’s dependencies. It gives also a plenty of tips and tricks to install and automate VMM and SQL Server deployments in both Windows Server Core and Full environments.
  • Chapter 4, Installing a High Available VMM Server, dives into more advanced VMM configuration, and provides an understanding how VMM has become a critical part of the private cloud infrastructure. You will also learn how to make a highly available library server and VMM configuration database.
  • Chapter 5, Configuring Fabric Resources, discusses building a new fabric in VMM by configuring compute, storage and networking resources. It starts by adding hosts group and ends by creating a hyper-converged cluster with Storage Spaces Direct and Hyper-V. It also covers a deployment of a Network Controller providing a good start point for network virtualization implementation.
  • Chapter 6, Configuring Guarded Fabric, walks you through the recipes to help protect confidential data by deploying new shielded VMs as a part of Guarded Fabric consisting of Guarded Hosts and Host Guardian Service. It also discusses how to convert existing VMs to shielded and manage them through VMM.
  • Chapter 7, Deploying Virtual Machines and Services, provides information to help the administrator to create,deploy and manage private clouds, virtual machines, templates, and services in VMM 2016; it provides recipes to assist you in getting the most our of deployment.
  • Chapter 8, Managing VMware ESXi Hosts, shows you how to manage and make VMware recources available to private cloud deployments. It also covers converting VMware machines to Hyper-V (V2V), deploying virtual machines and templates, all from the VMM console.
  • Chapter 9, Managing Clouds, Fabric Updates, Resources, Clusters and the New Features of 2016, covers other new features of VMM 2016 such as Cluster OS Rolling upgrade and Production Checkpoints. You will also learn how to integrate VMM 2016 with Windows Azure Pack for VM Clouds management.
  • Chapter 10, Integration with System Center Operations Manager 2016, guides you through the steps required to complete integration of SCOM 2016 with VMM in order to enable monitoring of the private cloud infrastructure.

VMM 2016 Cookbook

Code Files


Adding an Azure Subscription in VMM

Since VMM 2012 R2 (update rollup 6), you can add Azure subscription to VMM and perform basic actions on Azure IaaS VMs.Both VMM 2012 R2 and VMM 2016 support only classic Azure VMs and you may find that even Management Portal button in the VMM console still points to an old Azure portal ( which is no longer available.

VMM 2016 doesn’t bring any new changes to this feature and provides the same functionality for Azure VMs management through VMM console. However, VMM 1801 (the latest version available in semi-annual channel)  introduced a support for ARM-based VMs and region specific Azure subscriptions.

So, you can manage both classic VMs and ARM-based VMs using Azure AD Authentication or management certificates in VMM 1801. In this article, we will cover how to manage classic Azure VMs from VMM 2012 R2/2016, and then we briefly discuss new changes in VMM 1801 release.

What do you need?

  •  The console computer where this feature will be installed must have connectivity to the Internet in order to connect to the Azure Subscription
  • An active Azure subscription. For example, I’m using the one which goes with my MSDN subscription. You can also use a free Azure subscription.
  • You must be at least a Service Administrator for the Microsoft Azure Subscription being added. For example, I’m an owner of my subscription and no actions needed.
  • Microsoft Azure Subscription must have a Management Certificate associated with it in order to allow VMM to use the service management API in Microsoft Azure (will complete this later in this post)
  • The certificate needs to be present in the Current User \ Personal store of the computer running the VMM console. (will complete this later in this post)
  • The Management Certificate that is associated with the Azure Subscription must be present in the local certificate store on the computer that the wizard is being run on (will complete this later in this post)

How to do it?

  • On the VMM Server, open PowerShell with administrative privileges, and run the following to request a new self-signed certificate and add it to Personal store :
#This password will be used for PFX file
$pass= ConvertTo-SecureString -String "P@ssw0rd1" -AsPlainText -Force 

#New self-signed certificate
$cert = New-SelfSignedCertificate -FriendlyName  -Subject -CertStoreLocation "Cert:\CurrentUser\My" -Type Custom -KeyExportPolicy ExportableEncrypted -KeyLength 4096 -KeySpec KeyExchange

#Export PFX (if you plan to connect from another machine, import this PFX to the Personal store on your computer)
Export-PfxCertificate -Cert $cert  -FilePath C:\Cert\AzuretoVMM.pfx -Password $pass

#Export CER file which will be uploaded to Azure
Export-Certificate  -Cert $cert  -Type CERT -FilePath C:\Cert\RLVMM.cer
  • In the Azure Portal, go to Subscriptions –> Management Certificates and select C:\Cert\RLVMM.cer to upload. Once uploaded, copy your subscription ID as shown in the picture:

add azure subscription_1

  • Switch back to the VMM Console, navigate to VMs and Services and right click on Azure Subscriptions and select Add Subscription; type a display name of the subscription, paste Subscription ID and select the certificate that has been already added to the Personal store (VMM console automatically discovers all eligible certificates). If no certificates are shown, check certificates and their thumbprints in the Personal store (certmgr.msc)

add azure subscription_2

Note: Certificates and subscription setting information is stored in the Registry under HKEY_CURRENT_USER and is per login specific. This means that subscriptions that are added are visible on a per-machine, per-login basis.

  • Verify that new subscription has been added. If you have classic VMs running under the subscription, you will see a list of such VMs in the VMM.

As you can see in the following screenshot, actions are limited to Start, Stop, Shut Down, Restart and Connect via RDP


Note: Public and Internal IP addresses as well as VM size and other information is shown on the details pane

  • Repeat the same steps to add another subscription if needed.

What’s new in VMM 1801?

Unlike VMM 2012R2/2016, VMM 1801 supports management of Azure subscriptions and ARM-based VMs (which are the default in Azure now) through Azure Active Directory and region-specific Azure subscriptions. (namely Germany, China,  US Government Azure regions). VMM 1801 has also updated Azure Subscription wizard and now you can select between two authentication types: certificate-based or Azure AD-based. If Azure AD is selected, you don’t need to create and upload the certificate to Azure. Otherwise, use the steps above to integrate VMM 1801 with Azure using management certificate authentication.

To enable Azure AD-based authentication, you need to create AD Application using Azure Portal. Use the following step to create the AD Application:

  • Click on Azure Active Directory, go to App Registrations and click on New Application Request, then type an app name (for example, VMM1801) and sign-on URL (I used “fake” – and it works. You can change it later)
  • Go back to App Registration, switch to All Apps and copy the Application ID of the app you have just created.
  • In the Application properties, click on Settings, and then Keys; provide key description and duration, and click on Save; copy the key value

add azure subscription_5

  • In the Azure Portal, go to Properties of Azure AD and copy the Directory ID
  • Assign application to Classic Virtual Machine Contributor and Virtual Machine Contributor roles (Subscription – Access Control (IAM) – Add)
  • Open VMM Console and press Add Subscription, paste Subscription ID, Application ID, Directory ID and Key Value to the corresponding fields as shown in the screenshot:

add azure subscription_4

Note: Using Select Azure cloud drop-down list you can choose Azure reqion (Public, China, Germany or Government)

Once subscription is added to VMM, you can manage both classic and ARM based VMs in VMM 1801:

add azure subscription_6

Note: you might have noticed that instead of Shutdown action VMM 1801 offers Stop and Deallocate which is more preferable for Azure VMs. Also, MS fixed Management Portal button and now it’s linked to 🙂

That’s it. I hope this post will be helpful for someone Улыбка.

%d bloggers like this: