Last updated by at .

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

Tag: Virtualization

unatted xml file for VM

Add unattend.xml to VHDX File for VM automation

If you for example don’t have System Center Virtual Machine Manager or another tool to create Virtual Machine Templates and automate the deployment, you can also do this using Sysprep, PowerShell and an unattend.xml file to automate or simplify the Virtual Machine creation process. In other blog posts I already wrote how you can sysprep Virtual Machines or how you can create Hyper-V Virtual Machines using PowerShell. In this post I will show you how you can add an unattend.xml file to your VHD or VHDX so your virtual machine gets some default settings like regional information.

Here we have a basic unattend.xml file. If you want to enhance it, or create your own, you can also use the Windows ADK.

To use this unattend.xml you first have to sysprep a virtual machine and create a sysprep VHD file. After that you can mount the VHDX file and insert the unattend.xml file to the VHD. Copy the unattend.xml file to the following location: D:\Windows\Panther (in my case the VHD was mounted as D drive).

You can mount the VHDX using the UI or PowerShell:

There are more paths as well. You can check out the Windows Setup Automation Overview on TechNet where you can see all the possible paths to place the unattend.xml file.



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. 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):

Now you can copy the VHD or VHDX file from that virtual machine and use it for other VMs.



VCNRW – Virtualization Community NRW

Speaking at VCNRW – Virtualization Community NRW in Cologne

Today I am proud to announce that I have the chance to present at the VCNRW – Virtualization Community NRW in Cologne Microsoft Office. The Virtualization Community NRW is a open community which focusses SBC, VDI, Citrix, Microsoft, VMware, XenApp, XenDesktop, Horizon View in NRW Germany. The event will take place at the 20th April in the Microsoft office Cologne.

In my session I will talk about some topics from Windows Server 2016 like Nano Server and Containers.

Check out the event page and join the fun, there will be a lot of community leaders and speakers to talk about the latest and greatest topics in the Virtualization community.

VCNRW

Check out the event page

 

Update: You can watch the recording on Microsoft Channel9



Veeam Vanguard

Veeam Vanguard 2016

Today I had some great news in my inbox. I got awarded with my second Veeam Vanguard award in a row. I was one of the first Veeam Vanguards in 2015 and now I am proud to receive the Veeam Vanguard Award for 2016.

A Veeam Vanguard represents the Veeam brand to the highest level in many of the different technology communities in which Veeam engages. These individuals are chosen for their acumen, engagement and style in their activities on and offline.

Veeam Vanguard 2015



Switch Windows Container to Hyper-V Container

Switch a Windows Server Container to a Hyper-V Container

With Technical Preview 4 of Windows Server 2016 made the new Hyper-V Containers available. With that you can now use Windows Server Container and Hyper-V Container. To run Hyper-V Containers you have to make sure, you have Hyper-V Nested Virtualization active for your Container Host VM.

If you create a new Container it will create a Windows Server Container by default, if you want to create a Hyper-V container you have to switch the RuntimeType to Hyper-V.

With the following command you can see which RuntimeType the Container has:

To change the runtime Type to Hyper-V Container you can use the following command:

So switch it back to a Windows Server Container you can use the following command:

 



Best of Windows Server 2016 Webinar

Webinar: Best of Windows Server 2016 – The new Foundation of Windows

Together with Veeam I am proud to present in two webinars about the new features in Windows Server 2016. The title of the webinar will be Best of Windows Server 2016 – The new Foundation of Windows and will cover the greatest new features of Windows Server 2016.

Join Veeam for a webinar on the Best of Windows Server 2016 — The New Foundation of Windows. You’ll be one of the first to know about new, exciting improvements that are coming in Windows Server 2016 and how they’ll improve your day-to-day job. In this hour-long webinar, Thomas Maurer (Microsoft MVP) will guide you through the highly anticipated innovations including:

Attend this FREE Webinar to learn about the latest and greatest features of Windows Server 2016. You have to options one for North America and one for EMEA.

December 15 Tuesday NA 1pm ET, EMEA 2pm CET

Best of Windows Server 2016 – The new Foundation of Windows

Join Veeam for a free webinar on the Best of Windows Server 2016 — The New Foundation of Windows. You’ll be one of the first to know about new, exciting improvements that are coming in Windows Server 2016 and how they’ll improve your day-to-day job.

 

Thomas Maurer, one of the first Veeam Vanguards, is a cloud architect at a Swiss consulting and engineering company called itnetX AG. Thomas focuses on Microsoft Technologies, specifically Microsoft Cloud Solutions based Microsoft System Center, Microsoft Virtualization and Microsoft Azure. Thomas was awarded the Microsoft MVP (Most Valuable Professional) Award for his expertise in virtual machines (VMs) in 2012. He works closely with Microsoft and their partners to promote Microsoft technology at technical events.



Configure Nano Server Container Host

Setup Windows Containers on Nano Server

With the release of Windows Server 2016 Technical Preview 4 Microsoft allows you to use Windows Server Containers and Hyper-V Containers on Nano Server. In this blog post I will cover how you can setup a Nano Server on Hyper-V and let it use as a Container Host for your Windows Server and Hyper-V Containers inside this Nano Server VM. I already described how you can create a Nano Server VHDX file and how you can manage your Nano Server using PowerShell or PowerShell Direct so you can use this quick guide to set this up.

Create Nano Server Container Host VM

Create a new Nano Server Container Host VHDX file using the following features:

  • GuestDrivers (VM Drivers for Hyper-V)
  • Containers
  • Compute (Hyper-V role, if you want to run Hyper-V Containers)
  • ReverseForwarders

Create Nano Server Container Host VM PowerShell

Create Nano Server VM

This will create a new VHDX and you can create a new Virtual Machine. The Virtual Machine you create has to have at least 2 vCPUs.

If you want to use Hyper-V Containers inside this Virtual Machine, you have to setup the Virtual Machine to use Nested Virtualization. For this you can use this PowerShell command:

Configure Nano Server Container Host

Startup your Nano Server Virtual Machine and use PowerShell remoting to connect to it:

Configure Nano Server Container Host

You have to configure networking for your container host, you can create a External Switch or a new NAT Switch. If you use a new NAT Switch you can use the following commands:

Now you can download the Nano Server Container Image to your Container Host, so you can create new Containers based on this Image.

Now you can start using Containers inside your Nano Server Container Host.First thing you may notice is how fast and light weight everything is. For example, on my Surface Book it takes 7-8 seconds for the first initial boot of my Nano Server VM and new containers are created and started in less than a second. I really think that the concept of Nano Server and Container will bring a lot of benefits which will make both solutions a great success. When you deploy new servers today it takes several minutes until they are ready, with Nano Server it only takes seconds. If you copy for example a Windows Server Full Installation VHD you copy around 12GB, with Nano Server you copy around 400-500MB.