Getting Hyper-V and OpenStack setup quickly

Last week I presented at OpenStack Day Seattle - and did a short demonstration of OpenStack managing Hyper-V.

Today I want to show you how to get a basic OpenStack + Hyper-V deployment up and running quickly.

The process is as follows:

  1. Install Windows Server 2012 R2 / Windows Server 2016 TP3 on a physical computer
  2. Enable the Hyper-V role, and configure virtual networking to your preference
  3. Make sure your current user is a member of the Hyper-V administrators group
  4. Make sure you have a block of "public IP addresses" available for your network
  5. Download V-Magine (from https://www.cloudbase.it/v-magine/)
  6. Run V-Magine
  7. Answer the questions that you are asked
  8. Go get a coffee (or two)

About an hour later you will have OpenStack on Hyper-V ready to go!  Nice and simple.  You can now open up the OpenStack website (V-Magine always makes this available on https://10.74.19.3) and login with the username "admin" and the password you provided during installation.

The next thing you will want to do is to get a Windows image that you can deploy in your new OpenStack environment.  This is a little more complicated.  Here you will need to:

  1. Download the Windows Server 2012 R2 evaluation cloud image (from https://www.cloudbase.it/windows-cloud-images/)
  2. Setup a network share - I use PowerShell to do this by running the following commands (substitute paths and names as appropriate):
    new-smbshare -name CloudBase -path C:\CloudBase
    Set-netfirewallrule -DisplayGroup "File and Printer Sharing" -Enabled True
  3. Login to the OpenStack controller virtual machine with the username "root" and the password you provided while installing V-Magine.
  4. Run the following commands inside the virtual machine:
    source keystonerc_admin mount //192.168.2.36/CloudBase /mnt -o username=benjamin,password=P@ssw0rd gunzip -cd /mnt/windows_server_2012_r2_standard_eval_hyperv_20140530.vhdx.gz | glance image-create --property hypervisor_type=hyperv --name "Windows Server 2012 R2 Eval" --container-format bare --disk-format vhd --visibility public
    Obviously - replace IP addresses, paths, usernames and passwords with the right ones for your environment

Now you can login to the OpenStack website again and start provisioning Windows Server instances.

To show you how easy this is to do - I have captured a video of me doing this on my laptop:

Don't worry - even though the entire process takes about 70 minutes - I have fast forwarded through the boring bits so that this video is only 20 minutes long.

Cheers,
Ben