Build your Windows Server Container and create Windows Server Containers and Windows Server Container Images #ws2016 #winserv   Leave a comment

What are containers?

They are an isolated, resource controlled, and portable operating environment.

Basically, a container is an isolated place where an application can run without affecting the rest of the system and without the system affecting the application. Containers are the next evolution in virtualization.

If you were inside a container, it would look very much like you were inside a freshly installed physical computer or a virtual machine. And, to Docker, a Windows Server Container can be managed in the same way as any other container.

The windows Server Container can be used to package a Windows Server application, and Microsoft’s .Net framework application and can be easily moved across different servers or from your test cloud to the production cloud.

image

Install-WindowsFeature –name Containers

By default you will not see any change only a few PowerShell commands.

Get-Command -Module containers

image

But I this scenario I have a Windows server 2016 and I will build a container in a VM

image 

Important links :

Get your Container VM this image is about 6Gb and a slow download http://aka.ms/containerhostvhd 

It all starts here samples of containers ready for testing https://github.com/Microsoft/Virtualization-Documentation

https://raw.githubusercontent.com/Microsoft/Virtualization-Documentation/master/windows-server-container-tools/New-ContainerHost/New-ContainerHost.ps1

On my Hyper-v Server 2016 I opened Powershell

#gGet script download New-ContainerHost-Source.ps1
wget -uri http://aka.ms/newcontainerhost -OutFile c:\New-ContainerHost.ps1

#Run script to create a new container
.\New-ContainerHost.ps1 –VmName MVPContainer01 -Password Password01

image

You will need to accept the Eula

the script will download the VM and configure it in the Hyper-v server.

Using VHD path C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks
Copying VHD archive (6 GB) from http://aka.ms/containerhostvhd to C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\WindowsServer_en-us_TP3_Container_VHD.zip (this may take a few minutes)…

The Download is not fast at all so this will take some time So I have plenty of time to make some screenshots

image

and yes I used a clear password

image

 

Docker is already installed.
NSSM is already installed
Creating Docker program data…
Configuring NSSM for Docker service…
Waiting for Docker daemon…
Successfully connected to Docker Daemon.
Tagging new base image…
Script complete!
VM MVPContainer01 is ready for use as a container host.
See http://msdn.microsoft.com/virtualization/windowscontainers for more information about using Containers.
The source code for these installation scripts is available here: https://github.com/Microsoft/Virtualization -Documentation/tree/master/windows-server-container-tools

 

image

By default the VM is not connected to a Switch and be aware of the disk placement, Containers are based on Differencing disk

#This VM is not connected to the network. 
Get-VM mvp* | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -Switchname vSwitch

and in case you wonder why did I need this password. ? take a look in the unattended XML ( unless you do a lock )

Autologon count = 999 so in the first reboot you won’t need a password.

Ok but now what I have a VM running and this VM is running Core

Let us check things run

#get the Image name

Get-ContainerImage 

#get the Virtual Switch name this is not the Hyper-v switch!

Get-VMSwitch

 

image

with the Get-Container you can see the Created Containers

All containers are Stopped and we need them to start

Start-Container my*  to start all containers

image   image

Remote management without the container ID is not posible

get-container |ft containername,ContainerId

Below is a little snapshot of the Container. the Master disk WindowsServer_en-us_TP3_Container_VHD.vhd and the Differencing disks that are running as Container VM

image

ContainerVHDVersion.10514.2.txt  means This file indicates the web version of the base VHD

To manage a Container session

Enter-PSSession -containerId b6e784a6-632d-4efb-8e48-89496ee2abfa –RunAsAdministrator

Be aware you will need the ContainerId to enter this session

image

Checking the IP as well the Container IP Remember the Firewall is on and really you need to powershell a lot the get things done and far from easy. And if you build this in a LAB of Home server and SSD is a must.

In the next Post I’ll show you how to run stuff in the Container and set thing up.

SQL is a great option to run this in a Container. I started over several times and still I miss some great tools to easy manage this.

image

I hope there Will be a VMM or Hyper-v plugin to manage this all else it would be hard to manage all this.

Happy Clustering

Robert Smit

https://robertsmit.wordpress.com/

Posted August 25, 2015 by Robert Smit [MVP] in Windows Server 2016

Tagged with

First hands-on Upgrading Windows Server 2016 TP2 to TP3 #easy #upgrade #ws2016 #WinServ   Leave a comment

Now that Windows Server 2016TP3 is there we can test all the new stuff the in place upgrade was just 10 min downtime that is great. and my SCVMM and SQL server still worked. get the bits here:  https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview

At the heart of the Microsoft Cloud Platform, Windows Server brings Microsoft’s experience delivering global-scale cloud services into your infrastructure. Windows Server 2016 Technical Preview 3 provides a wide range of new and enhanced features and capabilities spanning server virtualization, storage, software-defined networking, server management and automation, web and application platform, access and information protection, virtual desktop infrastructure, and more.

As a reminder, these are early pre-release builds. Many of the features and scenarios are still in development. As such, these builds are not intended for production environments, labs, nor full evaluations. This is pre-released software; features and functionality may differ in the final release.

Need more information about the next version of Windows Server? See what’s new in Windows Server 2016 Technical Preview 3.

 

The upgrade is done in just a few steps I used a System center Virtual Machine Manager VM to upgrade ( with SQL2016 and SCVMM TP2 )

image  image

Want to keep or wipe the server. and

 

image image

 

Setup encountered a problem and was unable to determine whether Hyper-V features can be upgraded. For more information about Hyper-V upgrade requirements, see http://go.microsoft.com/fwlink/?LinkId=512570.

http://go.microsoft.com/fwlink/?LinkId=512570  VmConfigurationVersion vmname or vmobject

 

image 

image image

image

 

 

image image

In just 10 Minutes Winking smile 

image and here is my VMM server

 

So what to expect when upgrading  there a a whole lot of new things in 2016 new in this release :

 

Windows Server Containers

What’s new in Active Directory Domain Services (AD DS) in Windows Server Technical

What’s New in Failover Clustering in Windows Server Technical Preview.

What’s new in Hyper-V in Technical Preview.

What’s New in Windows Server Antimalware Overview for Windows Server Technical Preview.

What’s New in Remote Desktop Services in Windows Server 2016.

What’s New in File and Storage Services in Windows Server Technical Preview.

What’s New in Web Application Proxy in Windows Server Technical Preview.

What’s New in Networking in Windows Server Technical Preview.

Posted August 19, 2015 by Robert Smit [MVP] in Windows Server 2016

Tagged with

#windows10 is here but what if you are still waiting? force Windows 10 #upgrade with the Media Creation Tool or Windows Update   Leave a comment

Download Windows 10

Still waiting for Windows 10 you can download an ISO and place it on a USB Stick or force it by poking Windows Update.

To get the media direct from Microsoft download the tool and create an ISO easy and handy.

http://www.microsoft.com/en-us/software-download/windows10

Create a stick get the Download Tool Now (64-bit version)

if you want the X32 version it is also there.

image Download Windows 10

Choose what to do Upgrade now or create stick. and Pick the Language and edition you want. There is no enterprise edition here you need to get this from the SA site and or if you test the Windows 10 version and runs no production get this from the MSDN site.

Download Windows 10Download Windows 10

Pick the media and choose ISO of USB

imageimage

The download is in progress and will do a verify just to make sure the Stick is OK.

Download Windows 10

 

But if you want to use Windows Updates to poke a bit to get the Windows 10 bits.

Type the following command in the Windows 10 task bar search field and press enter:

wuauclt.exe /updatenow

Want to make sure that your free Windows 10 update gets detected for download use this command:

wuauclt.exe /detectnow

 

Resetauthorization Option

WSUS uses a cookie on client computers to store various types of information, including computer group membership when client-side targeting is used.

In this case you should use this command:

wuauclt.exe /resetauthorization /detectnow

 

 

http://www.microsoft.com/en-us/software-download/windows10

 

Download Windows 10

Posted July 29, 2015 by Robert Smit [MVP] in Windows 10

Tagged with

Step by Step Server 2016 Remote Desktop Services QuickStart Deployment #RDS #VDI #RDP #RemoteApp   Leave a comment

Setting up a RDS  Farm is not that hard but anyway I created a step by step guide to build a Windows Server 2016 Remote Desktop Services deployment.

there is a new feature in the Windows Server 2016 RDS  : Full OpenGL support with RDS for VDI scenarios.

And Yes you can use the Quickstart but I’m not using this in this demo setup. I tried to do a complete setup,but doing this I noticed that I’m constantly expanding this demo with new options so. I’ll keep this pure to the setup and some PowerShell basics.

Quick Start is an option in RDS deployment during the process of adding roles and features with Windows Server 2012 Service Manager. It dramatically simplifies the deployment process and shortens go-to-market while still providing the ability to add additional RDS servers as needed. The abstraction formed by RDWA, RDCB, and RDSH offers such elegancy that the Quick Start process integrates the three and deploy all to one server in a process rather uneventful. For For prototyping a centralized remove access environment, demonstrating and testing a VDI solution, or simply building a study lab for self-training, Quick Start is a fast track for getting RDS up and running in a matter of minutes. – See more at: http://blogs.technet.com/b/yungchou/archive/2013/02/07/remote-desktop-services-rds-quick-start-deployment-for-remoteapp-windows-server-2012-style.aspx

As a lot of customers are using Citrix just to host some applications and never heard od RDS paying big license cost. as in the options is already build-in

My DC is running the License services and this is also my broker server.

image

Doing this setup is in two parts One add Roles and Second  the RDS setup.

image

Adding the Roles to my DC and adding all the servers in the all server filter in the server manager of the DC.

image

Selecting the Server that holds the Remote Desktop Session host ( mvprds01 )

imageimage

Selecting and installing the role. I did this in the menu but you can also do this in the configuration. and the role will be installed.

image

Now that the roles are installed there is an extra option in server manager <> Remote Desktop Services.

image

To configure Windows Server 2016 Remote Desktop Services you have to pick in the add roles and features the lower option Remote Desktop Services Installation.

image

As you can see a quick Start option is here but we are not using this. and check the standard deployment. now you need to configure all the stuff.

But for a quick demo you can pick the quick start option.

image

When using the VDI option you will need a machine that is running Hyper-v !. In my setup I’ll use the Session based desktop deployment.

image

A quick overview of the roles that I’ll need for this deployment.

image

Selecting the RD Connection Broker Server

image

Selecting the RD Web Access Server

image

Selecting the RD Session host Servers ( in this case only 1 )

image

The roles are getting configured and if needed deployed to the servers. I already did this but there is a check mark to deploy the Roles

image

Now that all the roles are installed in server manager you can go to the Remote Desktop Services

image

In the overview you can see what is deployed and what options you can do. but in every task pulldown item there are the same options.

image

 

image

I installed all my options and I’m ready to create a Collection.

Create a Collection.

image

In the task menu I choose the Create Session Collection,

image

Just Name it

image

Choose a RD Session host Servers

image

What users may access this collection. I’ll pick all domain users.

 

image

User profile disks offer several advantages:

  • Configuration and deployment is simpler than roaming profiles or folder redirection.
  • User profiles can be maintained even on pooled virtual desktops that get rolled back after logoff.
  • Logon and logoff times are reduced.
  • Previously, profiles could be corrupted if used simultaneously on multiple computers. User profile disks are specific to the collection, so they can’t be used on multiple computers simultaneously.
  • Administrators can have granular control of exactly which locations get saved to the virtual hard disk (VHDX).
  • User profile disks can be stored on Server Message Block (SMB) shares, cluster shared volumes, SANs, or local storage.
  • In pooled virtual desktop collections, user profile disks work with virtual machines running both Windows 8 and Windows 7 with Service Pack 1 (SP1).

Some things to remember about user profile disks:

  • User profile disks are available only in pooled virtual desktop collections and session collections—not in personal virtual desktop collections.
  • Share permissions are automatically set up by the management tools.
  • Use Server Manager or Windows PowerShell to manage user profile disks.
  • User profile disks are for a single collection only. A user connecting to two different collections will have two separate profiles. If you want to synchronize settings, refer to Microsoft User Experience Virtualization.

 

image

When Creating the collection we can make a start for publishing applications.

image

Now that the Application Collection is ready we can add applications to this collection. When selection the task <> publish remoteapp programs or in the hyperlink. there will be a discovery off all the apps on the RD Session host Servers in this case the mvprds01.mvp.local

 

image

But sure you can apps that are not discovered just press add

 

imageimage

and  press Publish and there is the APP

image

When Logon to the Portal you can see the RemoteApp

image

Changing the Icon of the RemoteApp can be done by PowerShell or copy and replace. On the RDS Broker server. goto the path :

C:\Windows\RemotePackages\CPubFarms\Application_1\CPubRemoteApps

image

all the RemoteApps are there and can be changed here.

OR change the ICON with the shell23.dll with powershell

image

To change the Icon

The Icon Index for this interface works top to bottom, starting with 0. So count the rows until you see your desired icon, multiply this by 4, subtract 1, and count up to your desired icon. The Icon Index for the Windows Update icon turns out to be 46.

Type one of the following commands in the Powershell box:

Get-RDRemoteApp -Alias "clustermvp" | Set-RDRemoteApp -IconPath "c:\windows\system32\shell32.dll" -IconIndex 46
 
 
 
 

Creating Subfolders in the Application

Using the The RemoteDesktop PowerShell module we’re also able to add subfolders in RD Web Access and “move” specific Remote Apps to specific folders.

In order to do so we use the same command as above, Set-RDRemoteApp. For example, to create a subfolder called “My tools” and move the Remote App MSpaint to that folder you can use the following command:

Set-RDRemoteApp -CollectionName “Application 1” -Alias clustermvp -FolderName “My tools” -ConnectionBroker mvpdc01.mvp.local

 

Creating File Extensions

A common setting is configuring the file extensions for Remote Apps. Inside the ServerManager GUI, file extensions are configured as a property of a RemoteApp, therefore you would expect that setting a file extension using PowerShell should be done using the command Set-RDRemoteApp. Instead, we need to use a different command called Set-RDFileTypeAssociation.
For example if we want to add the file extension .pdf or .txt to a Remote App Acrobat Reader or Wordpad we can use the following command:

Set-RDFileTypeAssociation –CollectionName “Application 1” -AppAlias AcrobatReader -FileExtension .pdf -IsPublished $true –ConnectionBroker mvpdc01.mvp.local

 
 

More about using Powershell to manage RemoteApp programs.

Get-RDRemoteApp (http://technet.microsoft.com/en-us/library/jj215454.aspx) is used to list properties for RemoteApps.
Example:

Get-RDRemoteApp -alias “wordpad” | fl

 

Set-RDRemoteApp (http://technet.microsoft.com/en-us/library/jj215494.aspx) is used to set properties for RemoteApps.
Example:

Set-RDRemoteApp -Alias “wordpad” -DisplayName “WordPad – Renamed”

New-RDRemoteApp (http://technet.microsoft.com/en-us/library/jj215450.aspx) is used to create a new RemoteApp in a certain collection.
Example:

New-RDRemoteApp -CollectionName “RemoteApps” -Alias “regedit” -DisplayName “RegEdit” -FolderName “Admin Tools” -FilePath “C:\Windows\regedit.exe”

Remove-RDRemoteApp (http://technet.microsoft.com/en-us/library/jj215493.aspx) is used to remove a RemoteApp.
Example:

Set-RDRemoteApp -CollectionName “RemoteApps” -Alias “wordpad”

Get-RDAvailableApp (http://technet.microsoft.com/en-us/library/jj215457.aspx) is used to list available applications to publish in a collection.
Example:

Get-RDAvailableApp -CollectionName “RemoteApps”

Get-RDFileTypeAssociation (http://technet.microsoft.com/en-us/library/jj215461.aspx) lists the filetype association(s) for a certain application.
Example:

Get-RDFileTypeAssociation -AppAlias “wordpad”

Set-RDFileTypeAssociation (http://technet.microsoft.com/en-us/library/jj215459.aspx) is used to set the filetype association(s) for a certain application.
Example:

Set-RDFileTypeAssociation -CollectionName "Application 1" -AppAlias "wordpad" -FileExtension ".txt" -IsPublished $True -IconPath "%ProgramFiles%\Windows NT\Accessories\wordpad.exe" -IconIndex 0

 

Happy RDS clustering

Robert Smit

@clusterMVP

https://robertsmit.wordpress.com

Posted June 23, 2015 by Robert Smit [MVP] in Windows Server 2016

Tagged with

#TechdaysNL Photo’s and KEYNOTE – The Internet of Everything video on #ch9   Leave a comment

techdays2015

 

Data is the new oil and will be responsible for the largest transfer of wealth since the industrial revolution. Organizations that master data will lead the world. Those who don’t will wane into irrelevancy. Join Microsoft Distinguished Engineer James Whittaker on an entertaining and educational romp through modern data and its history from 20 years in the past to what is happening now in the time of Big Data all the way to 20 years in the future where the data landscape will be dominated by machines. Learn about ways your organization can think about data and how to be a player in a future that is closer than anyone thinks from intelligent clouds to the internet of things to quantum computing. No piece of data is left unturned.

Keynote can be found here https://channel9.msdn.com/events/TechDays/Techdays-2015-the-Netherlands/001

As my sessions : https://www.microsoft.com/netherlands/techdays/spreker.aspx?name=robert-smit&theme=yellow

 

535927_1078017712226072_6401817533828121256_nIMG_20150528_084448IMG_20150529_081748

 

IMG_20150528_145819IMG_20150528_15023211137085_1078938915467285_5653692944741623300_n

 

At the Intel Innovation stage.

My slides can be found here : https://dd.docs.com/en-US/d/techdays-storage-spaces-direct-s2d_DaGcZJSEWSGSTEAAZg0FWBQ~M6cf13678-9bb1-eca5-2a2d-2b8d9b49448b

IMG_20150528_153751IMG_20150528_193203

As https://twitter.com/Hans___Jan Hans jan was the cartooning man and he made a MVP logo of the Cloud and Clustering.

https://twitter.com/JamesvandenBerg 

 

IMG_20150529_132956

Custom logo

MVP

 

The new company car Winking smile

IMG_20150529_144748

Happy clustering

Robert Smit

@clusterMVP

https://robertsmit.wordpress.com

Posted June 23, 2015 by Robert Smit [MVP] in TechDays

Tagged with

Windows Server 2016 With Clustered SQL Server 2016 Instance #winserv #SQL #WS2016 #SQL2016   Leave a comment

Now that Windows Server 2016 is there and SQL server 2016. you can build a default cluster with SQL but that is no fun. Building a SQL Cluster on Storage Spaces Direct or putting the Databases on storage replication.  or building a hybrid SQL cluster with Azure.

In my blog there are plenty off samples on how to build this. This blog is a easy step by step on hoe to create a cluster with the 2016 products.  ( basically the same as 2008,2012R2 )

Get your Windows server 2016 herehttps://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview

What’s new in Windows Server 2016 ?

http://blogs.technet.com/b/windowsserver/archive/2015/05/04/what-s-new-in-windows-server-2016-technical-preview-2.aspx

the Cluster is easy I use 3 lines of PowerShell to create this. needless to say the .net 3.5 is needed for SQL!

Windows Server 2016 is there and SQL server 2016

Installing the Cluster feature you will need to reboot this node.
install-WindowsFeature "Failover-Clustering","RSAT-Clustering" -IncludeAllSubFeature -ComputerName "mvpsql16-1.mvp.local","mvpsql16-1.mvp.local"
Test-Cluster -Node "mvpsql16-1.mvp.local","mvpsql16-1.mvp.local"
New-Cluster -Name Techdays01 -Node "mvpsql16-1.mvp.local","mvpsql16-1.mvp.local" -NoStorage -StaticAddress "10.255.255.10"

The Cluster is in place and yes you could do create a new failover cluster but that is to easy. command line is way faster with the advanced config.

Windows Server 2016 is there and SQL server 2016

 

Let’s pick the two steps installation in the advanced menu. cluster prep and cluster completion.

image

first step is advanced cluster preparation. when installing from command line you will need a ini file during the GUI setup you can save this ini file and use this for later or you can use an older file non 2016 if you just want to setup the DB.

Windows Server 2016 is there and SQL server 2016

If you are using named instances you can see this error if you are not using the right names

image

SQL named instance Requirements  : https://msdn.microsoft.com/en-us/library/ms143531.aspx

 

Step 1

 image

WHen using the Command line with the INI file you can do this :

D:\setup.exe /q /CONFIGURATIONFILE="C:\SQLSetup\Configstep1.ini" /AGTSVCPASSWORD="Password01" /ASSVCPASSWORD="Password01" /SQLSVCPASSWORD="Password01" /ISSVCPASSWORD="Password01" /RSSVCPASSWORD="Password01" /IACCEPTSQLSERVERLICENSETERMS /INDICATEPROGRESS
Remember to change the ini file and set the ignore to the UIMODE="Normal"

;UIMODE="Normal"

image

In just a few minutes you have completed the whole setup.  ( 5 minute Setup Windows Server 2012R2

image

Step 1 is done still there is nothing to see in the Cluster but the first part of SQL install is done.

image

 

Step2

Creating the Cluster with the advanced Cluster completion.

image

Important that you did run the cluster validation. else the setup will fail.

 

image

Using the named instance and using the Created ini file in step 2 if you haven’t had this file.

image

d:\setup.exe /q /CONFIGURATIONFILE="C:\SQLSetup\Configstep2.ini"  /IACCEPTSQLSERVERLICENSETERMS /INDICATEPROGRESS

image image

Done in just a few minutes and ready for the next Cluster rollout using the unattended files just change the names and IP and or locations in the INI files and you are ready to go.

image

 

Done for Part 1 the cluster basics.

Happy clustering

Robert Smit

@clusterMVP

https://robertsmit.wordpress.com

Posted June 17, 2015 by Robert Smit [MVP] in Windows Server 2016

Tagged with

Quick Create a Windows Server 2012 R2 Network Load Balancing (NLB) ,How To , Step by Step #winserv #NLB #ws2012   Leave a comment

As there are still many questions on how to setup a Windows NLB. Or not getting a working situation with all kind of different errors.

I made already two Blog post about NLB. This blog post will be a bit off Both.

https://robertsmit.wordpress.com/2014/08/20/create-a-new-network-load-balancing-nlb-cluster-on-windows-server-2012-r2-winserv-nlb/

https://robertsmit.wordpress.com/2012/06/26/windows-2012-clustering-network-load-balancing-nlb-how-to-step-by-step/

So for starting I have 4 NLB nodes MVPSQL141 to MVPSQL 144

The NLB tools I installed with Powershell Run this on every NLB node!

Install-WindowsFeature nlb –IncludeManagementTools

 

image

Now that the tools are installed We can start with the Configuration of the NLB.

Starting the NLB manager to Create the NLB cluster and joining the Other Nodes.

image

All my nodes have multiple network cards and for the NLB I use always a dedicated NIC to avoid problems.

I select the create new cluster from the menu and add the First NLB node.

image

As you can see there are 3 nic’s in this case I use the Ethernet connection. The Public connection is connected to the Domain.

And All NIC’s have a fixed IP Addresses.

image

As you can see the nic has a dedicated IP if the nic has a DHCP Address you can give here a fixed IP by selecting ADD

image

This step is adding the Cluster IP by selecting ADD and then choose the right NLB Cluster IP!

image

Right Creating a DNS name for the NLB Cluster.

image

As I will only use Port 80 I changed the Rule and selected only port 80. I does not make sense to select all the ports when using only 80 and or 443.

image

Now that the Cluster is created We can join other Nodes with add host to the cluster I the menu. You can do only One Node at the time. the same screens as above are showing so no reason to capture this. However I have one node that has no fixed IP

image

When Adding this node there is a little warning.

image image

As you can see the IP is not there therefore I do ADD and create a FIX IP on the NIC when I select Next the port policy will appear and the node Will be joined to the Cluster.

image

If anything fails to join the NLB node to the Cluster you need to look on this node. Creating NLB is a simple Process. Basic rule all nics need to See and Ping on FQDN and IP incoming and outgoing ! and make sure the NLB DNS entry is there and make sure the reversed lookup is also there!

When joining the NLB IP to IIS make sure you use the Cluster NLB IP and remove all other IP bindings!!

image

 

Happy nlb clustering

Robert Smit

@clusterMVP

https://robertsmit.wordpress.com

Posted June 4, 2015 by Robert Smit [MVP] in Windows Server 2012 R2

Tagged with

  • Twitter

  • Follow

    Get every new post delivered to your Inbox.

    Join 1,704 other followers

    %d bloggers like this: