<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Gareth Emslie's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/garethemslie/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/garethemslie/feed.xml</link>
    <description>Troubleshooting Development, Opinions are my own!</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:39:43 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Out of process hosting of ASP .NET Core with IIS, do AppPool resource limits apply?</title>
      <link>https://docs.microsoft.com/archive/blogs/garethemslie/out-of-process-hosting-of-asp-net-core-with-iis-do-apppool-resource-limits-apply</link>
      <pubDate>Tue, 01 May 2018 12:39:16 GMT</pubDate>
      <dc:creator><![CDATA[Gareth Emslie - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/garethemslie/?p=1635</guid>
      <description><![CDATA[In IIS we can impose resource limits on the Application Pool hosting our Web Applications, in this...]]></description>
      <content:encoded><![CDATA[In IIS we can impose resource limits on the Application Pool hosting our Web Applications, in this scenario we are typically hosting in-process i.e. ASP .NET, but do these limits still apply when we host a ASP .NET Core 2.0 application?

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2018/04/cpu.png"><img width="370" height="460" class="alignnone wp-image-1645" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/04/cpu-241x300.png" /></a> <a href="https://msdnshared.blob.core.windows.net/media/2018/04/recycle.png"><img width="370" height="460" class="alignnone wp-image-1655" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/04/recycle-241x300.png" /></a>

&nbsp;

Currently we host our ASP .NET Core applications out-of-process using a reverse proxy and kestrel therefore it wasn't clear to me whether these limits would be enforced. So I wanted to take a closer look...

IIS leverages <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms684161(v=vs.85).aspx">JobObjects</a> an OS feature which allows us to manage multiple processes as a single Unit, as well as allowing us to impose limits on resource usage for these processes.  In Windows 7, Windows Server 2008 R2 and below JobObjects could not be nested and we ran into issues with other out-of-process hosting solutions like the <a href="https://blogs.iis.net/mailant/managing-cpu-utilization-for-iis-worker-processes-that-use-fastcgi-module">FastCGI module</a> which also leveraged JobObjects internally to ensure that FastCGI processes are terminated when the worker process terminates. If we look at the implementation of the <a href="https://github.com/aspnet/AspNetCoreModule">ASP .NET Core Module </a> which we use for hosting ASP .NET Core Apps in IIS we can see what looks like a very similar usage of JobObjects.

&nbsp;

<a href="https://github.com/aspnet/AspNetCoreModule/blob/3b6a01945e687d8a4bd862ff140a9ed528c09f14/src/RequestHandler/outofprocess/serverprocess.cxx#L55"><img width="712" height="686" class="alignnone wp-image-1665 " alt="" src="https://msdnshared.blob.core.windows.net/media/2018/04/githubaspnetmodule-1024x987.png" /></a>

&nbsp;

It turns out that Microsoft added support for nested JobObjects in  Windows 8 &amp; Windows Server 2012 and above therefore we don't run into the same issues which we experienced with Windows 7 and Server 2008 r2 and below. Its simple enough for us to test, I setup a simple ASP .NET Core application and deployed it to a Windows Server 2016 machine on Azure.  Before applying any limits we can take a look at the w3wp child process tree on the server with <a href="https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer">Process Explorer</a>(If no worker process currently running issue at least one http request against your web application), we can see that there are 2 child processes under our w3wp worker process, we also see that there are Job limits applied to the dotnet.exe process which is hosting our .net core application - In this case it should be killed if the parent Job is closed.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2018/05/procexp_before.png"><img width="543" height="479" class="alignnone wp-image-1675 " alt="" src="https://msdnshared.blob.core.windows.net/media/2018/05/procexp_before-1024x903.png" /></a>

&nbsp;

To see if CPU limits are applied lets set a limit of 10% on the app pool, open IIS Manager-&gt;Application Pools-&gt;App Pool-&gt;Advanced Settings on the server. Leave the rest as default as we only want to inspect the Job limits for the process using Process Explorer.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2018/05/iis_limit.png"><img width="507" height="96" class="alignnone wp-image-1685 " alt="" src="https://msdnshared.blob.core.windows.net/media/2018/05/iis_limit.png" /></a>

&nbsp;

After making the changes we can inspect the w3wp child process tree again in Process Explorer, what we can see is that the w3wp process now has a job tab which lists the Job limits for its nested Jobs, these limits are applied to this Job as well as all nested Jobs.
As we can see our CPU limits have been applied in the form of <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms684147(v=vs.85).aspx">User CPU Limit and Job Time Limit</a>.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2018/05/iis_limits_cpu.png"><img width="435" height="564" class="alignnone wp-image-1695 " alt="" src="https://msdnshared.blob.core.windows.net/media/2018/05/iis_limits_cpu-790x1024.png" /></a>

&nbsp;

<strong>Tip</strong>
With the upcoming ASP .NET Core 2.1 release we should also have the ability to host our applications in-process with IIS, see the following <a href="https://berserkerdotnet.github.io/blog/aspnet-core-2-1-inprocess-hosting/">post</a> on how to enable it for up to 4x the throughput.

<strong>References :</strong>
<ul>
 	<li><a href="https://github.com/aspnet/AspNetCoreModule/blob/3b6a01945e687d8a4bd862ff140a9ed528c09f14/src/RequestHandler/outofprocess/serverprocess.cxx#L55">https://github.com/aspnet/AspNetCoreModule/blob/3b6a01945e687d8a4bd862ff140a9ed528c09f14/src/RequestHandler/outofprocess/serverprocess.cxx#L55</a></li>
 	<li><a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/?tabs=aspnetcore2x&amp;view=aspnetcore-2.1">https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/?tabs=aspnetcore2x&amp;view=aspnetcore-2.1</a></li>
 	<li><a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?view=aspnetcore-2.1">https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?view=aspnetcore-2.1</a></li>
 	<li><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms684161(v=vs.85).aspx#job_limits_and_notifications">https://msdn.microsoft.com/en-us/library/windows/desktop/ms684161(v=vs.85).aspx#job_limits_and_notifications</a></li>
 	<li><a href="https://blogs.iis.net/mailant/managing-cpu-utilization-for-iis-worker-processes-that-use-fastcgi-module">https://blogs.iis.net/mailant/managing-cpu-utilization-for-iis-worker-processes-that-use-fastcgi-module</a></li>
 	<li><a href="https://www.iis.net/downloads/microsoft/fastcgi-for-iis">https://www.iis.net/downloads/microsoft/fastcgi-for-iis</a></li>
 	<li><a href="https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/cpu">https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/cpu</a></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Azure Container Instances Rock!</title>
      <link>https://docs.microsoft.com/archive/blogs/garethemslie/azure-container-instances-rock</link>
      <pubDate>Wed, 07 Mar 2018 21:39:56 GMT</pubDate>
      <dc:creator><![CDATA[Gareth Emslie - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/garethemslie/?p=1605</guid>
      <description><![CDATA[I was recently updating an old website, I decided to move the old ASP .NET Web Forms code base over...]]></description>
      <content:encoded><![CDATA[I was recently updating an old website, I decided to move the old ASP .NET Web Forms code base over to latest and greatest ASP .NET Core 2.0 and <a href="https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages/?tabs=visual-studio">Razor Pages</a>. It wasn't a large code base but it did contain some Flash and Silverlight, which given declining client support I decided to replace with equivalent HTML5 and JavaScript. The experience was so enjoyable I decided to blog about it!
<h2>Migrate Code base</h2>
My first step was to get a local copy of the source code for the site, the code was not even in source control... naughty naughty, luckily it was not a pre-compiled web application and the VB .NET... yes you read it correctly <strong>VB .NET</strong> :) source code was still available.

As there was not a lot of server-side code involved I decided to port it over to C#, .NET Core supports VB .NET but I'm not sure about support for the language in ASP .NET Core see this <a href="https://github.com/aspnet/Home/issues/2738">github issue #2738</a> for some interesting history. Anyway I see more and more C# samples out there and it makes my life easier to have everything in 1 language.

I wanted to be able to deploy this web application to any Azure PaaS which supported Containers or even some other cloud so I decided to build a Docker Image, this was literally 1 checkbox checked during File-&gt;New Project in Visual Studio 2017

<a href="https://msdnshared.blob.core.windows.net/media/2018/03/vswizardcontainer.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/03/vswizardcontainer-1024x668.png" alt="" width="535" height="349" class="alignnone wp-image-1585" /></a>

You will also find a Dockerfile in the root of your ASP.NET Core project, it defines a <a href="https://docs.docker.com/develop/develop-images/multistage-build/">multistage docker build</a>, We will use this file later when we build our solution in VSTS/TFS. The final image generated by the build command will only contain the release binaries &amp; output for your web application.
<pre>FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 80

FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY *.sln ./
COPY MyWebApplication/MyWebApplication.csproj MyWebApplication/
RUN dotnet restore
COPY . .
WORKDIR /src/MyWebApplication
RUN dotnet build -c Release -o /app

FROM build AS publish
RUN dotnet publish -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "MyWebApplication.dll"]
</pre>
To ensure I didn't disrupt future traffic I leveraged the <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/url-rewriting?tabs=aspnetcore2x">ASP .NET Core URL Rewriting Middleware</a> to redirect all traffic destined for the old .aspx pages to the new shiny Razor Pages. Ok we are now ready to move onto the next step and build our solution!
<h2>Continuous Integration with VSTS</h2>
I wanted to simplify making any future changes to my solution therefore I chose to push my code up to <a href="https://www.visualstudio.com/team-services/">Visual Studio Team Services</a>, I will also use the build automation functionality provided by VSTS to setup a CI build.  With the multi-stage dockerfile our lives are made a lot easier as we bootstrap the build on the Build Agent using a docker image which contains the .NET Core SDK. This running "build" container is then used to build our solution and finally to produce the final Docker Image - we then push our Docker Image to a private Docker registry on <a href="https://azure.microsoft.com/en-us/services/container-registry/">Azure Container Registry.</a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/03/build-container.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/03/build-container-1024x632.png" alt="" width="512" height="316" class="alignnone wp-image-1595" /></a>

In addition to the build task setup above we also set our trigger for this Build definition to enable CI as seen below.

<a href="https://msdnshared.blob.core.windows.net/media/2018/03/triggers.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/03/triggers-1024x423.png" alt="" width="761" height="314" class="alignnone wp-image-1625" /></a>

For more details how how you can build container images with VSTS/TFS check out the following resource - <a href="https://docs.microsoft.com/en-us/vsts/build-release/apps/containers/build?tabs=web">https://docs.microsoft.com/en-us/vsts/build-release/apps/containers/build?tabs=web</a>
<h2>Deployment</h2>
I went back and forth thinking where I should deploy my container, App Service Containers, AKS, ACS... we are really spoilt for choice on Azure. In the end I decide on <a href="https://azure.microsoft.com/en-us/services/container-instances/">Azure Container Instance</a>, I found this to be the simplest option!

To perform the deployment I needed an Azure Subscription and the Azure Cross Platform CLI installed, this is available through the Azure Cloud Shell or to install on your local machine - <a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest" title="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest">https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest</a>

Once I had the tooling installed locally I needed to login to my subscription, in my case I am using <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">Windows Subsystem for Linux</a> &amp; Ubuntu.
<pre>$ az login<i></i></pre>
The login command will output further steps to the console which must be performed in your browser, once authenticated we can move on to deploying your container.<i>
</i>

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/login.jpg"><img width="1024" height="295" class="alignnone wp-image-1345 size-large" alt="az login" src="https://msdnshared.blob.core.windows.net/media/2018/01/login-1024x295.jpg" /></a>

Create a resource group which will contain your Container Group
<pre>$ az group create --name <strong>MyWebApplicationRG</strong>--location <strong>westeurope
</strong></pre>
Finally we can deploy our container instance, specifying the docker image to deploy as well as the required resources for the instance.
<pre>$ az container create --resource-group <strong>MyWebApplicationRG</strong> --name <strong>gewebapp</strong> \
--image <strong>&lt;acrLoginServer&gt;/ImageName:Tag</strong> <strong>--cpu 1 --memory 1</strong> --registry-username <strong>&lt;acrName&gt;</strong> \
--registry-password <strong>&lt;acrPassword&gt;</strong> --dns-name-label <strong>gewebapp</strong> --ports <strong>80</strong></pre>
This command will return a JSON result which will contain interesting information about your Container Group, you will see things like the public IP Address &amp; FQDN which point to your running container, the container will be listening for traffic on TCP port 80. All I had to do was point my DNS to this new IP and I was done.

For more information how deploying a simple Azure Container Instance check out the following resource - <a href="https://docs.microsoft.com/en-us/azure/container-instances/container-instances-tutorial-deploy-app">https://docs.microsoft.com/en-us/azure/container-instances/container-instances-tutorial-deploy-app</a>
<h2>Conclusion</h2>
At this point we still have a manual deployment step but its fairly straight forward to automate it using<a href="https://docs.microsoft.com/en-us/vsts/build-release/concepts/definitions/release/"> Release Management</a>, but as you can see we went from legacy app to a modern one in literally 60 minutes, for sure this was a simple scenario but there are a lot of single function enterprise apps out there which could benefit a bit of modernization!
<h3>Tip</h3>
Check out <a href="https://github.com/virtual-kubelet/virtual-kubelet">Virtual Kubelet Project</a> this is a cool piece of code contributed to the community by Microsoft which allows us to add capacity to a Kubernetes cluster without adding additional nodes to the cluster, this could be a stop gap while you are provisioning new resources. The real cool thing is that you can extend your cluster with Azure Container Instances!

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Deploying Kubernetes with Azure</title>
      <link>https://docs.microsoft.com/archive/blogs/garethemslie/deploying-kubernetes-with-azure</link>
      <pubDate>Tue, 27 Feb 2018 08:04:37 GMT</pubDate>
      <dc:creator><![CDATA[Gareth Emslie - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/garethemslie/?p=1335</guid>
      <description><![CDATA[I’m loving everything related to containers at the moment, in Azure we have a number of ways that we...]]></description>
      <content:encoded><![CDATA[I’m loving everything related to containers at the moment, in Azure we have a number of ways that we can deploy our container work loads:
<ul>
 	<li><a href="https://azure.microsoft.com/en-us/services/container-instances/">Azure Container Instances</a></li>
 	<li><a href="https://azure.microsoft.com/en-us/services/app-service/containers/">Azure App Service</a></li>
 	<li><a href="https://azure.microsoft.com/en-us/services/container-service/">Azure Container Service(AKS/ACS)</a></li>
 	<li><a href="https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-containers-overview">Azure ServiceFabric</a></li>
</ul>
Each brings with it its own benefits and challenges some of which are listed below:
<ul>
 	<li>Container Instances &amp; App Services are great for low complexity single container deployments, using these services developers need not be concerned about creating &amp; managing a cluster.</li>
 	<li>AKS(PREVIEW) is a Kubernetes specific solution which is great for building highly available complex container deployments, AKS clusters require minimal maintenance due to built-in support for auto-scaling, auto-patching, auto-updates etc.</li>
 	<li>ACS supports deploying multiple Orchestrators and is also great <span>for complex container workloads </span>but the burden of maintaining your cluster falls mainly on you.</li>
 	<li>ServiceFabric is a battle tested distributed system which now also has the ability to orchestrate container workloads along side its native programming models i.e. Reliable Services and Reliable Actors.</li>
</ul>
In this post I will demonstrate the various ways of deploying a Kubernetes cluster on Azure, <a href="https://kubernetes.io/">Kubernetes</a> is a popular container orchestration solution. A container orchestrator allows us to amongst other things automate deployments, scale our workloads and monitor our deployments.

There are multiple ways we can deploy Kubernetes on Azure:
<ul>
 	<li>Azure Container Service(ACS)
<ul>
 	<li><a href="https://portal.azure.com">Portal</a> or <a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest">CLI</a></li>
 	<li><a href="https://github.com/Azure/acs-engine">ACS-Engine</a></li>
</ul>
</li>
 	<li>Azure Container Service(AKS)
<ul>
 	<li><a href="https://portal.azure.com">Portal</a> or <a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest">CLI</a></li>
</ul>
</li>
 	<li>Manually using IaaS and core compute i.e. VMs/VM Scalesets/VNET’s etc, this method is out of scope of this blog post.</li>
</ul>
<h2>Requirements</h2>
To follow along with the steps in this blog post you will need a Azure Subscription and the Azure Cross Platform CLI installed, this is available through the Azure Cloud Shell or to install on your local machine - <a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest" title="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest">https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest</a>

If you have the tooling installed locally you need to first login to your subscription, in my case I will be using <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">Windows Subsystem for Linux</a> &amp; Ubuntu.
<pre>$ az login<i></i></pre>
The login command will output further steps to the console which must be performed in your browser, once authenticated we can move on to creating our cluster.<i>
</i>

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/login.jpg"><img width="1024" height="295" class="alignnone wp-image-1345 size-large" alt="az login" src="https://msdnshared.blob.core.windows.net/media/2018/01/login-1024x295.jpg" /></a>
<h2>ACS</h2>
First step is to create a new Azure Resource Group which will contain all the resources which will be provisioned for our cluster, we need to provide a name and the region where we would like to create it.
<pre>$ az group create --name <strong>geacsclusterrg</strong> --location <strong>westeurope
</strong></pre>
In the output from the command we should see "ProvisioningState Succeeded"

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/create-rg.jpg"><img width="1024" height="262" class="alignnone size-large wp-image-1355" alt="creqate resource group" src="https://msdnshared.blob.core.windows.net/media/2018/01/create-rg-1024x262.jpg" /></a>

We can now provision the cluster - To do this we need to provide a number of arguments including the Resource Group name created in the previous step, Cluster Name, the SSH key which we will use to authenticate with the head node and admin credentials for each node in the cluster.
<pre>$ az acs create --orchestrator-type=<strong>kubernetes</strong> \
--resource-group <span style="font-size: 16px"><strong><span>geacsclusterrg</span></strong></span> \
--name=<strong>myclustername</strong>\
--agent-count=<strong>2</strong> \
--generate-ssh-keys \
<strong>--windows</strong> --admin-username <strong>gareth </strong>\
--admin-password <strong>“MyStrongPassword”</strong></pre>
The command above will create a 3 node cluster, 1 head node(Linux) and 2 agents(Windows), during the course of the deployment it will also generate an SSH KeyPair (this will be located in [User Profile]\.ssh\) these keys will be used to manage our cluster. Once the command completes it will output a json result and again we should see "provisioningState Succeeded" if the deployment was successful.

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/CreatedCluster.png"><img width="1024" height="317" title="CreatedCluster" alt="CreatedCluster" src="https://msdnshared.blob.core.windows.net/media/2018/02/CreatedCluster_thumb.png" /></a>

If you login to the Azure Portal and open the ResourceGroup which you created you will see all the platform specific resources which were deployed to create your ACS Cluster.

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/clusterportal1.png"><img width="512" height="492" title="clusterportal" alt="clusterportal" src="https://msdnshared.blob.core.windows.net/media/2018/02/clusterportal_thumb1.png" /></a>
<h3>Connecting to our Cluster</h3>
To manage our cluster we need the kubectl tool we can download the binary manually using the instructions detailed in the kubernetes <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">docs</a> or we can use the Azure CLI using the following command.
<pre>$ az acs kubernetes install-cli</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/kubectldownload.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/kubectldownload-1024x78.png" alt="" width="1024" height="78" class="alignnone size-large wp-image-1435" /></a>

On linux this command will place the kubectl binary somewhere on your PATH but on Windows you may want to use the following switch <em>--install-location "%ProgramFiles(x86)%\kubernetes\kubectl.exe" </em>to specify a download location. You would then need to add the "%ProgramFiles(x86)%\kubernetes" folder to the PATH.

To connect to our cluster we need to download our kubeconfig &amp; test the connection by getting a list of nodes in the cluster we can do this using the following commands.
<pre>$ az acs kubernetes get-credentials --resource-group=<strong>geacsclusterrg</strong> --name=<strong>myclustername</strong>
$ kubectl get nodes</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/kubectlplustest.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/kubectlplustest-1024x117.png" alt="" width="1024" height="117" class="alignnone size-large wp-image-1445" /></a>

Kubernetes also comes with a great <a href="https://github.com/kubernetes/dashboard">web dashboard</a> when deploying on ACS the dashboard is included automatically, we can access the dashboard over a SSH tunnel.
<pre>$ kubectl proxy</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/proxy.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/proxy-1024x48.png" alt="" width="1024" height="48" class="alignnone size-large wp-image-1455" /></a>

We can now open a browser and navigate to <a href="https://127.0.0.1:8001/ui/">https://127.0.0.1:8001/ui/</a>(If the browser window is blank make sure to include a trailing forward slash at the end of the url)

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/kubedashboard.png"></a>
<h2>AKS</h2>
AKS simplifies managing a kubernetes cluster, the service is currently in preview and during this period there are a number of limitations:
<ul>
 	<li>Manually register the AKS Azure resource provider</li>
 	<li>We can also only deploy Linux agents(Windows support is coming).</li>
</ul>
So to create our cluster we run the following commands, first we need to ensure the the Azure resource provider is registered for the Container Service.
<pre>$ az provider register -n Microsoft.ContainerService</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/providerreg.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/providerreg-1024x41.png" alt="" width="1024" height="41" class="alignnone size-large wp-image-1465" /></a>

Then we can create the Azure Resource Group which will contain our AKS instance
<pre>$ az group create --name <strong>geacsclusterrg</strong> --location <strong>westeurope</strong></pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/01/create-rg.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2018/01/create-rg-1024x262.jpg" alt="create resource group" width="1024" height="262" class="alignnone size-large wp-image-1355" /></a>

Once the Resource Group is successfully created we start the deployment of our AKS instance.
<pre>$ az aks create --resource-group <span><strong>geacsclusterrg</strong></span> --name <strong>myclustername </strong>--node-count <strong>2</strong> --generate-ssh-keys</pre>
The command above will create a 2 node cluster(Linux) with a managed head node, during the course of the deployment it will also generate an SSH KeyPair (this will be located in [User Profile]\.ssh\) these keys will be used to manage our cluster. Once the command completes it will output a json result and we should see "provisioningState Succeeded".

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/akscreated.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/akscreated-1024x326.png" alt="" width="1024" height="326" class="alignnone size-large wp-image-1475" /></a>

If you login to the Azure Portal and open the ResourceGroup which you created you will see all the platform specific resources which were deployed to create your ACS Cluster. What is interesting is that in actual fact we see two new Resource Groups in our Azure subscription, the first being the one we created which contains a "Container Service" resource.

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/aksrg.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/aksrg-1024x288.png" alt="" width="554" height="156" class="alignnone wp-image-1495" /></a>

In addition to the Resource Group above we get another which was created during the deployment and
contains all the resources Compute, Storage Network etc for our worker nodes.

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/aksrg2.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/aksrg2-1024x614.png" alt="" width="552" height="331" class="alignnone wp-image-1485" /></a>
<h3>Connecting to our Cluster</h3>
The steps to connect to our cluster are very similar to ACS, first we need the kubectl tool. We can download the binary manually using the instructions detailed in the kubernetes <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">docs</a> or we can use the Azure CLI using the following command.
<pre>$ az aks install-cli</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/akscli.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/akscli-1024x74.png" alt="" width="1024" height="74" class="alignnone size-large wp-image-1505" /></a>

On linux this command will place the kubectl binary somewhere on your PATH but on Windows you may want to use the following switch <em>--install-location "%ProgramFiles(x86)%\kubernetes\kubectl.exe" </em>to specify a download location. You would then need to add the "%ProgramFiles(x86)%\kubernetes" folder to the PATH.

To connect to our cluster we need to download our kubeconfig &amp; test the connection by getting a list of nodes in the cluster we can do this using the following commands.
<pre>$ a<span class="hljs-keyword">z</span><span> aks get-credentials</span> --resource-group=<strong>geacsclusterrg</strong> --name=<strong>myclustername</strong>
$ kubectl get nodes</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/akskubectl.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/akskubectl-1024x151.png" alt="" width="1024" height="151" class="alignnone size-large wp-image-1515" /></a>

Note that in the case of AKS we only deploy the agents, the Head nodes are managed for us by the platform. Kubernetes also comes with a great <a href="https://github.com/kubernetes/dashboard">web dashboard</a> - when deploying on AKS the dashboard is included automatically, we can access the dashboard over a SSH tunnel.
<pre>$ az aks browse --resource-group=<strong>geacsclusterrg</strong> --name=<strong>myclustername</strong></pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/aksbrowse.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/aksbrowse-1024x269.png" alt="" width="1024" height="269" class="alignnone size-large wp-image-1516" /></a>

We can now open a browser and navigate to <a href="https://127.0.0.1:8001/ui/">https://127.0.0.1:8001/ui/</a>(If the browser window is blank make sure to include a trailing forward slash at the end of the url)
<h2>ACS-Engine</h2>
ACS-Engine allows us to define complex container deployments for Azure we describe them as JSON and the tool then converts this JSON to a set of ARM Templates which can be deployed to Azure. I chose to build acs-engine from source and in my case I used the Windows Subsystem for Linux &amp; Ubuntu, but you can also download pre-compiled binaries - for more details see - <a href="https://github.com/Azure/acs-engine/blob/master/docs/acsengine.md">https://github.com/Azure/acs-engine/blob/master/docs/acsengine.md</a>

Before we continue we need to:
<ol>
 	<li>Generate a SSH KeyPair - <a href="https://github.com/Azure/acs-engine/blob/master/docs/ssh.md#ssh-key-generation">https://github.com/Azure/acs-engine/blob/master/docs/ssh.md#ssh-key-generation</a></li>
 	<li>Create a Service Principal with read/write permissions on your subscription - <a href="https://github.com/Azure/acs-engine/blob/master/docs/ssh.md#ssh-key-generation">https://github.com/Azure/acs-engine/blob/master/docs/ssh.md#ssh-key-generation</a></li>
</ol>
Next we can create a cluster definition  - The JSON below will create a hybrid Windows/Linux ACS cluster using Kubernetes, replace the values for keyData and ServicePrincipal with the values you created above.
<pre>{
 "apiVersion": "vlabs",
 "properties": {
 "orchestratorProfile": {
 "orchestratorType": "Kubernetes"
 },
 "masterProfile": {
 "count": 1,
 "dnsPrefix": "gemycluster",
 "vmSize": "Standard_A2"
 },
 "agentPoolProfiles": [
 {
 "name": "windowspool1",
 "count": 2,
 "vmSize": "Standard_A3",
 "availabilityProfile": "AvailabilitySet",
 "osType": "Windows"
 },
 {
 "name": "linuxpool1",
 "count": 1,
 "vmSize": "Standard_A2",
 "availabilityProfile": "AvailabilitySet",
 "osType": "Linux"
 }
 ],
 "windowsProfile": {
 "adminUsername": "gareth",
 "adminPassword": "MyStringPassword"
 },
 "linuxProfile": {
 "adminUsername": "azureuser",
 "ssh": {
 "publicKeys": [
 {
 "keyData": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
 }
 ]
 }
 },
 "servicePrincipalProfile": {
 "clientId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
 "secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
 }
 }
}</pre>
Save the text above as a file called acs-kubernetes.json, we can then convert the JSON to the equivilent ARM Templates using the following command.
<pre>$ ./bin/acs-engine generate $HOME/acs-kubernetes.json</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-1024x40.png" alt="" width="1024" height="40" class="alignnone size-large wp-image-1525" /></a>

The deployment files will be placed in the _output folder

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-out.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-out-1024x78.png" alt="" width="1024" height="78" class="alignnone size-large wp-image-1535" /></a>

To deploy the generated ARM Template we can use the Azure CLI, first create the Resource Group.
<pre>$ az group create --name <strong>geacsclusterrg</strong> --location <strong>westeurope</strong></pre>
Then finally run the deployment script
<pre>$ az group deployment create -g <strong>geacsclusterrg</strong> -n <strong>myclusterdeploy</strong> \
 --template-file <strong>azuredeploy.json</strong> \
 --parameters @azuredeploy.parameters.json 
</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-deploy.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-deploy-1024x188.png" alt="" width="1024" height="188" class="alignnone size-large wp-image-1536" /></a>

In the JSON output look for the property <span>MASTERFQDN for example in this case mine would be gemycluster.westeurope.cloudapp.azure.com , we will use this in the next section.</span>

If you login to the Azure Portal and open the ResourceGroup which you created you will see all the platform specific resources which were deployed to create your ACS Cluster.

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-rg.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-rg-1024x883.png" alt="" width="556" height="479" class="alignnone wp-image-1545" /></a>
<h3>Connecting to our Cluster</h3>
If you haven't already downloaded the binary you can do so manually using the instructions detailed in the kubernetes <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">docs</a> making sure to match the version used for the cluster. Can also be achieved through the Azure CLI and the <em>--client-version </em>switch.

Its best to place the kubectl binary somewhere on your PATH on Windows you may want to place it in location like<em> "%ProgramFiles(x86)%\kubernetes\kubectl.exe" and then you</em> need to add the "%ProgramFiles(x86)%\kubernetes" folder to your PATH environment variable.

To connect to our cluster we also need to download our kubeconfig &amp; test the connection by getting a list of nodes in the cluster we can do this using the following commands.

First we need to download the kubeconfig from the newly created master node on linux you can execute the following commands.
<pre>$ scp azureuser@gMASTERFQDN:.kube/config .
$ export KUBECONFIG=`pwd`/config</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-config.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-config-1024x112.png" alt="" width="1024" height="112" class="alignnone size-large wp-image-1537" /></a>
<pre>$ kubectl get nodes</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-nodespng.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/acs-engine-nodespng-1024x133.png" alt="" width="1024" height="133" class="alignnone size-large wp-image-1555" /></a>

ACS-Engine's deployment of kubernetes also includes a great <a href="https://github.com/kubernetes/dashboard">web dashboard</a> we can access the dashboard over a SSH tunnel.
<pre>$ kubectl proxy</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/proxy.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/proxy-1024x48.png" alt="" width="1024" height="48" class="alignnone size-large wp-image-1455" /></a>

We can now open a browser and navigate to <a href="https://127.0.0.1:8001/ui/">https://127.0.0.1:8001/ui/</a>(If the browser window is blank make sure to include a trailing forward slash at the end of the url)
<h2>Summary</h2>
There you go we have successfully deployed our first kubernetes cluster on Azure! As we saw there are multiple strategies for deploying our container workloads to Azure, its up to you which you choose. Once we successfully completed the steps above we should be looking at the Kubernetes dashboard displayed below.

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/kubedashboard.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/02/kubedashboard-1024x369.png" alt="" width="1024" height="369" class="alignnone size-large wp-image-1425" /></a>

<strong>In the next post we will look at deploying an application to our cluster.</strong>]]></content:encoded>
    </item>
    <item>
      <title>Windows Embedded Compact 7 Development on Windows 10</title>
      <link>https://docs.microsoft.com/archive/blogs/garethemslie/windows-embedded-compact-7-development-on-windows-10</link>
      <pubDate>Sun, 30 Apr 2017 16:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Gareth Emslie - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/garethemslie/?p=75</guid>
      <description><![CDATA[Although the following scenario works keep in mind that it is not necessarily supported by...]]></description>
      <content:encoded><![CDATA[<p><strong><em>Although the following scenario works keep in mind that it is not necessarily supported by Microsoft, use the information at own risk. It’s important to note that official <a href="https://blogs.msdn.microsoft.com/visualstudio/2017/04/10/end-of-support-for-visual-studio-2008-in-one-year/">Support</a> for Visual Studio 2008 ends April 10th 2018.</em></strong></p> <p>Recently I spent time looking into this scenario, a colleague pointed me to a post on the <a href="https://social.msdn.microsoft.com/Forums/en-US/6907cd42-ee62-48ee-ae3d-2a4186c8ca2d/wec7-and-hyperv?forum=winembplatdev">MSDN forums</a> where users had got a WEC 7 image to boot with Hyper-V on Windows 10.</p> <p>So I thought I would try it <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/2017/03/wlEmoticon-smile3.png"> and after finally getting it to work I decided to document it so I can reference this article in the future. My goal was to run my WEC 7 images in the latest and greatest Windows Hypervisor i.e. Hyper-V. Keep in mind Virtual PC works fine in a Windows 7 Hyper-V guest VM and up until now this is how I have done my development &amp; testing.</p> <p>The high level steps I performed were as follows:</p> <ol> <li>Setup Hyper-V Networking.  <ol> <li>Create NAT Network &amp; Switch.  <li>Install &amp; Configure DHCP server. </li></ol> <li>Setup the Developer Tools.  <ol> <li>Install Visual Studio 2008 with SP 1  <li>Install Windows Embedded Compact 7 </li></ol> <li>Create Simple OS Design.  <ol> <li>Create BSP clone based on Virtual PC BSP  <ol> <li>Tweak for use with Hyper-V </li></ol> <li>Configure Network  <li>Create OS Design project </li></ol> <li>Add Hyper-v Guest for WEC 7  <ol> <li>Create Virtual Machine  <li>Run VM &amp; Download OS Image </li></ol></li></ol> <p>So here it goes these are the detailed steps I performed to get my Embedded Compact Developer environment migrated to Windows 10</p> <p>Requirements</p> <ul> <li>Windows 10 Creators Update –1703  <li>Visual Studio 2008 Pro SP1  <li>Windows Embedded Compact 7 with Jan 2016 Update  <li>DHCP for Windows </li></ul> <h2>1. Setup Hyper-V Networking</h2> <p><a href="https://en.wikipedia.org/wiki/Network_address_translation">Network Address Translation</a> allows us define a private IP address range for our VM’s, whereby traffic will be re-routed through our host machines network interface, this together with a DCHP server allows us to allocated individual private IP’s to our VM’s and also allows them access to the public internet. NAT is not strictly necessary here but this is my preferred way of configuring networking for my Virtual Machines.</p> <p>Initial <a href="https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/setup-nat-network">NAT Network</a> support was added in the Anniversary Update release of Windows 10, although there were some restrictions on its usage see the <a title="WinNAT capabilities and limitations blog" href="https://blogs.technet.microsoft.com/virtualization/2016/05/25/windows-nat-winnat-capabilities-and-limitations/">WinNAT capabilities and limitations blog post</a> – in the Creators Update release the windows team vastly improved NAT support by amongst other things adding support for multiple NAT networks.</p> <h3>1.1 Create NAT Network &amp; Add Switch</h3> <p>From the windows Start Menu, search for PowerShell right click and select “Run as Administrator”</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image528.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb516.png" width="298" height="232"></a></p> <p>Once the PowerShell console opens run the following commands.</p> <p>1. Create a new NAT network with the name “VMNAT” and a large private IP address range 10.10.0.0/17</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image514.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb502.png" width="901" height="243"></a></p> <p>2. Create a new Internal Virtual Switch</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image515.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb503.png" width="912" height="140"></a></p> <p>3. Remove the default IP address configuration for the new Switch</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image516.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb504.png" width="924" height="88"></a></p> <p>4. Get the interface index for the Network Adaptor assigned to the new Switch</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image517.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb505.png" width="941" height="109"></a></p> <p>5. Create a new IP Address within the NAT network range created above</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image518.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb506.png" width="958" height="461"></a></p> <p>We are now ready to proceed to adding a local DHCP server, we could also skip the “Add Local DHCP” step and assign static IP’s to each VM without configuring a DHCP server.</p> <h3>1.2 Add Local DHCP</h3> <p>For DHCP I am using the simple tool <a href="https://dhcpserver.de/cms">DHCP Server for Windows</a>, I wanted a simple and lightweight way of installing &amp; configuring a local DHCP server and this tool meets those needs.</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image519.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb507.png" width="963" height="448"></a></p> <p>&nbsp;</p> <p>1. Download and extract the latest release of DHCP for Windows, I extract it somewhere central like the Program Files folder.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image520.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb508.png" width="867" height="335"></a></p> <p>&nbsp;</p> <p>2.&nbsp; Right click and run the “dhcpwiz.exe” tool as Administrator to start the setup wizard, click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image521.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb509.png" width="528" height="432"></a></p> <p>&nbsp;</p> <p>3. The available network cards will be displayed, select the “vEthernet (Virtual Machines NAT)” network which we created earlier &amp; click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image522.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb510.png" width="527" height="438"></a></p> <p>&nbsp;</p> <p>4. Leave the defaults for the Support Protocols Pane &amp; click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image523.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb511.png" width="534" height="441"></a></p> <p>&nbsp;</p> <p>5. Leave the default configuration for DHCP, the range should already co-inside with your Network interface IP &amp; click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image524.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb512.png" width="539" height="450"></a></p> <p>&nbsp;</p> <p>6. click “Advanced” - Add your favorite public DNS servers, in this case I am using Google’s, and set your default gateway to your NIC IP.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image525.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb513.png" width="544" height="607"></a></p> <p>&nbsp;</p> <p>7. click “Write INI file” this will persist the settings you have configured through the wizard &amp; click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image526.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb514.png" width="514" height="429"></a></p> <p>&nbsp;</p> <p>8. There are two ways to run the DHCP server, I prefer to install it as a Windows Service. Click Service –&gt; Install and then Service –&gt; Start.<br>If you have your firewall enabled click Configure under the Firewall Exceptions section.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image527.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb515.png" width="496" height="412"></a></p> <h2>2. Setup the Developer Tools.</h2> <p>In this guide I install the tooling on the same machine but because I like to keep only the latest version of Visual Studio installed <br>on my machine my preference is to install the developer tooling in a guest VM(could be Windows 7 or Windows 10 guest).</p> <p>To install Windows Embedded Compact 7 you must meet the following <a href="https://msdn.microsoft.com/en-us/library/jj200345(v=winembedded.70).aspx">requirements</a>.</p> <h3>2.1 Install Visual Studio 2008</h3> <p>Based on the requirements we need to install Visual Studio 2008 with SP1, and it needs to be the Professional or higher SKU.</p> <p>1. Run the Visuals Studio 2008 installer, click Install Visual Studio</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image532.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb520.png" width="522" height="425"></a></p> <p>&nbsp;</p> <p>2. For simplicity I have selected the Default installation option</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image533.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb521.png" width="675" height="516"></a></p> <p>&nbsp;</p> <p>3. Wait for Installation to complete &amp; click next. <br><strong>*note* you will be notified about various compatibility issues by the installer.</strong></p> <p><strong></strong>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image534.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb522.png" width="679" height="521"></a></p> <p>&nbsp;</p> <p>5. Once installation completes close the installer wizard.</p> <p>6. Download <a href="https://www.microsoft.com/en-us/download/confirmation.aspx?id=10986">Visual Studio 2008 SP1</a> &amp; Install.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image538.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb526.png" width="539" height="508"></a></p> <p>&nbsp;</p> <p>You should now be ready to install Windows Embedded Compact 7</p> <h3>2.2 Install Windows Embedded Compact 7</h3> <p>1. Insert the WEC 7 installation media and run the installer, click Begin Install.</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image529.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb517.png" width="685" height="449"></a></p> <p>&nbsp;</p> <p>2. Accept the terms &amp; Conditions and click next</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image535.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb523.png" width="691" height="453"></a></p> <p>&nbsp;</p> <p>3. Enter your product key &amp; click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image536.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb524.png" width="690" height="456"></a></p> <p>&nbsp;</p> <p>4. To reduce the installation footprint I select custom install and clicked next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image552.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb540.png" width="703" height="464"></a></p> <p>5. Select the following components for installation &amp; click next:</p> <ul> <ul> <li>Platform Builder  <li>Silverlight Tools  <li>EN Documentation  <li>Shared Source  <li>x86 Architecture</li></ul></ul> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image553.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb541.png" width="700" height="456"></a></p> <p>&nbsp;</p> <p>6. Leave default not to create offline layout, click next</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image554.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb542.png" width="702" height="464"></a></p> <p>&nbsp;</p> <p>7. Accept the EULA and click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image555.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb543.png" width="704" height="462"></a></p> <p>&nbsp;</p> <p>8. Wait for installation to complete &amp; click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image556.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb544.png" width="711" height="466"></a></p> <p>&nbsp;</p> <p>9. Click finish to close the installer.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image557.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb545.png" width="713" height="474"></a></p> <p>&nbsp;</p> <p>10. This scenario has been tested with January 2016 Update, at a minimum we should be using this version of the <br>product see <a href="https://msdn.microsoft.com/en-us/library/dn205267.aspx">Microsoft downloads</a> to download the update. Once downloaded install the update.</p> <h2>3. Create OS Design</h2> <p>Running a WEC 7 image in Hyper-V requires specific changes to be made to the Virtual PC BSP, rather than make these changes on this built-in BSP. I prefer to clone it and customize the cloned BSP – My goal here is to create a minimum viable OS Design to run in Hyper-V. For detailed steps for creating an OS Design see the following <a href="https://www.embedded101.com/Compact7">blog post series</a> over at Embedded101.com.</p> <h3>3.1 Clone BSP</h3> <p>1. Open Visual Studio 2008 click – Platform Builder –&gt; Clone BSP, in the Clone Dialog enter the following information.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image539.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb527.png" width="587" height="461"></a></p> <p>&nbsp;</p> <p>2. The cloned BSP can be seen below in platform folder</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image540.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb528.png" width="854" height="330"></a></p> <p>&nbsp;</p> <p>2. We need to make a minor change to the “platform.bib”, see changes below</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image541.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb529.png" width="856" height="554"></a></p> <p>&nbsp;</p> <h3>3.2 Create new OS design</h3> <p>1. File –&gt; New Project and Select OS Design, enter a name for your new project.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image543.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb531.png" width="708" height="483"></a></p> <p>&nbsp;</p> <p>2. The creation Wizard will be displayed, click next</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image544.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb532.png" width="590" height="544"></a></p> <p>&nbsp;</p> <p>3. select the newly created Hyper-v BSP, click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image545.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb533.png" width="592" height="545"></a></p> <p>&nbsp;</p> <p>4. Select the Industrial Controller Design Template</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image546.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb534.png" width="591" height="547"></a></p> <p>&nbsp;</p> <p>5. Select the following Applications &amp; Media &amp; click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image547.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb535.png" width="593" height="546"></a></p> <p>&nbsp;</p> <p>6. Leave the Defaults for networking &amp; click next</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image548.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb536.png" width="589" height="542"></a></p> <p>&nbsp;</p> <p>7. Click Finish to create your project</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image549.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb537.png" width="592" height="545"></a></p> <p>&nbsp;</p> <p>8. Accept the additional T+C’s</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image550.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb538.png" width="598" height="551"></a></p> <p>&nbsp;</p> <p>9. Once your project is created it will be displayed in Visual Studio 2008</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image551.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb539.png" width="516" height="365"></a></p> <p>&nbsp;</p> <p>9. Next we need to add features via the Catalog We need the following components selected:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image602.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb590.png" width="368" height="356"></a></p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image603.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb591.png" width="376" height="250"></a></p> <p>&nbsp;</p> <p>10. Right click the OS Design project in solution explorer and click properties –&gt; Build Options, disable KITL &amp; kernel Debugging.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image629.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb618.png" width="537" height="335"></a></p> <p>&nbsp;</p> <p>11. The final step is to Build our OS Design.</p> <h2>4. Add Hyper-V Guest for Embedded Compact 7</h2> <p>We will be triggering the download of the image to the Virtual Device via EBoot but you could also create a standalone vhd</p> <h3>4.1 Create Virtual Machine</h3> <p>1. From the Windows 10 start menu open “Hyper-V Manager”, click create new Virtual Machine.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image619.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb607.png" width="584" height="442"></a></p> <p>&nbsp;</p> <p>2. Select a name for your new WEC7 Virtual Machine</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image620.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb608.png" width="584" height="444"></a></p> <p>&nbsp;</p> <p>3. Select Generation 1 and click next.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image611.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb599.png" width="584" height="444"></a></p> <p>&nbsp;</p> <p>4. Enter 512MB for startup memory and disable Dynamic memory.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image621.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb609.png" width="584" height="441"></a></p> <p>&nbsp;</p> <p>5. Click next without selecting a Network Switch we will do this later.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image622.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb611.png" width="584" height="442"></a></p> <p>&nbsp;</p> <p>6. Select the sample vhd file supplied with the WEC7 tools.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image623.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb612.png" width="584" height="441"></a></p> <p>&nbsp;</p> <p>7. Click finish to create the virtual machine</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image624.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb613.png" width="584" height="441"></a></p> <p>&nbsp;</p> <p>8. We now need to customize the newly created VM.</p> <ul> <li>Replace the Existing Network Adaptor with a Legacy Network Adaptor  <ul> <li>Select the “Virtual Machines NAT” switch we created earlier.</li></ul> <li>Pad out the IDE devices with 3 dummy CDROM drives as by default our OS design expects 4 IDE Devices.</li></ul> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image617.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb605.png" width="528" height="500"></a></p> <p>&nbsp;</p> <p>9. Click ok to save our settings.</p> <h3>4.2 Run VM &amp; Download OS Image</h3> <p>We are now ready to run our virtual machines and download our newly compiled OS Image.</p> <p>1. With Visual Studio 2008 SP1 &amp; our OS design open, which we built in the previous section</p> <p>2. Right click the VM in Hyper-V Manager and click Connect, with the VM Console open click Start, on boot our VM will <br>start to send out BOOTMET messages.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image625.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb614.png" width="560" height="444"></a></p> <p>&nbsp;</p> <p>2. In Visual Studio, Make sure we have (auto) Ether device selected in toolbar &amp; click Attach Device; the following window will be shown.<br>It may take a moment for the device to be detected, select the device from the list and click apply.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image626.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb615.png" width="312" height="427"></a></p> <p>&nbsp;</p> <p>3. The image will now be downloaded to the device.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image627.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb616.png" width="574" height="291"></a></p> <p>&nbsp;</p> <p>4. Progress will be shown in VS2008 &amp; in the VM Console Window.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image628.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb617.png" width="560" height="444"></a></p> <p>&nbsp;</p> <p>5. Once download completes WEC will boot</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image633.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb622.png" width="560" height="532"></a></p> <p>&nbsp;</p> <p>There you go so now you can enjoy Windows 10 and still develop for Embedded Compact 7, of course your mileage may vary – There are no guarantees regarding this scenario and although it may work now there is no way to know if it will continue to work on future releases of Hyper-V/Windows.</p> <p>Let me know your thoughts &amp; issues.</p> <h2>Troubleshooting Tips</h2> <h3>tftp timeout</h3> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image618.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb606.png" width="344" height="362"></a></p> <p><a title="https://blogs.msdn.microsoft.com/obloch/2010/08/12/windows-embedded-compact-7-and-virtual-pc-bsp/" href="https://blogs.msdn.microsoft.com/obloch/2010/08/12/windows-embedded-compact-7-and-virtual-pc-bsp/">https://blogs.msdn.microsoft.com/obloch/2010/08/12/windows-embedded-compact-7-and-virtual-pc-bsp/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint PeoplePicker Filtering Active Directory accounts by using LDAP queries and custom attributes returns no results</title>
      <link>https://docs.microsoft.com/archive/blogs/garethemslie/sharepoint-peoplepicker-filtering-active-directory-accounts-by-using-ldap-queries-and-custom-attributes-returns-no-results</link>
      <pubDate>Fri, 06 Mar 2015 11:13:00 GMT</pubDate>
      <dc:creator><![CDATA[Gareth Emslie - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/garethemslie/2015/03/06/sharepoint-peoplepicker-filtering-active-directory-accounts-by-using-ldap-queries-and-custom-attributes-returns-no-results/</guid>
      <description><![CDATA[Problem :

I am using the stsadm property "peoplepicker-searchadcustomfilter" to set a...]]></description>
      <content:encoded><![CDATA[<strong>Problem :</strong>

I am using the <strong>stsadm</strong> property <strong>"peoplepicker-searchadcustomfilter"</strong> to set a custom search filter but
the people picker returns no results, even though I am sure that the user exists. I am using a Custom Active
Directory Attribute in my filter is there anything special I have to do to get it to work?

<strong>Solution :</strong>

Yes, When the people picker performs a search it queries the Domain Controller using a LDAP Global
Catalog Search Request. This means that when you create the new custom attributes you need to
ensure that they are included in the Global Catalog, you can do this by checking the
<em><strong>(2)</strong></em>"Replicate to the Global Catalog" option in the Attribute properties. <em>If this </em><em>option is not checked you
will not be able to reference this attribute in your People Picker filter. </em>Another tip which will speed
up your queries is to make sure that you check the <em><strong>(1)</strong></em>"Index this attribute" option.

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/69/80/1145.CustomAttr.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/69/80/1145.CustomAttr.jpg" alt="" width="375" height="492" border="0" /></a>

Remember that the custom filter will apply to PeoplePicker for the entire Web Application.

<strong>References :</strong>
<ul>
 	<li><a target="_blank" href="https://msdn.microsoft.com/en-us/library/ms675160(v=vs.85).aspx" rel="noopener">Attributes Included in the Global Catalog.</a></li>
 	<li><a target="_blank" href="https://technet.microsoft.com/en-us/library/cc737521(v=ws.10).aspx" rel="noopener">Add an attribute to the global catalog.</a></li>
 	<li><a target="_blank" href="https://technet.microsoft.com/en-us/library/gg602075.aspx#section8" rel="noopener">Configure People Picker in SharePoint 2013.</a></li>
 	<li><a target="_blank" href="https://technet.microsoft.com/en-us/library/cc978012.aspx" rel="noopener">Global Catalog and LDAP Searches.</a></li>
</ul>]]></content:encoded>
    </item>
  </channel>
</rss>