Getting started with Microsoft Azure Stack (ASDK) (3)

As a final preparation step (following my previous post) in using the ASDK, we need to first register it. For that, an Azure subscription is required!

So… let’s do it.

First, we need to make sure we have the required Azure Stack PowerShell modules. It’s also convenient to make the PSGallery trusted repository for installation of the modules, if we need to install them. Then we can download all the tools we’ll need, and finally register our (connected) ASDK environment, using the following commands:

You can find the whole procedure explained in more detail inside the official documentation, of course.

And… once registered – we can finally start using our ASDK!

As before – I’ve also prepared a short video about registering the ASDK:

Happy exploring!

Getting started with Microsoft Azure Stack (ASDK) (2)

In my previous post, I’ve discussed how you can get your hands on the Microsoft Azure Stack Development Kit (ASDK) – now, I’ll show you how to install it.

As I’ve mentioned there already, we will install the ASDK inside of a Hyper-V virtual machine with nested virtualization enabled (a scenario that is not officially supported, but will give you an opportunity to work with ASDK in your lab, if you don’t have all the required hardware).

So… let’s start.

The things you’ll need, as per official article:

  • Hyper-V (2016) host
  • 12-core CPU
  • 96+GB of RAM
  • ~200GB free space for CloudBuilder.vhdx (OS)
  • 4 x 250+ GB free space for data disks
  • Internet/NTP access (time is important!) through a single network adapter (without proxy!)

Once you’ve downloaded and extracted the ASDK bits, you’ll get the CloudBuilder.vhdx file, which we will use for the boot disk of our newly created virtual machine.

But first, we will expand it a bit (I’ve expanded it to 200GB). Don’t forget to expand the partition inside as well!

Then, we can create a new (Generation 2) virtual machine with the following settings, our CloudBuilder.vhdx attached as the first disk and four freshly created data disks:

One other thing we need to ensure is to enable nested virtualization for this virtual machine (allowing us to run Hyper-V inside this virtual machine):

And now we are ready to start our virtual machine, hosting the ASDK.

Once started, virtual machine will finish its configuration (specialization phase of Windows installation), so let it finish and then configure password, computer name and IP address.

After this initial configuration, we configure the NTP settings by using the following:

Now we are ready to use the asdk-prechecker.ps1 script, to check if everything is OK:

And…. we are ready for the installation!

Now we need to run the asdk-installer.ps1 script, which will actually start the wizard which will help with entering the required IP adresses and checking the network connection – as a result, we will get the final commands to kick-off the installation:

One more thing needs to be configured for our virtual ASDK installation to succeed inside in nested enviroment – when the extraction process starts, we need to edit the C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1 file by changing the every “-not $IsVirtualizedDeployment” to “$IsVirtualizedDeployment” (that is, remove the “-not“):

Final thing to do is to wait for the whole process to complete (~4,5 hours on my hardware), and the result looks like this:

And there is another (shortened) video of the installation process:

And now we can start playing with our own ASDK!

Stay tuned!

Getting started with Microsoft Azure Stack (ASDK) (1)

So… you’ve heard all about the “hybrid clouds” (all around us), and you’ve finally decided to go with the truly hybrid one – the one from Microsoft, which consists of Microsoft Azure, extended to Microsoft Azure Stack on-premises.

If you are just starting and want to learn about it, you may find it difficult (and rather costly) to obtain the fully integrated OEM solution for your lab. But, there is a solution – Microsoft provides the development kit (ASDK), which can be used for playing around, learning and development (of course).

Where to get started?

First stop should definitely be the official Azure Stack Development Kit (ASDK) page. There, you can register for the download of ASDK software:

After that, you’ll receive a page with all the info you need – hardware and deployment requirements, download and step-by-step guidance links:

First, I recommend you to read through the requirements, and then you can run the prerequisites check script, just to double-check you have all that is needed. Don’t forget that, with hardware, you’ll also need an Azure subscription!

Script should give you output similar to mine (note that I’m using the virtual machine as my “ASDK host” and will be nesting all of it inside Hyper-V, of course):

If everything is fine, you’re ready to download the ASDK, using the provided downloader:

Download of ~12 GB may take a while, so “Please sit back and relax…” (as during the Windows 98 installation, some time ago).

The last step is to unpack the downloaded ADSK binaries (actually, the CloudBuilder.vhdx, as you’ll see):

There is also a short video to help you with the first steps inside the “brave new ASDK world”:

In my next post, I’ll show you how to prepare a Hyper-V virtual machine for hosting the ASDK – not the most performing environment, but it’s ‘good enough for a simple lab, if you don’t have the hardware one.

Stay tuned!

Deploying Linux machines by using System Center 2016: Virtual Machine Manager templates

In light of “Microsoft loves Linux” initiative, you can now deploy your Linux virtual machines by using templates in the System Center 2016: Virtual Machine Manager. As I was searching on how to do this (successfully), there were couple of articles that helped, so I’ve decided to do a short list of all the necessary steps (in one place).

Steps to make your Linux VM template deployments work:

  • create a new (Generation 2) virtual machine (as you would normally do)
  • install the Linux operating system in that virtual machine (as you would normally do)
    • HINT: A list of supported Linux distributions and versions on Hyper-V is available here.
  • install the Linux Integration Services (LIS) (as per this post):
    • open the “modules” file
    • add the following to the end of this file:
    • save it (Ctrl+X and Y)
    • install LIS and reboot the machine by using the following commands:
    • check if the services are running by using the command:
  • install the Virtual Machine Manager agent (as per this post):
    • share the folder C:\Program Files\Microsoft System Center 2016\Agents\Linux on your VMM machine
    • copy the VMM agent files to Linux virtual machine
      • as a real Windows admin, I did it through the GUI
    • install the agent:
  • fix the boot for Generation 2 virtual machine (boot information is by default stored in the VM configuration file, not on disk – Ben wrote a great article on this “issue”)
    • Ben’s way (didn’t work for me):
      • change directory to the boot EFI directory
      • copy the ubuntu directory in to a new directory named boot
      • change directory to the newly created boot directory
      • rename the shimx64.efi file
    • TriJetScud’s way in the comments (worked for me with Ubuntu 16.04 Generation 2 VM):
  • shutdown the virtual machine and copy its VHDX to the VMM Library
    • HINT: Don’t forget to refresh the VMM Library.
  • go to the VMM Library, right-click the copied VHDX and select the Create VM template option
  • proceed with creating the template as you normally would, to the part Configure Operating System
    • HINT: If you are using Secure boot, don’t forget to select the MicrosoftUEFICertificateAuthority template in hardware settings.
  • there, under Guest OS profile, you select the option to create a new Linux operating system customization settings
  • next you specify your guest OS settings and finish creating the template
  • now you can create a new Linux virtual machine from the template you’ve configured!

Hope it helps!

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!

MobilityDay 2016

As mentioned before, I was at the MobilityDay 2016 conference on Thursday, where I’ve had an honor to deliver a session about Citrix XenMobile & NetScaler solutions (yup, I know… it’s not Hyper-V… go figure… but my demo environment was still runnning on top of Hyper-V, so…).

Session was actually a short introduction to what Citrix XenMobile solution offers and how to set it all up, combined with NetScaler, for a complete management of mobile devices and mobile applications.

Conference was great, as always – so much old (and new) faces, with lots of fun. This time it was actually a 10th birthday of MobilityDay!

14470566_10205580989363163_284177836217597639_n(photo by Romeo)

Happy birthday, MobilityDay! (and congrats to the organizers) Smile

Slides are available at my SlideShare:

Cheers!

Hyper-V best practices at KulenDayz 2016

It’s that time of the year again – conference time! Smile

First of the conferences I was at was the KulenDayz 2016 conference. I love KulenDayz! So many nice people, friends, colleagues, MVPs and kids gathering at awesome (and relaxed) sessions, enjoying wonderful nature (and food). Smile

This year I’ve had the honor to speak about Hyper-V best practices – I’ve tried to gather the most of best practices around Hyper-V deployments that I’ve seen/learned/done over the years in an easy 50-minute session. Considering the reactions from the attendees and other speakers, it was a great session! (thank you all!)

skik

As every one of us has hers/his best practices around Hyper-V, I’m expecting your comments, thoughts and corrections… we are all learning from each other!

Session slides have been uploaded to SlideShare:


Big thanks to the organizers for another great KulenDayz experience!!!

Next conference is Mobility Day 2016, which is in about two weeks. I’ll be speaking about something completely different – Citrix XenMobile and NetScaler. Fun times!

Cheers!

Altaro Hyper-V Backup v5 just released

New version of my favorite Hyper-V backup tool just got officially released! Smile

Altaro released the long-awaited next version of their Hyper-V backup software, Altaro Hyper-V Backup v5 – it features a completely new look, centralized configuration and management of multiple hosts with greater flexibility and improved performance. Do I have to mention that it has a free version as well? Smile

FREE version offers free backup of two virtual machines… forever! (there is also a 30-day trial available for more than two virtual machines)

I like it because it’s simple and not too expensive (in more than one aspect), fast, does the job, and does it pretty good! I’ve also installed the new version on one of my hosts, and it looks just great (can’t wait to run the first backup and restore of my virtual machines)!

Altaro Hyper-V Backup v5

 Altaro Hyper-V Backup v5

You can find more info and official announcement here.
Download is available here.

Cheers!

UPDATE: Please, don’t remove your own host from the console (until the next week’s release goes public) – in the current public release (5.0.75.0), you won’t be able to add it back!

Workaround:
1. stop all Altaro services
2. go to %ProgramData%\Altaro
3. rename the AltaroBackupProfile folder to AltaroBackupProfile.old
4. start all Altaro services

New Hyper-V books

If you are in search for something to read – there are two new Hyper-V books, written by my MVP colleagues, that I can recommend.

The first one is called Hyper-V Best Practices, written by Benedict Berger (Microsoft MVP), and it covers… well… best practices with Hyper-V. Smile

By reading this book, you’ll learn:

  • Install Hyper-V and virtual machines automated through PowerShell
  • Create High Availability solutions with failover clustering
  • Protect from disasters with Hyper-V Replica
  • Utilize the performance and scalability of storage virtualization
  • Build a flexible network infrastructure without physical boundaries
  • Design performance measurement and tuning action plans
  • Manage your Hyper-V stack with System Center
  • Move existing virtualization workloads to Hyper-V

6091EN_Hyper-V%20Best%20Practices_cov_0

You can find more about this book (and purchase it) here.

The second book is called Hyper-V Security, written by Eric Siron and Andy Syrewicze (Microsoft MVP).

By reading this one, you’ll learn:

  • Defend the network and disk resources that Hyper-V relies on
  • Control access to Hyper-V, both locally and remotely
  • Automate security policies using Group Policy
  • Leverage Hyper-V’s isolation features to protect services while still providing necessary access to resources
  • Combine Hyper-V with external technologies to provide a strong defense-in-depth system
  • Identify and explain security needs to organization officials reluctant to provide proper funding
  • Protect your virtual infrastructure when System Center VMM is present
  • Make management of multiple on-premise private clouds and Azure-based public clouds more secure with App Controller

5490EN_3570_Hyper-V-Security_Frontcover

You can find more about this book and purchase it here.

Happy reading!

Hyper-V reporting script

There’s something nice for all you Hyper-V admins out there – don’t know if you’ve seen it already, but Serhat Akinci (my MVP colleague) made a great script for reporting the health of your Hyper-V hosts, called Get-HyperVReport.

You can use it on local or remote Hyper-V hosts and clusters, schedule and e-mail the reports (something to read while enjoying the morning coffee… or tea Smile), and they look like this:

image

Highlights (from TechNet page):

  • More than 2600+ lines of PowerShell, HTML and CSS code examples
  • Creates a plain but detailed and user-friendly HTML report which is compatible with all modern browsers
  • Provides more detailed information via tooltips in the HTML report. (cells with asteriks and highlighted)
  • Checks and installs required runtime environment prerequisites like Hyper-V and Clustering PowerShell
  • Collects information by using standard Hyper-V and Clustering PowerShell cmdlets and custom WMI queries
  • Shows alerts in the report for certain situations (utilizations, VM checkpoints, replication status, etc.)
  • Can be used directly from command-line or as a scheduled Windows task
  • Supports report delivery via e-mail with advanced options. (authentication, TLS/SSL, multiple recipients)
  • Includes a mode that reports only alerts in the Hyper-V environment. (aka HighlightsOnly mode)
  • Advanced error handling and logging. (Console messages and log file)

Download of this script, and more information about it, is available at TechNet Gallery. And remember – don’t let your Hyper-V hosts run all by themselves! Smile

Cheers!