Tag: Microsoft

Docker Desktop WSL 2 Tech Preview

Run Linux Containers with Docker Desktop and WSL 2

Today, Docker launched the first Tech Preview of the Docker Desktop WSL 2. This means you can now use Docker Desktop and the Windows Subsystem for Linux 2 (WSL2) which is using the hypervisor in the background to run Linux containers on Windows 10. With the significant changes to the Windows Subsystem for Linux 2, you can now take advantage of these improvements with your Docker Desktop client.

Docker Desktop WSL 2 is currently in Tech Preview, and it also requires the Windows 10 Insider Preview builds. That means you should only use for not production environments.

WSL 2 introduces a significant architectural change as it is a full Linux kernel built by Microsoft, allowing Linux containers to run natively without emulation. With Docker Desktop WSL 2 Tech Preview, users can access Linux workspaces without having to maintain both Linux and Windows build scripts.

Docker Desktop also leverages the dynamic memory allocation feature in WSL 2 to greatly improve the resource consumption. This means, Docker Desktop only uses the required amount of CPU and memory resources, enabling CPU and memory-intensive tasks such as building a container to run much faster.

You can find more information about the Tech Preview here.

Prerequisites

To run the Docker Desktop WSL 2 Tech Preview, you will need to set up the Windows Subsystem for Linux 2 (WSL 2) first. You can do that using the following guide, or follow these steps:

Install Windows 10 Insider Preview build 18932 or later.

Install the Windows WSL feature and the Windows Virtual Machine Platform feature running the following commands:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
 
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

Download WSL Linux distribution based on Ubuntu 18.04 from the Microsoft Store. You can read more about Linux on Windows 10 here. The distribution needs to be set as the default WSL distro.

Enable Virtual Machine Platform

Enable Virtual Machine Platform

Make sure that the WSL distro is running in WSL 2 mode. You can check the list of distros installed on your Windows 10 machine, with the following PowerShell command:

wsl -l -v

To set the distro to WSL 2, you can run the following command. Change the name of the distro:

wsl --set-version DistroName 2
Install WSL 2

Install WSL 2

To find out more about installing WSL 2, check out the Microsoft Docs page.

How to set up Docker and WSL 2

First, you will need to download the Docker Desktop WSL 2 Tech Preview here. Make sure you already configured all the WSL 2 steps described in the prerequisites, before you install the Docker WSL 2 Tech preview. If you are prompted if you want to use Linux containers or Windows containers during the installation, select Windows containers. If you choose Linux containers, you will have the classic Docker experience with a Hyper-V VM.

Docker Desktop WSL 2 Tech Preview Menu

Docker Desktop WSL 2 Tech Preview Menu

Run the installation wizard, and after a successful installation, the Docker Desktop menu displays the WSL 2 Tech Preview option. You can select WSL 2 Tech Preview from that menu to start and configure the daemon running WSL 2.

Docker Desktop WSL 2 Tech Preview

Docker Desktop WSL 2 Tech Preview

You can switch between the classic daemon or the Windows Subsystem for Linux 2 with the following commands:

# Switch to classic deamon
 
docker context use default
 
# Switch to WSL 2
 
docker context use wsl
Linux Container on Windows 10

Linux Containers on Windows 10

You can now also do crazy things like run SQL Server on Linux in a Docker container on Windows 10.

SQL Server on Linux Docker Container Windows 10 WSL 2

SQL Server on Linux Docker Container Windows 10 WSL 2

I hope this gives you a good overview of how you will be able to run Linux containers on Windows in the future. Again this is still a Tech Preview, and we might see many changes to that feature. If you want to know more, read the full blog post on the Docker page. Also, check out the current Linux Container on Windows documentation. If you any questions, feel free to leave a comment.




AZ-400 Microsoft Certified Azure DevOps Engineer

Passed AZ-400 Microsoft Certified Azure DevOps Engineer

Today I manage to pass the last Azure AZ exam. This time I took exam AZ-400 Microsoft Azure DevOps Solutions, which gives you the Microsoft Certified Azure DevOps Engineer Expert certification. This exam is focused on Azure DevOps solutions, DevOps strategy, implementing DevOps development processes, implementing CI/CD, and much more.

AZ-400 Microsoft Azure DevOps Solutions

Candidates for this exam are DevOps professionals who combine people, process, and technologies to continuously deliver valuable products and services that meet end user needs and business objectives. DevOps professionals streamline delivery by optimizing practices, improving communications and collaboration, and creating automation. They design and implement strategies for application code and infrastructure that allow for continuous integration, continuous testing, continuous delivery, and continuous monitoring and feedback.

Candidates must be proficient with Agile practices. They must be familiar with both Azure administration and Azure development and experts in at least one of these areas. Azure DevOps professionals must be able to design and implement DevOps practices for version control, compliance, infrastructure as code, configuration management, build, release, and testing by using Azure technologies

You can find more about the exam and more details on the Microsoft Learning platform. If you successfully pass the AZ-400 exam, you will get the Microsoft Certified Azure DevOps Engineer Expert certification, where you can learn more about here.

How to prepare for the AZ-400 Microsoft Azure DevOps Solutions exam

Microsoft Learn DevOps

If you want to prepare for this exam, I have a couple of recommendations for you. First of all, Microsoft Learn DevOps modules. Microsoft Learn is a fantastic learning platform to make you familiar with not just Microsoft Azure technologies, but a lot of other Microsoft products and services. Secondly, there is an excellent Microsoft Course on OpenEDX called Implementing DevOps Development Processes, created by Microsoft MVP Tarun Arora. To get some hands-on experience, I highly recommend the Azure DevOps labs on azuredevopslabs.com. Last but not least, I also recommend the AZ-400 study notes from Gregor Suttie, they will help you to find the right content and focus.

As for every exam, start working with the product and try it out, this is always the most effective learning experience. If you need some free Azure credits, check out this page.

Azure Certifications

Microsoft offers different certifications depending on various job roles. If you are just getting started with Azure, I also highly recommend that you are doing AZ-900, which is the Azure Fundamentals exam.

I hope this gives you a quick overview of the AZ-400 Microsoft Azure DevOps Solutions exam, and if you have any questions, please let me know in the comments.



Thomas Maurer Speaking at Experts Live Europe

Speaking at Experts Live Europe 2019 in Prague

Today, I am proud to announce that I will be speaking at Experts Live Europe 2019 in Prague on November 20 – 22, 2019. This is a great honor, and it will be my 7th Experts Live Europe event I am speaking at, all the way back to the first event, when it still was called System Center Universe Europe. I have presented several sessions at each event previously hosted in Bern, Basel, Berlin, and Prague. This will be the second time Experts Live Europe will be hosted in the beautiful city of Prague, Czech Republic. I am looking forward to speaking at this Microsoft community event again. The conference has a strong focus on Microsoft Cloud, Datacenter, Security, and Modern Workplace topics and brings together the community from all over the world.

This year the conference will be three days again, with a pre-conference day including a couple of different pre-conference deep dives, as well as two main conference days with over 70 breakout sessions in 6 parallel tracks. This year the conference will have not only over 40 top expert speakers but also a vast Microsoft presence. You will not just find Microsoft Cloud Advocates and Program Managers, but people from all across the organization. Guess what, this is a perfect time to connect and network with us, but also with other members of the Microsoft community.

Another big highlight for me this year is the track specifically focusing on Windows Server and System Center, presented by Cloud Advocates, Program Managers, and Microsoft MVPs.

My sessions at Experts Live Europe 2019

I am happy that I will be speaking at Experts Live Europe 2019:

Windows Server 2019 - The Next Generation of Software-Defined Datacenter

Join this session for the best of Windows Server 2019, about the new innovation and improvements of Windows Server and Windows Admin Center. Learn how Microsoft enhances the SDDC feature like Hyper-V, Storage, and Networking and get the most out of the new Azure Hybrid Cloud Integration and Container features. You’ll get an overview of the new, exciting improvements that are in Windows Server and how they’ll improve your day-to-day job. In this presentation Thomas Maurer (Microsoft MVP) will guide you through the highly anticipated innovations in Windows Server 2019 and the Semi-Annual Channel including: ○ Windows Server Containers ○ Azure Integration ○ Hyper-V features ○ Storage ○ Networking ○ Security ○ Windows Admin Center And more!

If you want to know more about the event and register, check out the Experts Live Europe website. I hope to see you in Prague!



SSH Remote Edit File with Visual Studio Code

Remote Edit Files on Azure Linux VMs using VS Code

There are a lot of different ways to remote manage your Azure virtual machines using various tools and technics. In this blog post, I am going to show you how you can remotely edit files on Azure Linux virtual machines using Visual Studio Code. Visual Studio Code has a new Remote Development Extention which allows you to open any folder in a container, on a remote computer, or in the Windows Subsystem for Linux (WSL) and take advantage of the VS Code feature set. With the Remote – SSH extensions, you can easily browse and edit files on an Azure VM or any other system where you can connect using SSH.

Installation

As mentioned to edit the files on the Azure Linux virtual machine remotely, we are using the light-weight, cross-platform, opensource editor Visual Studio Code. You can download and install VS Code from the official website.

Visual Studio Code Remote Development Extension

In addition to Visual Studio code, we need to install the Remote – SSH extension, which comes with Remote Development Extension Pack. This also includes remote extensions for containers or the Windows Subsystem for Linux (WSL).

If you are running on a Windows 10 machine, you will also need to install the OpenSSH client on your machine. You can do that going through this blog post, or by running this command.

# Install the OpenSSH Client
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Azure VM connection using SSH

The Remote – SSH extensions currently only supports connecting to x86_64 Linux-based SSH servers using key-based authentication.

Optional: Create Azure Linux VM with key-based SSH authentication using the Azure CLI

Create Azure Linux VM Azure CLI SSH Keys DNS Name

If you want to try it out, and you haven’t set up a Linux VM SSH and key-based authentication. This Azure CLI command here helps you to create a new Azure virtual machine and sets up ssh keys as well as an optional unique Azure DNS name.

az vm create --resource-group demosshvm --name tomsVM --image UbuntuLTS --admin-username thomas --generate-ssh-keys --public-ip-address-dns-name tomsazurelinuxvm

In this example, you can use the public IP address or the Azure FQDN to connect to the Azure VM. If you have a VPN or Express Route set up, you can also use private IP addresses and DNS names. If you are using public IP addresses in production, make sure you are using a service like Azure Just in Time VM access.

Connect Visual Studio Code to Azure VM using SSH

After you have installed Visual Studio Code, the Remote – SSH extension, the SSH client and have a VM with key-based authentication, you can now easily connect. Open Visual Studio Code, on the bottom left, you see the Remote connection button. If you press it, you will find the remoting options. Select “Remote-SSH: Connect to Host…

Visual Studio Open Remote SSH Connection

This will ask you for the username and IP address or DNS name of the virtual machine. In my case, I am going to use the DNS name.

Visual Studio Code SSH Remoting Connection

 

After pressing enter, this will connect your Visual Studio Code environment to the Azure virtual machine.

Visual Studio Code SSH Connection

 

Remote edit files on Azure Linux VMs using VS Code

You can start opening folders and files on the remote Azure Linux VM and begin browsing the file system. On the bottom left, you see the name or IP address of the machine you are connected with.

SSH Remote File System Visual Studio Code

You can also open files and start remote edit files on your Azure Linux VM. If you save the changes you made to the file, this is directly saved on the remote Azure virtual machine.

SSH Remote Edit File with Visual Studio Code

You get all the advanced VS Code features you know from your local Visual Studio Code like syntax-highlighting and more.

I hope this shows you an easy way to remotely edit files on your Azure Linux virtual machines using Visual Studio Code and SSH. If you have any questions, please let me know in the comments.



Hyper-V Server 2019 Install now

How to Install Hyper-V Server 2019

A couple of weeks ago Microsoft released the installation media, and you can download Hyper-V Server 2019 right now. In this blog post, I am going to show you how to install and configure Hyper-V Server 2019 step by step. This should especially help beginners with Hyper-V Server 2019. Hyper-V Server 2019 ships only a core option, so there won’t be desktop experience version of Hyper-V Server like you would have with Windows Server 2019.

Hyper-V Server 2019 Requirements

Hyper-V has specific hardware requirements to run virtualization in a secure and performant way.

  • 64-bit processor with second-level address translation (SLAT)
  • Minimum of 4GB of RAM. You will need more RAM for virtual machines on the Hyper-V Server.
  • Virtualization features and support needs to be enabled in BIOS or UEFI
    • Hardware-assisted virtualization – Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V) technology.
    • Hardware-enforced Data Execution Prevention (DEP)  Intel XD bit (execute disable bit) or AMD NX bit (no execute bit).

Specific features, like Discrete device assignment (DDA) or Shielded Virtual Machines, will also have other hardware requirements. You can find more about the Hyper-V Server 2019 requirements on Microsoft Docs.

Download ISO

You can download Hyper-V Server directly from the Microsoft evaluation center. This SKU does not require a license key, and it also doesn’t expire. It is a fully supported version of Hyper-V for free. However, if you run workloads like Windows Server, Windows 10, or other operating systems on top of it, they need to be correctly licensed.

Install Hyper-V Server 2019

After you have download the ISO file, you will need to install this on your machine. There are multiple options to do this:

You can also follow this guide to add drivers to a Windows Server Image; this also works for Hyper-V Server.

Now you can boot your server with the Hyper-V installation media. This will start the step by step installation. Select the language and region settings you want to use for your Hyper-V Server.

Install Hyper-V Server 2019

Install Hyper-V Server 2019



Migrate Hyper-V VMs to Azure using Azure Migrate

Assess and Migrate Hyper-V VMs with Azure Migrate

Today, the Azure Migrate team launched an update to the Azure Migrate service, which can help you discover, assess, and migrate applications, infrastructure, and data from your on-prem environment to Microsoft Azure. This is excellent timing since we all know that Windows Server 2008 and Windows Server 2008 R2 are soon out of support and you get free extended security updates if you migrate your VMs to Azure. With Azure Migrate, you can now centrally track the progress of your migration journey across multiple thrid-party and Microsoft tools. In addition, Azure Migrate can now assess and migrate your Hyper-V virtual machines (VMs).

With the latest release of Azure Migrate you can now:

  • Extensible approach with choice across Microsoft and popular ISV assessment and migration tools
  • Integrated experience for discovery, assessment, and migration with end-to-end progress tracking for servers and databases
  • Server Assessment and Server Migration for large-scale VMware, Hyper-V, and physical server migrations
  • Database Assessment and Database Migration across various database targets including Azure SQL Database and Managed Instance

You can find more about the Azure Migrate capabilities on Microsoft Docs. For more information on Azure Migration, check out my blog post about Azure Migration on the Nigel Frank International blog. In this post, I am going to show you how you can step-by-step assess and migrate Hyper-V VMs to Azure using Azure Migrate.

Preparation

First, you need to prepare your Azure to set the right permissions and prepare the on-premises Hyper-V hosts and VMs for server assessment and migration. You can find more about the details for permissions and host preparations on Microsoft Docs.

Next, you will need to create a new Migration project for servers. Click on Asses and migrate servers.

Azure Portal Azure Migrate

Azure Portal Azure Migrate

Now you will need to add the tools you want to use for the assessment as well as for the migration, click on “add tools”.

Getting started

Getting started

You will need to create a new Azure Migrate project. Enter the details for your subscription, resource group, and a name for the project. You will also need to choose a region where your project is going to be deployed. No worries, this will only store the assessment data, you can still select another region for the migration.