We did a lot of work this year on OpenStack and Hyper-V integration, with the result of bringing back Hyper-V in the Nova sources in time for the Folsom release. We are currently working on a lot of cool features to be released in time for Grizzly, so stay tuned!
One of our goals was being able to install and configure Nova compute on Hyper-V in the simplest possible way, using a nice and tidy GUI for the occasional deployment or an automated and unattended mode for deployments on a massive number of servers. The result is the installer that I’m going to present in this post, I have to admit that we are quite proud of it 🙂
To begin, all you need is an installation of the Microsoft free Hyper-V Server 2008 R2 or 2012 or as an alternative Windows Server 2008 R2 or 2012 with the Hyper-V role enabled.
We suggest to use the free Hyper-V Server edition instead of Windows Server for a few reasons:
- It’s free 🙂
- It runs a very limited subset of the Windows Server operating system, which means that it has a lower impact on security updates and management
- There’s no difference in features or performance compared to the full Windows Server
If you want to see how Hyper-V works with OpenStack but you don’t have a server or PC on which to install it, well you can even run it on top of another hypervisor (for test purposes only, this is of course TOTALLY unsupported). As an example you can run it in a VM on top of VMWare Workstation 9, Fusion 5 or ESXi 5.
Hyper-V Nova Compute Installer
We are going to install on Hyper-V only the OpenStack Compute role, so you’ll need to run the other required roles on separate hosts or VMs. If you don’t plan to deploy it in a production environment, I suggest you to create an Ubuntu Server 12.04 VM in Hyper-V or elsewhere with a DevStack deployment.
Once your Hyper-V setup is done, you can copy our installer on a folder on the server and run it.
On Hyper-V / Windows Server 2012, you can even download and run it directly from a Powershell prompt:
1 2 3 4 5 |
$src = 'http://www.cloudbase.it/downloads/HyperVNovaCompute_Folsom.msi' $dest = "$env:temp\HyperVNovaCompute_Folsom.msi" Invoke-WebRequest -uri $src -OutFile $dest Unblock-File $dest Start-Process $dest |
Here’s how the welcome screen look like:
After accepting the license agreement the features selection will appear:
OpenStack Nova Compute
This is the core feature of the package. It installs a dedicated Python environment, all required dependencies and a Windows service called nova-compute. By clicking on “Browse” it is possible to change the installation folder.
Live Migration
Available on 2012 but not in 2008 R2, requires the host to be a member of a domain (can be even a Samba domain). This feature enables and configures Hyper-V “shared nothing” live migration. Beside KVM, Hyper-V is the only OpenStack hypervisor supporting it, with the additional advantage that thanks to this installer it’s unbelievably easy to setup!
iSCSI Initiator Service
Enables and starts the Microsoft iSCSI initiator service, required for Cinder volume management.
OpenStack Command Prompt
Creates an OpenStack command prompt shortcut. This is especially useful on Windows Server or on a workstation in order to have a ready made environment with the PATH and other environment variables properly set.
FreeRDP for Hyper-V
FreeRDP is an amazing cross platform open source RDP client that works also with the Hyper-V RDP extensions required to connect to VM consoles. I blogged here in detail about it.
The next steps are required to handle the service configurations and are displayed in function of the selected features.
Nova compute requires one bridge (virtual switch in Hyper-V terms), which can be automatically created by the installer.
The basic configuration consists in providing the settings for the glance server address, RabbitMQ server address, Nova database and the path where the Nova compute driver will save the Hyper-V instances and Glance images.
“Limit CPU features” is required when live migration is used between servers with different CPU architectures.
When “Use CoW Images” is enabled, the Nova compute driver creates differencing disks based on the glance VHD images, instead of copying the entire image for each spawned instance. This leads to massively shorter instance deployment times.
Here’s one of my favorite parts. Live migration can be configured here without having to use Microsoft Hyper-V Manager or Powershell. All you have to do is to choose the authentication type (we suggest Kerberos), the maximum number of parallel live migrations, and IP limitations if needed. Please note also that live migration requires that the Nova Compute service runs with domain credentials. The selected domain user will be automatically added to the local administrators group.
Now lean back, relax, and wait for the installer to do his job 🙂
During this step files get copied, services and components get registered, the nova.conf file is written and finally the nova-compute service is started
Once the setup is finished, you can always start it again to change / add / remove any feature.
FAQ
here’s also a quick FAQ for activities that you might need to perform on the Hyper-V server.
How do I restart the compute service?
1 |
net stop nova-compute && net start nova-compute |
How do I restart the iSCSI initiator service service?
1 |
net stop msiscsi && net start msiscsi |
How do I perform an unattended setup
You can find here all the supported properties and a full example.
How do I log the installer activity?
1 |
msiexec /i HyperVNovaCompute_Folsom.msi /l*v log.txt |
How do I uninstall this package if I don’t have the MSI file?
1 |
msiexec /uninstall {792BADAA-8FE0-473C-BAD7-CAFA2AFF4F2D} |