Tag: Windows Server 2012

End of Support Windows Server 2012 Extended Security Updates for Windows Server and SQL Server in Azure and Azure Stack

Extended Security Updates for Windows Server and SQL Server in Azure and Azure Stack

Windows Server is an essential workload platform for almost every organization, and is one of the most popular operating systems in Azure. Microsoft Azure and Azure Stack HCI offer additional benefits to Windows Server such as the Windows Server 2022 Azure Edition which includes features like hotpatch as part of Azure Automanage and many other things. An additional capacity of running Windows Server in Azure or on Azure Stack HCI, Hub, and Edge, is that you get extended security updates (ESU) included for free for Windows Server and SQL Server which are out of mainstream support. This applies to Windows Server 2008 and 2008 R2 and will soon apply to Windows Server 2012 and 2012 R2 when it reaches end of support, plus the corresponding versions of SQL Server.

Let’s have a quick look at your options with End of Support for Windows Server 2012, 2012 R2 and SQL Server 2012. In this blog I tried to provide you with a brief overview as well as links to the necessary resources.

Disclaimer: This post is only to help customer to find the right resources and evaluate their options. Only information from official Microsoft resources are valide.

End of Support for Windows Server 2012, 2012 R2 and SQL Server 2012

SQL Server 2012 and Windows Server 2012, and 2012 R2 End of Extended support is coming:

  • SQL Server 2012 Extended Support will end on July 12, 2022.
  • Windows Server 2012 and 2012 R2 Extended Support will end on October 10, 2023.
End of Support Windows Server and SQL Server 2012
End of Support Windows Server and SQL Server 2012

Options for SQL Server 2012 and Windows Server 2012 End of Support

The best way to address this is of course to upgrade and modernize the latest versions of SQL Server 2022 and Windows Server 2022 or modernize to Azure PaaS services. However, some organizations need some additional time to modernize their platform and environment. For these customer Microsoft offers Extended Security Updates (ESU).

  • In Azure and on-premises (hybrid): Customers running SQL Server 2012 and Windows Server 2012 and 2012 R2 in Azure will get Extended Security Updates for free. Free Extended Security Updates are available for Azure Virtual Machines including Azure Dedicated Host, Azure VMWare Solution, Azure Nutanix Solution, and Azure Stack (Hub, Edge, and HCI).
  • On-premises (no Azure): Customers with active Software Assurance or subscription licenses can purchase Extended Security Updates annually for 75 percent of the license cost of the latest version of SQL Server or Windows Server for the first year, 100 percent of the license cost for the second year, and 125 percent of the license cost for the third year. Customers pay for only the servers they need to cover, so they can reduce costs each year as they upgrade parts of their environment.

You can learn more on the blog from Debbi Lyons (Director, Product Marketing, Azure SQL and Database Migration) and Vijay Kumar (Director, Product Marketing, Windows Server and Azure Arc) here.

End of Support Windows Server 2012 Extended Security Updates for Windows Server and SQL Server in Azure and Azure Stack
End of Support Windows Server 2012 Extended Security Updates for Windows Server and SQL Server in Azure and Azure Stack

If you are looking at a migration to Microsoft Azure, check out my YouTube video on how to migrate servers to Azure using Azure Migrate.

Obtain Windows Server and SQL Server 2012 Extended Security Updates (ESU)

  • In Azure, you can obtain Windows Server Extended Security Updates automatically to your Azure virtual machine through Windows Server Update Service. 
  • Get your SQL Server Extended Security Updates in Azure by registering your subscription with the SQL Server IaaS Agent extension. Learn more about registering your SQL Server virtual machine with the IaaS Agent extension.
  • On-premises, your Windows Server Extended Security Updates will be delivered as any regular Windows Server Update.  
  • On-premises SQL Server Extended Security Updates can be obtained by connecting your SQL Server to Azure Arc.

Additional Resources

  • Support for Windows Server 2012, Windows Server 2012 R2, and SQL Server 2012 Extended Security Updates (ESU) on Azure Stack HCI was announced during Microsoft Ignite 2021.
  • You can learn more about Extended Security Updates (ESU) and end-of-support for Windows Server 2012/2012 R2 and SQL Server 2012 on microsoft.com.
  • If you want to learn how to use Extended Security Updates (ESU) for Windows Server, check out Microsoft Docs.

Conclusion

I hope this blog provides you with an overview of you option for the end-of-support for Windows Server 2012, 2012 R2 and SQL Server 2012, and how you can leverage Azure and Azure Stack to get free Extended Security Updates (ESU). If you have any question, feel free to leave a comment below.



Windows Server FTP

Install FTP Server on Windows Server

Windows Server has IIS build in, which also offers an FTP server option. The File Transfer Protocol (FTP) is still a very popular protocol that allows users to simply upload and download files. Of course today you have more modern options, however, it is still very often used and a lot of legacy applications still support it. In this blog post, I wanna quickly go rough how you can install the FTP Server on Windows Server. I do this on a brand new Windows Server 2019 operating system, however, it didn’t really change since early Windows Server versions.

Install FTP Server Feature on Windows Server

Install FTP on Windows Server using PowerShell

First, you will need to install the FTP feature. I usually simply do that using PowerShell to install the FTP Server feature in Windows Server. You can also do that using the Server Manager. However, if you want to use PowerShell, you can use the following command:

 
Install-WindowsFeature Web-Ftp-Server -IncludeAllSubFeature -IncludeManagementTools -Verbose


VM Network Adapter

PowerShell One-liner to list IP Addresses of Hyper-V Virtual Machines

Here a very quick PowerShell command to list all the Virtual Network Adapters, including IP Addresses of Virtual Machines running on a Hyper-V Host.

 
Get-VM -ComputerName "Hyperv01" | Get-VMNetworkAdapter

This will give you a list of all Virtual Machines running on Hyper-V Server called “HyperV01”



sysprep.exe vm mode

Windows Sysprep for Virtual Machines

For using the same system image for different virtual machines or physical computer, Microsoft created a tool called sysprep.exe. This blog post covers Most people should be already familiar with that tool. If not here is the description:

Sysprep prepares a Windows installation (Windows client and Windows Server) for imaging, allowing you to capture a customized installation. Sysprep removes PC-specific information from a Windows installation, “generalizing” the installation so it can be reused on different PCs. With Sysprep you can configre the PC to boot to audit mode, where you can make additional changes or updates to your image. Or, you can configure Windows to boot to the Out-of-Box Experience (OOBE).

This is great so you can sysprep a virtual machine copy the VHD or VHDX file and use it for the first boot of different VMs. In Windows Server 2012 and Windows 8, Microsoft added an addition to sysprep called the mode switch “/mode:vm”. The mode:vm switch allows you to identify the Windows as a Virtual Machine and sysprep.exe will generalize a Virtual Hard Disk (VHD or VHDX) so that you can deploy the VHD as a VHD on the same Virtual Machine (VM) or hypervisor. You must deploy the VHD on a Virtual Machine (VM) or hypervisor with the same hardware profile. For example, if you created VHD in Microsoft Hyper-V, you can only deploy your VHD to Microsoft Hyper-V VMs with a matching hardware profile, and you can only run VM mode from inside a VM.

This will boost the performance and time for the virtual machine for the first startup and installation. This also work of course with virtual machines running on other hypervisors such as VMware or Xen.

Run the following command inside the Virtual Machine (You find sysprep.exe in the  C:\Windows\System32\Sysprep folder):

 
sysprep.exe /oobe /generalize /shutdown /mode:vm

Now you can copy the VHD or VHDX file from that virtual machine and use it for other VMs. Also check out my post about automating VM creation using an unattend.xml file.



Get-NetIPConfiguration

Basic Networking PowerShell cmdlets cheatsheet to replace netsh, ipconfig, nslookup and more

Around 4 years ago I wrote a blog post about how to Replace netsh with Windows PowerShell which includes basic powershell networking cmdlets. After working with Microsoft Azure, Nano Server and Containers, PowerShell together with networking becomes more and more important. I created this little cheat sheet so it becomes easy for people to get started.

Basic Networking PowerShell cmdlets

Get-NetIPConfiguration

Get the IP Configuration (ipconfig with PowerShell)

Get-NetIPConfiguration

List all Network Adapters

Get-NetAdapter

Get a spesific network adapter by name

Get-NetAdapter -Name *Ethernet*

Get more information VLAN ID, Speed, Connection status

Get-NetAdapter | ft Name, Status, Linkspeed, VlanID

Get driver information

Get-NetAdapter | ft Name, DriverName, DriverVersion, DriverInformation, DriverFileName

Get adapter hardware information. This can be really usefull when you need to know the PCI slot of the NIC.

Get-NetAdapterHardwareInfo

Disable and Enable a Network Adapter

Disable-NetAdapter -Name "Wireless Network Connection"
Enable-NetAdapter -Name "Wireless Network Connection"

Rename a Network Adapter

Rename-NetAdapter -Name "Wireless Network Connection" -NewName "Wireless"

IP Configuration using PowerShell

PowerShell Networking Get-NetIPAddress

Get IP and DNS address information

Get-NetAdapter -Name "Local Area Connection" | Get-NetIPAddress

Get IP address only

(Get-NetAdapter -Name "Local Area Connection" | Get-NetIPAddress).IPv4Address

Get DNS Server Address information

Get-NetAdapter -Name "Local Area Connection" | Get-DnsClientServerAddress

Set IP Address

New-NetIPAddress -InterfaceAlias "Wireless" -IPv4Address 10.0.1.95 -PrefixLength "24" -DefaultGateway 10.0.1.1

or if you want to change a existing IP Address

Set-NetIPAddress -InterfaceAlias "Wireless" -IPv4Address 192.168.12.25 -PrefixLength "24"

Remove IP Address

Get-NetAdapter -Name "Wireless" | Remove-NetIPAddress

Set DNS Server

Set-DnsClientServerAddress -InterfaceAlias "Wireless" -ServerAddresses "10.10.20.1","10.10.20.2"

Set interface to DHCP

Set-NetIPInterface -InterfaceAlias "Wireless" -Dhcp Enabled

Clear DNS Cache with PowerShell

You can also manage your DNS cache with PowerShell.

List DNS Cache:

 
Get-DnsClientCache

Clear DNS Cache

 
Clear-DnsClientCache

Ping with PowerShell

PowerShell Networking Test-NetConnection Ping

How to Ping with PowerShell. For a simple ping command with PowerShell, you can use the Test-Connection cmdlet:

 
Test-Connection thomasmaurer.ch

There is an advanced way to test connection using PowerShell

Test-NetConnection -ComputerName www.thomasmaurer.ch

Get some more details from the Test-NetConnection

Test-NetConnection -ComputerName www.thomasmaurer.ch -InformationLevel Detailed

Ping multiple IP using PowerShell

1..99 | % { Test-NetConnection -ComputerName x.x.x.$_ } | FT -AutoSize

Tracert

PowerShell Tracert

Tracert with PowerShell

Test-NetConnection www.thomasmaurer.ch –TraceRoute

Portscan with PowerShell

PowerShell Portscan

Use PowerShell to check for open port

Test-NetConnection -ComputerName www.thomasmaurer.ch -Port 80
Test-NetConnection -ComputerName www.thomasmaurer.ch -CommonTCPPort HTTP

NSlookup in PowerShell

PowerShell Networking NSlookup

NSlookup using PowerShell:

Resolve-DnsName www.thomasmaurer.ch
Resolve-DnsName www.thomasmaurer.ch -Type MX -Server 8.8.8.8

Route in PowerShell

PowerShell Networking Route

How to replace Route command with PowerShell

Get-NetRoute -Protocol Local -DestinationPrefix 192.168*
Get-NetRoute -InterfaceAlias Wi-Fi
 
New-NetRoute –DestinationPrefix "10.0.0.0/24" –InterfaceAlias "Ethernet" –NextHop 192.168.192.1

NETSTAT in PowerShell

PowerShell Networking Netstat

How to replace NETSTAT with PowerShell

Get-NetTCPConnection
Get-NetTCPConnection –State Established

NIC Teaming PowerShell commands

Create a new NIC Teaming (Network Adapter Team)

New-NetLbfoTeam -Name NICTEAM01 -TeamMembers Ethernet, Ethernet2 -TeamingMode SwitchIndependent -TeamNicName NICTEAM01 -LoadBalancingAlgorithm Dynamic

SMB Related PowerShell commands

SMB PowerShell SMB Client Configuration

Get SMB Client Configuration

Get-SmbClientConfiguration

Get SMB Connections

Get-SmbConnection

Get SMB Mutlichannel Connections

Get-SmbMutlichannelConnection

Get SMB open files

Get-SmbOpenFile

Get SMB Direct (RDMA) adapters

Get-NetAdapterRdma

Hyper-V Networking cmdlets

Hyper-V PowerShell Get-VMNetwork Adapter

Get and set Network Adapter VMQ settings

Get-NetAdapterVmq
# Disable VMQ
Set-NetAdapterVmq -Enabled $false
# Enable VMQ
Set-NetAdapterVmq -Enabled $true

Get VM Network Adapter

Get-VMNetworkAdapter -VMName Server01

Get VM Network Adapter IP Addresses

(Get-VMNetworkAdapter -VMName NanoConHost01).IPAddresses

Get VM Network Adapter Mac Addresses

(Get-VMNetworkAdapter -VMName NanoConHost01).MacAddress

I hope you enjoyed it and the post was helpful, if you think something important is missing, please add it in the comments.



Hyper-V VM Switch

Change Hyper-V VM Switch of Virtual Machines using PowerShell

This is one of the first post of a short blog series with some simple PowerShell scripts and oneliners for Hyper-V. One this is how you can connect a Virtual Network Adapter of a Hyper-V Virtual Machine to another Virtual Switch.

This is very simple, with this command you can see all the Network Adapters of the Virtual Machine and to which Switch they are connected:

 
Get-VM "VM01" | Get-VMNetworkAdapter

With this command you can connect it to another Switch:

 
Get-VM "VM01" | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName "NewSwitch"

Now of course you can also do this for all Virtual Machines running on a Hyper-V host:

 
Get-VM | Get-VMNetworkAdapter
 
Get-VM | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName "NewSwitch"
 
Get-VM | Get-VMNetworkAdapter


PowerShell

Move multipe Hyper-V Virtual Machines with Live Storage Migration via Windows PowerShell

Well I was working in on a Private Cloud Deployment where we had some temporary storage for our Hyper-V Virtual Machines and after we got the right storage ready, which was btw a Windows Server Scale-Out File Server Cluster running with Storage Spaces and DataON JBOD chassis, we had to migrate the storage of all virtual machines running on our Hyper-V hosts. Since Windows Server 2012 offers Live Storage Migration which allows us to move the Virtual Machine to a different storage location without downtime we would use that. But if you have to move around 20 virtual machines you think twice if you want to move that via the Hyper-V Manager GUI or Windows PowerShell.

Here is a pretty simple PowerShell foreach loop which moves the storage of all virtual machines running on the Hyper-V host.

 
#New Storage Location
$StoragePath = "\\SMB01\VMs01\"
#VMs which will be migrated Get-VM will migrate all VMs
$VMs = Get-VM
 
Foreach ($VM in $VMs) {
$VMStorage = $StoragePath + $VM.Name
Write-Host "Moving VM:" $VM.name "to" $VMStorage
Move-VMStorage -VMName $VM.name -DestinationStoragePath $VMStorage
}


CDN Consistent Device Naming

Cisco UCS supports Consistent Device Naming (CDN)

Yesterday I posted about Cisco UCS supporting RDMA (SMB Direct) with firmware version 2.2(4b)B. Walter Dey, former Cisco Distinguished Engineer at Cisco informed me not only about the RDMA feature he also showed me that Cisco UCS now supports Consistent Device Naming which was introduced with Windows Server 2012. Consistent Device Naming (CDN) allows Ethernet interfaces to be named in a consistent manner. This makes Ethernet interface names more persistent when adapter or other configuration changes are made. To use CDN in Cisco UCS you need to run firmware version 2.2(4b)B. This will help to make it a lot easier to identify network interfaces used with Windows Server 2012 R2 and Hyper-V.



Cisco UCS Hardware

Cisco UCS supports RoCE for Microsoft SMB Direct

As you may know we use SMB as the storage protocol for several Hyper-V deployments using Scale-Out File Server and Storage Spaces which adds a lot value to your Hyper-V deployments. To boost performance Microsoft is using RDMA or SMB Direct to accelerate Storage network performance.

RDMA over Converged Ethernet (RoCE) allows direct memory access over an Ethernet network. RoCE is a link layer protocol, and hence, it allows communication between any two hosts in the same Ethernet broadcast domain. RoCE delivers superior performance compared to traditional network socket implementations because of lower latency, lower CPU utilization and higher utilization of network bandwidth. Windows Server 2012 and later versions use RDMA for accelerating and improving the performance of SMB file sharing traffic and Live Migration. If you need to know more about RDMA or SMB Direct checkout my blog post: Hyper-V over SMB: SMB Direct

With Cisco UCS Manager Release 2.2(4), Cisco finally supports RoCE for SMB Direct. It sends additional configuration information to the adapter while creating or modifying an Ethernet adapter policy.

Guidelines and Limitations for SMB Direct with RoCE

  • SMB Direct with RoCE is supported only on Windows Server 2012 R2.
  • SMB Direct with RoCE is supported only with Cisco UCS VIC 1340 and 1380 adapters.
  • Cisco UCS Manager does not support more than 4 RoCE-enabled vNICs per adapter.
  • Cisco UCS Manager does not support RoCE with NVGRE, VXLAN, NetFlow, VMQ, or usNIC.
  • You can not use Windows Server NIC Teaming together with RMDA enabled adapters in Windows Server 2012 and Windows Server 2012 R2 or you will lose RDMA feature on these adapters.
  • Maximum number of queue pairs per adapter is 8192.
  • Maximum number of memory regions per adapter is 524288.
  • If you do not disable RoCE before downgrading Cisco UCS Manager from Release 2.2(4), downgrade will fail.

Checkout my post about Hyper-V over SMB:



NIC Teaming

Overview on Windows Server and Hyper-V 2012 R2 NIC Teaming and SMB Multichannel

I know this is nothing new but since I had to mention the Whitepaper on NIC Teaming and the use of SMB Multichannel as well as the configuration with System Center Virtual Machine Manager in a couple of meetings I want to make sure you have an overview on my blog. Here is a no overview of Windows Server and Hyper-V NIC teaming and SMB Multichannel, to get redundant network configurations.

NIC Teaming

Windows Server NIC Teaming was introduced in Windows Server 2012 (Codename Windows Server 8). NIC teaming, also known as Load Balancing/Failover (LBFO), allows multiple network adapters to be placed into a team for the purposes of bandwidth aggregation, and/or traffic failover to maintain connectivity in the event of a network component failure.

NIC Teaming Recommendation

For designing, the default and recommended configuration is using NIC Teaming with Switch Independent and Dynamic, and in some scenarios where you have the write switches you can use LACP and Dynamic.

Download Windows Server 2012 R2 NIC Teaming (LBFO) Deployment and Management Whitepaper

This guide describes how to deploy and manage NIC Teaming with Windows Server 2012 R2.

You can find the Whitepaper on Windows Server 2012 R2 NIC Teaming (LBFO) Deployment and Management in the Microsoft Download Center.

SMB Multichannel

Hyper-V over SMB Multichannel

If you use Hyper-V over SMB, you can use SMB Multichannel as an even better mode to distribute SMB 3.0 traffic across different network adapters, or you could use a mix of both, NIC Teaming and SMB Multichannel. Check out my blog post about Hyper-V over SMB: SMB Multichannel, SMB Direct (RDMA) and Scale-Out File Server and Storage Spaces.

Configuration with System Center Virtual Machine Manager

Logical Switch

Some months back, I also wrote some blog post about configuration of Hyper-V Converged Networking and System Center Virtual Machine Manager. This guide will help you to understand how you deploy NIC Teaming with System Center Virtual Machine Manager using the Logical Switch on Hyper-V hosts.