Last updated by at .

  • Hyper-V 2016
    What's new in Hyper-V 2016
  • Microsoft Azure
    Microsoft Azure

Tag: VM

Azure Nano Server PowerShell Package Management

How to deploy Nano Server in Azure

In some other post I have written how you can deploy a Nano Server on premise using PowerShell or the Nano Server Image Builder. In this post I will quickly show you how you can setup a new Nano Server in Microsoft Azure.

To deploy Nano Server in Azure, Microsoft offers you a Nano Server Image in the Marketplace.

Using the Azure Portal to deploy Nano Server on Microsoft Azure

There are also several ways you can deploy Nano Server, for example using the Azure Portal or PowerShell. First this will show you how you can create a Nano Server Virtual Machine using the Azure Portal.

Nano Server on Azure Marketplace

Simply follow the steps to create a new Azure Virtual Machine.

Nano Server on Azure VM Size

The most important part is to configure the Network Security Groups to allow PowerShell Remoting since Nano Server does not support RDP. There are two options to do this, using WinRM over http (5985) or using WinRM using https (5986). To be honest in production you should only use https, but for some demos or if you are configuring Nano Server to be used over a VPN you can also use WinRM over http. I also recommend that you remove the RDP port rule, since this is not really necessary. If the WinRM rule in the network security group is not already there, just create it. For easy setup you can use 5985 if you want to use SSL you will require additional steps.

Nano Server on Azure Network Security Groups NSG

Follow the rest of the wizard to deploy the new Nano Server VM. After the VM is created you will see it in the Azure Portal. You can now use the IP address to connect to the virtual machine using PowerShell remoting. If you don’t have a VPN connection to the Azure VM Network you will need to use the public IP address, if it is connected trough a VPN or from another machine running in the same VM Network, you can use the internal IP address. In my demo case I am using the public IP address to connect to the virtual machine. To make it easier I also created a Public DNS name for this Azure IP address.

Nano Server on Azure Public DNS Name

To connect to your Nano Server you also have to setup PowerShell Remoting on your machine and add the host to your trusted hosts group.

You can now connect to your Nano Server running in Azure.

Nano Server PowerShell Remoting Azure VM

Using the Azure PowerShell module to deploy Nano Server on Microsoft Azure

First you have to install the Azure PowerShell Module and get the NanoServerAzureHelper PowerShell Module (NanoServerAzureHelper_20160927) this will help you with the setup.

Time to fire up PowerShell and login to Azure

First create a new Azure Resource Group and a Key Vault if you don’t have them already available. The key vault will be helping you to use SSL configuration for your PowerShell remoting.

Import the NanoServerAzureHelper PowerShell module which you have downloaded before.

NanoServerAzureHelper PowerShell Module

This will give you some new PowerShell cmdlets to deploy Nano Server quickly on Azure.

The most important for creating new Nano Server VMs in Azure is simply the New-NanoServerAzureVM.

New-NanoServerAzureVM

Create a new Nano Server VM in Azure using the following PowerShell command:

New-NanoServerAzureVM Create Nano Server VM

To connect you can get the public IP address for the system you deployed and connect to it

 

Using PowerShell Package Management to Install Roles and Features on Nano Server

Since in Nano Server does not include any roles per default you can now use PowerShell Package Management to installed Nano Server Packages on your Azure Virtual Machine.

Azure Nano Server PowerShell Package Management

If you want to know more about PowerShell Package Management on Nano Server, check out my blog post. If you want to know more about Nano Server in general check this post here: Nano Server – The future of Windows Server – Just enough OS

 

 

 

 

 

 

 



Hyper-V Nested Virtualization

Hyper-V Nested Virtualization in Windows 10 Build 10565

This week Microsoft released a new Windows 10 Insider Preview build to the Windows Insiders. It brings a couple of new features to the OS, but Ben Armstrong (Hyper-V Program Manager at Microsoft) mentions in a blog post that it also brings a preview of Nested Virtualization to Hyper-V in Windows 10. Nested Virtualization allows you to run Hyper-V inside a VM. This is prefect for Lab and Training scenarios, so you can run multiple Hyper-V server without the need of a lot of physical hardware.

So how can you enable Nested Virtualization in this early preview build? Theo Thompson describes this in a blog post:

Step 1: Create a VM

Step 2: Run the enablement script

Given the configuration requirements (e.g. dynamic memory must be off), we’ve tried to make things easier by providing a PowerShell script.

This script will check your configuration, change anything which is incorrect (with permission), and enable nested virtualization for a VM. Note that the VM must be off.

Step 3: Install Hyper-V in the guest

From here, you can install Hyper-V in the guest VM.

Step 4: Enable networking (optional)

Once nested virtualization is enabled in a VM, MAC spoofing must be enabled for networking to work in its guests. Run the following PowerShell (as administrator) on the host machine:

Step 5: Create nested VMs

This is still a very early preview and this means this feature still has a lot of know issues:

  • Both hypervisors need to be the latest versions of Hyper-V. Other hypervisors will not work. Windows Server 2012R2, or even builds prior to 10565 will not work.
  • Once nested virtualization is enabled in a VM, the following features are no longer compatible with that VM. These actions will either fail, or cause the VM not to start:
    • Dynamic memory must be OFF. This will prevent the VM from booting.
    • Runtime memory resize will fail.
    • Applying checkpoints to a running VM will fail.
    • Live migration will fail.
    • Save/restore will fail.
  • Once nested virtualization is enabled in a VM, MAC spoofing must be enabled for networking to work in its guests.
  • Hosts with Virtualization Based Security (VBS) enabled cannot expose virtualization extensions to guests. You must first disable VBS in order to preview nested virtualization.
  • This feature is currently Intel-only. Intel VT-x is required.
  • Beware: nested virtualization requires a good amount of memory. I managed to run a VM in a VM with 4 GB of host RAM, but things were tight.

 

 



Containers PowerShell

First steps with Windows Containers

At Microsoft Ignite 2015 back in Chicago Microsoft announced Windows Containers. With the release of the Technical Preview 3 (TP3) for Windows Server 2016 we are finally able to start using Windows Containers, and we can finally test them. But first let use check a little what containers are.

The concept of containers is nothing new, in the Linux world containers are a well known concept. If you have a look at the Wikipedia description for Linux Containers, Wikipedia describes it as follows: LXC (Linux Containers) is an operating-system-level virtualization environment for running multiple isolated Linux systems (containers) on a single Linux control host. Containers provide operating system-level virtualization through a virtual environment that has its own process and network space, instead of creating a full-fledged virtual machine. With Windows Server 2016 more or less the same concept comes the Windows world. This makes containers much more light-weight, faster and less resource consuming than Virtual Machines, which makes it perfect for some scenarios, especially dev-test scenarios or for worker roles.

Container Ecosystem

If we have a look at the concept of containers you have several things in the container ecosystem:

Container Ecosystem

First you have the Container Run-Time which builds the boundaries between the different containers and the operating system. To make deployment easier, faster and more efficient you build Container Images which Include the application frameworks as well as the applications on top of the OS used for the container. To use, store and share Container Images you can use an Image Repository.

The question most people will ask is how are containers different than Virtual Machines etc.

Physical Server

Physical Host

At the beginning what we did is, we installed an operating system on physical hardware and in that operating system we installed applications directly.

Virtual Machines

Virtual Machines

With virtual machines we created simulated some virtual hardware on top of the operating system of the physical server. We installed an operating system inside the virtual machine on top of the virtual hardware and installed application inside the VM. In this case, each virtual machine has its own operating system.

Containers

Containers

With container we use an operating-system-level virtualization environment which create boundaries between different applications. This is so efficient you can run multiple applications side by side without effecting each other. Since this is operating-system-level virtualization you cannot only directly on the operating system on the physical hardware, you can also use operating-system-level virtualization inside a virtual machine. This is by the way the way I see most of the deployments of containers.

Windows Containers vs. Hyper-V Containers

Hyper-V Containers

Microsoft will provide two different types of Container Run-Times. One is Windows Containers and the other one will be Hyper-V Containers (not Hyper-V Virtual Machines). In some cases it is maybe not compliant that some applications share the same operating system. In this case Hyper-V Containers will add an extra boundaries of security. Hyper-V Containers are basically Windows Containers running in a Hyper-V Partition, so with that you gain all the stuff you get with Windows Containers but with another layer of isolation.The great thing here, is that both Container Run-Times use the exam same image format. This means if an image is created in a Windows Container Run-Time it also works as a Hyper-V Container and vice versa.

Hyper-V Containers Nested Virtualization

The other great side effect of Hyper-V Containers is, that in order to run Hyper-V Containers inside a Virtual Machine we need nested Virtualization, which will be included in Windows Server 2016 Hyper-V. Btw. Hyper-V Containers are not part of the Technical Preview 3.

(Pictures from the Microsoft Ignite 2015 presentation of Taylor Brown and Arno Mihm (Program Managers for Containers)

Deploy Windows Containers

With the release of the Technical Preview 3 of Windows Server 2016, Microsoft made Windows Containers available to the public. To get started you can download a install Windows Server 2016 inside a Virtual Machine or even bare-metal. If the virtual machine has internet connection you can use the following command to download the configuration script, which will prepare your container host.

Install Windows Container Host

After that you can run the C:\ContainerSetup.ps1 script, which will prepare your container host. This can take some time depending on your internet connection and hardware.

The VM will restart several times and if it is finished you can start using Windows Containers inside this Virtual Machine.

Managing Windows Containers

Containers PowerShell Module

After you have logged in to the Virtual Machine you can start managing Containers using PowerShell:

Containers PowerShell

Get Container Images, by default you will get a WindowsServerCore Image. You can also create your own images, based on this image.

Create a new Container

Start the container

Connect to the Container using Enter-PSSession

Of course you an also use the docker command to make your containers.

Windows Containers Docker

Deploy a Container Host in Microsoft Azure

If you don’t want to go trough all the installation process you can also use a Template in Microsoft Azure to deploy a new Container Host Virtual Machine.

Microsoft Azure Windows Server Container Preview

If you need some more information on Windows Containers check out the Microsoft Resources on MSDN about Windows Server Containers.

 



Veeam FastSCP for Microsoft Azure

Veeam FastSCP for Microsoft Azure

Veeam does some great products for your virtualization and datacenter environment such as their Veeam Backup & Replication suite, Veeam Endpoint Backup FREE and Management Packs for System Center Operations Manager. Now a couple of weeks ago Veeam released a cool free tool call Veeam FastSCP fro Microsoft Azure. With Veeam FastSCP (Secure Copy Protocol) for Microsoft Azure, IT Pros and Azure Developers can simply and reliably copy local files to Azure VMs, and copy files in Azure VMs to on-premises.

Veeam FastSCP for Microsoft Azure Diagram

The utility makes your life way easier when dealing with Virtual Machines running on Microsoft Azure IaaS.

  • Secure file copy with no independent encryption or VPN needed
  • Manual file copy to/from Azure VMs without the need to keep the UI open until the file copy completes
  • Automatic scheduling of file copy jobs for nightly or weekly copies to/from Azure VMs
  • A wizard-driven UI to copy files in just a few clicks – with no scripting needed

If you want to download it, check out the Veeam Website.

To set it up the tool connects to the PowerShell endpoint for your IaaS VM. Just add the Virtual Machine and you are ready to go! With that you can do some great things, like simply copy a file to an Azure IaaS VM or even doing scheduled backups of files from inside Azure VMs like Didier Van Hoye did.

 

 



Windows Azure Pack Archtiecture Overview

What’s new Windows Azure Pack Update Rollup 6

Microsoft just released Update Rollup 6 for Windows Azure Pack on April 28. Microsoft fixes some bugs and added some highly requested features from User Voice as well.

  • Tenants can now create a checkpoint of a Virtual Machine and restore it at will when needed.
  • VMM Users can now deploy and manage Generation 2 VMs through VM Roles using WAP and the corresponding UR6 SPF Resource Provider
  • Added support to maintain Data Consistency between the SQL Resource Provider configured properties for resources with the actual provisioned resources on the SQL Server Hosting machine(s).
  • Added support for Webjobs in Windows Azure Pack Websites. This functionality offers creation of Webjobs to be executed manually or continuously in the background.
  • Tenants can now use deployment slots associated to their websites. Web app content and configurations elements can be swapped between two deployment slots, including the production slot.
  • Administrator can take advantage of DSC to deploy the update across a distributed environment.
  • Windows Azure Pack Websites can now take advantage of the HttpPlatformHandler to host Java and other runtimes.
  • Updates to Management Pack
    • Synthetic Transactions
    • Resource Governor Error Monitors
    • Monitor Certificate Validation Disabled
  • High Priority Bug Fixes


Microsoft Virtual Machine Converter 3.0

Microsoft releases Microsoft Virtual Machine Converter 3.0

Microsoft today released the next version of the Microsoft Virtual Machine Converter (MVMC). (MVMC) is a Microsoft-supported, stand-alone solution for the IT pros or solution provider who wants to convert virtual machines and disks from VMware hosts to Hyper-V hosts and Microsoft Azure.

In MVMC 3.0 Microsoft adds the ability to convert a physical computer running Windows Server 2008 or above server operating systems or Windows Vista or above client operating systems to a Virtual Machine. This feature was highly claimed by the community, since the P2V (Physical to Virtual) Migration feature was removed in System Center Virtual Machine Manager 2012 R2.

MVMC can be deployed with minimal dependencies. Because MVMC provides native support for Windows PowerShell, it enables scripting and integration with data center automation workflows such as those authored and run within Microsoft System Center Orchestrator 2012 R2 or Service Management Automation. It can also be invoked through the Windows PowerShell command-line interface. The solution is simple to download, install, and use. In addition to the Windows PowerShell capability, MVMC provides a wizard-driven GUI to facilitate virtual machine conversion.

This tool can not only help you to migrate from VMware or physical computers to Hyper-V, it also allows you to directly upload the Virtual Machine to Microsoft Azure.

MVMC3 migrate to Hyper-V or Azure

You can get the new version of the Microsoft Virtual Machine Converter 3.0 in the Microsoft Download Center.



centos hyper-v

Best Practices for running Linux on Hyper-V

Sometimes I just need my blog as a reminder or a database to find something in a few months so this is exactly one of this blog posts. Microsoft has a TechNet article where they describe the best practices for Linux VMs running on Hyper-V 2012 or Hyper-V 2012 R2. The article is a list of recommendations for running Linux virtual machine on Hyper-V.

Right now they have 4 recommendations on the list (Source Microsoft TechNet):

  • Use static MAC addresses with failover clustering.
  • Use Hyper-V-specific network adapters, not the legacy network adapter.
  • Use I/O scheduler NOOP for better disk I/O performance.
  • Add “numa=off” if the Linux virtual machine has more than 7 virtual processors or more than 30 GB RAM.