Creating a Windows image for OpenStack

If you want to build a Windows image for use in your OpenStack environment, you can follow the example in the official documentation, or you can grab a Windows 2012r2 evaluation pre-built image from the nice folks at CloudBase. The CloudBase-provided image is built using a set of scripts and configuration files that CloudBase has made available on GitHub. The CloudBase repository is an excellent source of information, but I wanted to understand the process myself.
read more →

Automatic configuration of Windows instances in OpenStack, part 1

This is the first of two articles in which I discuss my work in getting some Windows instances up and running in our OpenStack environment. This article is primarily about problems I encountered along the way. Motivations Like many organizations, we have a mix of Linux and Windows in our environment. Some folks in my group felt that it would be nice to let our Windows admins take advantage of OpenStack for prototyping and sandboxing in the same ways our Linux admins can use it.
read more →

Generating random passwords in PowerShell

I was looking for PowerShell solutions for generating a random password (in order to set the Administrator password on a Windows instance provisioned in OpenStack), and found several solutions using the GeneratePassword method of System.Web.Security.Membership (documentation here), along the lines of this: Function New-RandomComplexPassword ($length=8) { $Assembly = Add-Type -AssemblyName System.Web $password = [System.Web.Security.Membership]::GeneratePassword($length,2) return $password } While this works, I was unhappy with the generated passwords: they were difficult to type or transcribe because they make heavy use of punctuation.
read more →

Waiting for networking using PowerShell

I’ve recently been exploring the world of Windows scripting, and I ran into a small problem: I was running a script at system startup, and the script was running before the network interface (which was using DHCP) was configured. There are a number of common solutions proposed to this problem: Just wait for some period of time. This can work but it’s ugly, and because it doesn’t actually verify the network state it can result in things breaking if some problem prevents Windows from pulling a valid DHCP lease.
read more →