Playing around with Azure Stack HCI

Decided to have some fun with (nested) Microsoft Azure Stack HCI in my lab.

If you want to do the same, I’ve scripted most the stuff you need, so… maybe it will be useful.

Steps to prepare a brand new, shiny, nested Azure Stack HCI lab are (roughly):

  • prepare your (parent) Windows Server 2022 Hyper-V host (ensure enough resources are available)
    • it already hosts my Active Directory, DNS, DHCP, router, …,  VMs
    • everything will be saved locally to D:\AzureStackHCI
  • (optional) install Windows Admin Center (WAC) for easier management
    • download it and install with simple command:

  • obtain the Azure Stack HCI 60-day trial ISO image from here
  • make VHD(X) from the obtained ISO image:

    • note that I’m using Convert-WindowsImage.ps1 available here
    • which gives me nice, generalized Azure Stack HCI VHD(X), which we will “upgrade with things” and later use for VM creation
  • install prerequisites into VHD(X)
    • this one is fairly easy – install Windows roles and features directly to the VHD(X) itself:

    • NOTE: If you try to install the Hyper-V role later, it may fail as we’re running Azure Stack HCI on “normal” Windows Server, so it get’s confused with nested virtualization availability. With preinstaling it, we make sure it just works.
  • update VHD(X) with latest patches:

    • I have previously downloaded all the Azure Stack HCI patches available to D:\AzureStackHCI\Updates
  • add Unattend.xml to handle the “set password at first login issue”
    • it annoys me that I need to set up the initial password, so… simple Unattend.xml file, injected into VHD(X) should take care of this:

    • NOTE: Make sure you don’t use clear-text passwords in Unattend.xml file!
  • create Azure Stack HCI VMs
    • I’m creating two VMs from our prepared VHD(X), with a couple of additional data disks, few network adapters for different purposes, nested virtualization enabled, etc.:

  • set node networking, join them to the domain, prepare for cluster (by using PowerShell Direct):

  • create the Azure Stack HCI cluster:

  • register (optional) the Azure Stack HCI cluster:

  • create CSV(s) and virtual switches for child workloads (but add nodes/cluster to WAC before, if not using PowerShell)

  • play around with your new cluster
  • (optional) clean all/redeploy if needed:

And now you have fully functional, nested, 2-node Azure Stack HCI cluster – nothing too fancy, but you can extend it how you wish! 😊

You can begin exploring the Azure Stack HCI itself, use it with Azure Arc, or perhaps install AKS on Azure Stack HCI and play around with it. Or something else.

Cheers!

P.S. You can use these scripts also for stuff other than Azure Stack HCI, of course! 😉
P.P.S. Code is also available on my GitHub page.

Beware of the proxy!

Had a (somewhat) interesting case the other day – after (finally) upgrading my Windows Admin Center (WAC) gateway machine to the new Windows Server 2022, my WAC suddenly stopped working. I couldn’t connect to any of the servers from within the console, couldn’t add new ones, … nothing.

When tried adding new servers, nothing happened – wizard stays at “Searching for…“:

Even PowerShell couldn’t connect anymore (which is actually the root cause of the above).

So, what happened?

Everything worked before and I wasn’t aware of other changes… other than upgrading my OS (in-place upgrade, Windows Server 2019 to Windows Server 2022), that is.

Let’s try and make sense of all this.

Test-NetConnection says everything is fine, Test-WSMan from another machine works:

However, Test-WSMan from this (WAC) machine simply doesn’t work:

Tried checking the logs next – two errors inside Applications and Services Logs -> Microsoft -> Windows Remote Management -> Operational log caught my eye:

  • Error 138: The client got a timeout from the network layer (ERROR_WINHTTP_TIMEOUT)
  • Error 142: WSMan operation Identify failed, error code 2150859046

So, it’s something with the network after all – more specifically, seems like there is some issue on the HTTP/S part!

After some thinking, I remembered that we have a HTTP/S proxy in our network – maybe my PowerShell session actually tries to go through it?! 😀

Checking if proxy is set (with netsh winhttp show proxy) – it is! This could be the issue.

Now I’m resetting the proxy settings (with netsh winhttp reset proxy, of course):

And then trying Test-WSMan again:

It finally works! And WAC works as well! 😀

Hope this helps!

Cheers!

Fixing Hyper-V virtual machine import with Compare-VM

Well, I was rearranging some stuff the other day, and come to an interesting “lesson learned”, which I’ll share. 🙂

In my lab, I’ve had a Hyper-V server running Windows 2012 R2, which I finally wanted to upgrade to something newer. I’ve decided to go with the latest Windows Server Insider Preview (SA 20180), just for fun.

When trying to do an in-place upgrade, I was presented with the message “it can’t be done“, which is fine – my existing installation is with GUI, the new one will be Core.

So, evacuate everything and reinstall.

In the process, I’ve also reorganized some stuff (machines were moved to another disk, not all files were on the same place, etc.).

Installed Windows, installed Hyper-V, created VM switches, but when I tried to import it all back (from PowerShell… because I had no GUI anymore), I was presented with an error.

Error during virtual machine import was (I know – could’ve used more specific Import-VM command, which will select all the right folders and required options, but… learned something new by doing it this way!):

So, the error says it all – “Please use Compare-VM to repair the virtual machine.” 🙂

But how?! 🙂

If you go to the docs page of Compare-VM, you can see how it’s used.

And, in my case, the whole process of repairing this virtual machine looks like this:

Hope this helps you as well!

Cheers!

Windows Update, Windows Server 2016 and proxy

The dumbest thing… you are installing your brand new Windows Server 2016 machines and then you realize that Windows Update doesn’t work. It just gets stuck on Checking for updates/Downloading updates… for days.

image

Of course, you have some sort of proxy on your network, and you start troubleshooting this issue by testing on a proxy-free network… and without proxy, Windows Update works just as it should!

So, the next logical next step is to blame “those networking guys”, because updating your machine works fine, when not behind their “fancy proxy thing”.

But no.

You will soon realize that you have some “old” Windows Server 2012 R2 (or even Windows 10) machines, which are updating just fine… even through the “fancy proxy thing”.

And then you start asking yourself why.

You are checking the configuration of older machines by opening up Internet Explorer and double-checking proxy settings… and then you make sure that your new machines are having the same configuration – they have. Then you are just confused. It’s not networking, it’s not proxy settings… what could it be???

Still a bit confused, you have a great idea to check system proxy settings by running netsh winhttp show proxy – on older machines you’ll probably see something like this (which is probably OK, because you’ve just seen the Proxy Settings in IE, which are set to correct values):

image

So, you’re (naturally) configuring new machines accordingly. Still doesn’t work.

What next?

You can do further reading & testing, but the thing that helped in our case was setting the system (winhttp) proxy with netsh command, so that it actually imports IE proxy settings.

Basically, you need to run netsh winhttp import proxy source=ie (after you’ve set the right proxy settings through IE dialog, of course) or set your system proxy by using the netsh winhttp set proxy proxy.mydomain.com:8080 command.

After that, Windows Update starts working again!

So, remember – when using Windows Server 2016, set your system proxy settings by using the netsh command and everything will work just fine! Smile

Cheers!

P.S. Of course, if you have another trick to make it work, please comment. Smile

Show disk performance in Task Manager

One of the things that bothered me in the past was the fact that Task Manager showed all the required performance graphs, except the disk-related ones. Why is that, I don’t know. OK, you can see the disks through Resource Monitor console or PerfMon, but… I really like using Task Manager, with such nice colors and simple graphs, for a quick overall check.

So, when you’ve opened your Task Manager, you were shown something like this:

image

No disks. Too bad. Sad smile

But… fear not, my friend! There is a solution for this “glitch”. Even a simple one. Smile

All you need to do is run the following command in your administrative Command Prompt:

Like this:

image

And now, when you reopen your Task Manager, you will see following:

image

Cheers!

Reinstalling your Hyper-V hosts

Have you ever reinstalled your Hyper-V hosts?

I know, there is not much need for it (as everything usually works just fine), but still… there is a “Windows Server 2016 re-installation wave” coming and maybe you’ll find the the next pieces interesting and useful.

One of the “messy” tasks with Windows reinstallation is networking… and by “messy” I mean “you have more than one network cable in your Hyper-V hosts” and you need to know which networks are connected where. Smile

What happens is that Windows somehow always forgets your network device order, all the pretty names you’ve applied and you get stuck with names like “Ethernet”, “Ethernet 2”, etc.

There is a way to fix this (there are many, actually) – we can ask our younger colleague to go to the server room and unplug the cables one by one and then plug them back in, following the rename on our (Windows) side. This way we are certain that all the corporate, DMZ, storage, live migration, etc. cables don’t get “confused” when added to their respective teams and if we labeled cables properly, everything will work with fresh Windows installation also.

But… there is another way. We can use what we already have – our documentation. Here I mean “our current setup” – we have our network adapters and teams already configured in our current Windows installation, why don’t we just export this info and use it after the reinstallation?

We can do this easily by using PowerShell!

The idea is to export network adapter names and MAC addresses of our physical network adapters (excluding the virtual and team adapters), in a CSV file, so that we can use it later, to rename our adapters after the reinstallation:

After reinstallation, we can use the following command to rename our adapters, as per our saved CSV file:

And voilà – our networks are named nicely again (and our colleague didn’t need to go to the cold server room… this time). Smile

Cheers!

Open Cloud BBQ – Nano Server

There was a barbecue today… on the roof… of the Microsoft office! How cool is that??? Smiješak

I’ve had an honor to join my colleagues and friends, and contribute to this great event with a presentation called “Nano Server – budućnost je tu!”, which was actually inspired by Jeffrey Snover’s Ignite speech about Nano Server – the new installation option in Windows Server 2016.

10301057_10153392135462905_6070746253170533265_n

The whole Nano Server idea is very simple – let’s remove all the “unnecessary” roles and features (especially the famous GUI), and leave only the parts that we really need for whatever purpose (i.e. we’re getting the “purpose built servers”). All the purposes/roles that are supported in this preview version are Hyper-V, File Server and Failover Clustering, and they are working great on this “nano-sized” server operating system (even in this early preview).

I’m really excited about Nano Server, and I’m so glad that I’ve had a chance to talk about it at such great event. Because there were so many questions about it during the day/evening, I’ve noticed that Nano Server is a very cool subject for attendees also. Nice!

The presentation is available on SlideShare – check it, install the Nano Server and start rocking your datacenters! Smiješak

Cheers!

Continue using Windows Server vNext Technical Preview

If you have Windows Server vNext Technical Preview installations that are expiring in a day or so, you’ll be pleased to know that Microsoft yesterday addressed this issue and released a patch (as promised). Patch will extend the evaluation period of those installations until the October, 2015.

With the next build just around the corner, maybe you won’t need this patch to last for that long, but… it’s fixed.

You can find the patch on Microsoft Download Center, and find the official announcement here. Just remember to read the install instructions coming with it.

Some of us in the MVP community noticed (and finally resolved it, with support from Microsoft people) that the installation of this update on some machines (Hyper-V hosts, in my case) requires that you also (re)activate your Windows installation. If you don’t do it, it may seem that the patch wasn’t applied. Also, remember that this patch needs a reboot or two to be actually “installed”.

My colleague Nirmal also blogged about, and even recorded the installation process, so check it out.

WSvNext

Voilà… enjoy your “renewed” Technical Preview (1) machines! Smile

Cheers!

Advanced Technology Days (ATD) 10 – recap

Another great conference is behind us – Advanced Technology Days 10 (or just ATD 10). Two-day conference, Wednesday and Thursday, about the latest and greatest from Microsoft, just in time for some of the important announcements, and with more than a glimpse into the future of technology – pretty cool. Smile

I’ve had two sessions – on Wednesday, I’ve had a session called Što nam donosi Windows Server vNext (Technical Preview)? (or “What’s new in Windows Server vNext (Technical Preview)?”), where I’ve outlined the major news in this prerelease version of the next Windows Server. There really is a lot to talk about, as Windows Server vNext brings so many news, even in this, somewhat early, stage in development cycle.

10734224_867576283274902_9017066188375927871_n

The session that I’ve had on Thursday was called Što nam donosi System Center vNext (Technical Preview)? (or “What’s new in System Center vNext (Technical Preview)?”), and there I’ve shown what is there in Technical Preview today with the preview of the new Microsoft Azure Operational Insights, which also entered the “public preview” phase during the conference. You can sign up and try it at https://opinsights.azure.com/.

1897005_868127409886456_409454307695879336_n

Overall experience was great – once again located in a movie theatre, with lots of great people, networking, combined with a flawless demo experience (plug ’n’ play) and great timing… actually, I can’t wait for Advanced Technology Days vNext! Smile

I’m so happy that I was invited to speak (big thanks to all involved!), and got the opportunity to participate with my view on all the great stuff included in those releases of very important products.

More info is available at http://atd.mscommunity.hr/ and https://www.facebook.com/MicrosoftATD.

Cheers!