Deploy a VM from the Azure Marketplace

Azure Marketplace

When we create a new virtual machine within the Azure environment, we can use the Azure Marketplace. Services and software are available in the Azure Marketplace, which you can deploy within an environment. For virtual machines, Windows operating systems, Open source variants and also 3rd party appliances are available.

Create my first Windows virtual machine

From the Azure portal, we can view the Azure Marketplace.

The Azure Marketplace from the Azure portal

Search within the Azure Marketplace
For example, search for “Windows”

In this example, I’m going to create my first Windows virtual machine. What do I need to know/have?

  1. A valid Azure subscription (PayG, NCE/CSP, EA, etc…)
  2. What operating system do you need?
Deploy a VM from the Azure Marketplace

Overview of all the different image types of Windows Server in the Azure Marketplace.

Suppose we are going to build a new server based on Windows Server 2022, then we can easily select the right variant in the Azure Marketplace. But what are the differences? Small disk, Azure Edition Hotpatch, Core edition…how do I make the right choice?

A quantity of storage is linked per variant. By default, a virtual machine gets 127 GiB of OS disk. In a number of cases that is too much, for example when you choose the Core edition of Windows. A small(er) OS disk is sufficient. You then choose the option [smalldisk].

The different variants in the Azure Marketplace can also be seen with, for example, Powershell.

Login-AzAccount
Select-AzSubscription -Subscription “###############”

#———————————————
#Set Azure Location
$Location = “West Europe”
$PublisherName = “MicrosoftWindowsServer”

Get-AzVMImageOffer -Location $Location -PublisherName $PublisherName

Connect to the Azure subscription. Then specify the region in which you want to build the virtual machine, for example, Western Europe.

Now the OfferName and PublisherName values are important. All Marketplace images have an Offer, Publisher, SKU, and version. First we will make an overview of all Offers within the Publisher MicrosoftWindowsServer.

Overview of all Offers of publisher WindowsServer.

Here we choose the Offer WindowsServer and make an overview of all SKUs within this Offer.

#———————————————
#Set Azure Location
$Location = “West Europe”
$PublisherName = “MicrosoftWindowsServer”
$OfferName = “WindowsServer”

Get-AzVMImageSku -Location $Location -PublisherName $PublisherName -Offer $OfferName | Select Skus

Overview of all image SKUs of offer MicrosoftWindowsServer

Here we choose 2022-datacenter-azure-edition-hotpatch. As a final step, we can make an overview of all versions within this SKU.

can make an overview of all versions within this SKU.Deploy a VM from the Azure Marketplace
If you want to deploy the latest version available, then use the variable latest instead of the version number.

All image details at a glance.
Before we can rollout an image from the Azure Marketplace, the Terms must first be accepted.

Get-AzMarketplaceterms -Publisher $PublisherName -Product $OfferName -Name $skuName

The Terms have not yet been accepted for the image in question.

Set-AzMarketplaceTerms -Publisher $PublisherName -Product $OfferName -Name $skuName -Accept

The Terms have been accepted and the image can be rolled out.

The Terraform code for deploying the appropriate image in Azure.

Because we use the Azure Hotpatching image, the patch mode must be indicated in the code.

Since we’re going to use Azure Hot Patching, we need to add another line to the Terraform code (line 64).

The first virtual machine with associated resources was successfully deployed.

The various resources rolled out with Infrastructure as Code.

The new server is running in Azure.

OS disk of server mss-azhp-22-01.

Now let’s rollout the same virtual machine, but with a different image SKU. Namely 2022-datacenter-azure-edition-hotpatch-smalldisk. The virtual machine is named mss-azhp-22-02.

Changed the SKU image to smalldisk.

Overview of the Plan, Offer, and Publisher per server in Azure.

The difference in OS disk size can be clearly seen here.

  • 2022-datacenter-azure-edition-hotpatch – 127 GiB
  • 2022-datacenter-azure-edition-hotpatch-smalldisk – 30 GiB

The number of IOPS (Read/Write operations) is also different

  • 2022-datacenter-azure-edition-hotpatch – 500 IOPS
  • 2022-datacenter-azure-edition-hotpatch-smalldisk – 120 IOPS

The throughput on the OS disk is different

  • 2022-datacenter-azure-edition-hotpatch – 100 MBps
  • 2022-datacenter-azure-edition-hotpatch-smalldisk – 25 MBps

The cost on the OS disk is different

  • 2022-datacenter-azure-edition-hotpatch – P10 (128 GiB)
  • 2022-datacenter-azure-edition-hotpatch-smalldisk – P4 (32 GiB)
  • The burst IOPS and throughput are the same!

Wrap up

Deploying a virtual machine in Azure can be done in multiple ways. Ofcourse via the Azure portal, where you can select most of the configuration yourselves. The fastest and most flexible way is through Infrastructure as Code (in this example, Terraform), but it can also be Bicep, Azure Resource Manager, or Powershell. You then have more influence on naming convention of the Azure resources and you can quickly and consistently rollout your virtual machines.

The choice of image SKU is of great importance when designing the workload and associated virtual machines. Determine a number of crucial variables in advance, such as:

  • what OS am i going to use
  • which version
  • with graphical user interface (GUI) or not (Core edition)
  • required IOPS
  • required storage capacity
  • disk throughput
  • what are the monthly costs of the Azure resources

If all variables are clear, then rolling out the necessary virtual machines is the last step. Spending a bit of time in preparation is therefore very important. Thansk for supporting my blog and feel free to reach out to me on my socials!

Install and configure ADDS on Windows Server 2022 Core in Azure (Part 2)

A question I often get is ‘why should I use Windows Server Core edition’? This is difficult to manage and I do not like a server without a graphical interface.

The first thing I always tell you is, you DON’T HAVE to do anything, but my advice is to do it. Especially for a number of crucial server roles.

Some advantages of Windows Server Core edition at a glance:

Continue reading “Install and configure ADDS on Windows Server 2022 Core in Azure (Part 2)”

Install and configure ADDS on Windows Server 2022 Core in Azure (Part 1)

Today, I’m going to show you how to install and configure Active Directory Domain Services on Windows Server 2022 Core edition on Azure.

I’ve used some ARM templates to deploy my two domain controllers in Azure, based on Windows Server 2022 Core edition. These servers are in a separate subnet within my Azure environment. In this example, Í’ve two domain controllers, mss-dc-core001 and mss-dc-core002.

Continue reading “Install and configure ADDS on Windows Server 2022 Core in Azure (Part 1)”

How to: Remove ‘old’ RDS server from farm

When you delete a old RDS Session Host server from your environment whitout first deleting the server from your RDS Farm, you’ll receive the following error:

image

Install SQL Management Studio on your RDS Connection Broker and connect to the following server name:

\\.\pipe\MICROSOFT\##WID\tsql\query

2019-02-13_16h22_03

Create a new query:

SELECT TOP 1000 [Id],[Name] FROM [RDCms].[rds].[Server]

image

Here you can see all your servers in your RDS Farm. Notice the Id of your ‘old’ server. In this example it is server ‘RDS-01’ with ID 2.

Create a new query:

use RDCms;
delete from rds.RoleRdsh where ServerID = ‘2’;

image

Start Powershell on your RDS Broker server and type:

Get-RDServer

image

Now you can open your Server Manager again and manage your RDS Farm!

Build a virtual S2D cluster with Windows Server 2019 build 17744

Windows Server 2016 and 2019 Storage Sapces Direct (S2D) allows building HA storage systems using storage nodes with local storage, such as SATA or SSD disks.

In this blogpost, I’ll deploy a two node S2D cluster based on Windows Server 2019 build 17744. The main machine is a HP ProBook 450 G5 with Windows 10, 16 GB memory, 512 GB SSD disk, and Hyper-V enabled.

First of all, I’ve deployed the following virtual machines:

  • S2D-W2019-DC01 (Domain Controller, DNS, Group Policies)
    IP address: 172.16.0.100
  • S2D-W2019-HV01 (Hyper-V host, S2D node)
    IP address: 172.16.0.101 (LAN)
    IP address: 10.10.0.101 (Live Migration)
  • S2D-W2019-HV02 (Hyper-V host, S2D node)
  • IP address: 172.16.0.102 (LAN)
    IP address: 10.10.0.102 (Live Migration)

All the servers are installed with Windows Server 2019 build 17744. The first server I’ve configured is the domain controller. My internal domain is s2dlab.local.

For both S2D nodes (S2D-W2019-HV01 and S2D-W2019-HV02), you’ve to configure some additional settings, because this servers are virtual. So we’re going to run Hyper-V in Hyper-V and on that Hyper-V host there’re some guest virtual machines (nested virtualization) 😀 Cool stuff!!!


$S2DHOST1 = 'S2D-W2019-HV01'
$S2DHOST2 = 'S2D-W2019-HV02'

# List all virtual machines
Get-VM

# Enable nested virtualization on virtual machines
Set-VMProcessor -VMName $S2DHOST1 -ExposeVirtualizationExtensions $true
Set-VMProcessor -VMName $S2DHOST2 -ExposeVirtualizationExtensions $true

Next, you’ve to Configure the following settings within the VM configuration:

  • Disable dynamic memory;
  • Set the number of virtual processors to 2 or 4;
  • Turn on MAC address spoofing on your network interface(s);

           

Now the domain controller is up and running and both S2D nodes are installed and configured with Windows Server 2019, it’s time to add some storage. Both servers have 3 x 50 GB virtual disks attached! Note!! this is only for testing and demo!! 

So we’ve 300 GB storage available for our S2D cluster. After this is done, you can install the following roles and features within Windows Server:

  • (Role) File and Storage Services;
  • (Role) Hyper-V;
  • (Feature) Failover Clustering;

           

Now all the components are ready to build the cluster. It’s recommended to run the cluster validation before building your cluster! The name of my cluster is ‘S2D-CL01’ with IP address 172.16.0.200/16. Note!! Uncheck the option ‘Add all eligible storage to the cluster’!!

The cluster is up and running. As you can see within your Active Directory and DNS configuration, there’re three computer objects (two cluster nodes and one Failover Cluster object).

                 

The last step before enabling ‘S2D’ on our cluster is checking the disk configuration.


# List all available disks within the cluster nodes
Get-PhysicalDisk

# Enable Storage Spaces Direct on the cluster
Enable-ClusterS2D

# List all Storage Pools within the S2D cluster
Get-Storagepool S2D*

     

Now our cluster is Storage Spaces Direct (S2D) enabled. The last step is to create a virtual disk within our Storage Pool and add it as a Cluster Shared Volume (CSV) to the cluster, wo we can store workloads on it! Bacause we’ve a two node cluster, the only Resiliency type is Two-Way Mirror.

                 

Wrap Up:

In this blogpost we’ve builded a two nodes virtual Storage Spaces Direct cluster in Hyper-V (Windows 10). The S2D nodes are running Windows Server 2019. It’s really a nice opportunity to run this configuration virtual on your laptop or desktop, while nested virtualization is supported and it works great!!

In the next blogpost I’ll show you to install and configure a virtual machine within our S2D cluster. Also performing some live migrations to show the high availability and resiliency of our setup!

Demo movie: Storage Spaces Direct in Windows Server 2016

The following movie shows the power of Storage Spaces Direct in Windows Server 2016. From the local disks, to storage pools and cluster, all the layers are explained!! Very useful when you want to know exactly how Storage Spaces Direct (S2D) works.

Software Defined will be the feature! So prepare yourself….. 🙂

Microsoft Ignite 2016 Slidedeck and Video downloader

MSIgnite_Atlanta_Skyline_Jan20_TW

Have you missed the Microsoft Ignite 2016 event…..no problem!! MVP Michel de Rooij has created a script to download all the content (videos and slidedecks). So you can watch all the content again.

This script will download all the Ignite 2016 slidedecks and videos that are available from Techcommunity via the OneDrive URL on the session page. Video downloads will leverage a utility which can be downloaded from https://yt-dl.org/latest/youtube-dl.exe, and put it in the same folder as the script. The script itself will try to download the utility when the utility is not present.

Special credits goes to:
Original scraper for slidedecks by Mattias Fors, http://deploywindows.info.
Adjusted for video downloading by Michel de Rooij, http://eightwone.com
Enhancements by Scott Ladewig http://ladewig.com

Download the script here.

2016-10-12_14h14_44