Our OpenStack Hyper-V Compute Driver works with any OpenStack cloud, including clouds deployed using Mirantis Fuel.
The goal of this article is not to provide a guide to deploy Fuel (for that you can use the excellent documentation from Mirantis), but rather to guide you through the process of adding a Hyper-V compute node to an existing Fuel deployment.
OpenStack supports multiple types of hypervisors on a single cloud, which means that you can run KVM and Hyper-V side by side with complete interoperability. One of the great advantages is that you can have Windows instances running on Hyper-V, taking advantage of Microsoft’s support for your Windows guests, while keeping Linux instances on KVM in a totally transparent way for your users.
Adding a Hyper-V compute node
To begin with, all you need is a host running the freely available Microsoft Hyper-V Server 2012 R2 or alternatively Windows Server 2012 R2 with the Hyper-V Role enabled.
Networking
The Windows Server 2012 R2 / Hyper-V Server 2012 R2 should have a minimum of two network interfaces, one for management, connected to the public network defined in the Fuel deployment and the other one connected to the private network.
Example: let’s assume the OpenStack controller deployed with Fuel has the following interfaces:
In this example, the public interface of the Hyper-V host should be connected to the same network as eth1, and the private interface of the Hyper-V host should be connected to the same network as eth0.
Installing Hyper-V Nova Compute and Neutron Hyper-V Agent
Once the Windows Server / Hyper-V Server setup is complete, you can install the OpenStack Compute role using our OpenStack compute installer. Download the appropriate installer version and run it.
The setup is straightforward (full guide here), you will just need some credentials and service addresses / URLs from your OpenStack cloud.
You will also need a Hyper-V virtual switch, which can be created using the installer, making sure that the interface for the switch is the private one as defined above. To do that, list all the network interfaces, using for example PowerShell:
1 |
PS c:\> Get-NetAdapter |
The results should be something like this:
Check that the Mac address corresponds to the private interface and take note of the InterfaceDescription. Set up the Virtual Switch by selecting the proper interface name from the dropdown list as shown in the following image.
Next, you’ll need the host addresses URLs for the Glance API and AMQP server as well as credentials for AMQP.
An easy way to get the API endpoint URLs is by using Horizon. Login as an administrator and navigate to the projects Access & Security section, API Access tab and select the URL corresponding to the Image service.
You will need to provide an Neutron API endpoint as well. The Neutron API endpoint can be obtained in the same way as the Glance one, listed as Network under the API Access tab in Horizon.
You will also be prompted for credentials for neutron authentication. The simplest way to find those credentials is to look on the controller node in /etc/nova/nova.conf, in the [neutron] section. The values you are looking for are:
1 2 3 4 |
[neutron] admin_tenant_name admin_username admin_password |
The AMQP RabbitMQ configuration can be retrieved from /etc/nova/nova.conf as well:
1 2 3 4 |
[oslo_messaging_rabbit] rabbit_userid rabbit_password rabbit_hosts |
After the installation, you can verify if the nova-compute service and the neutron hyper-v agent are up and running as expected by executing the following commands on the controller:
1 2 |
nova service-list neutron agent-list |
Enable the Hyper-V agent in Neutron
By default, Fuel does not enable the Hyper-V agent in the Neutron configuration. Simply edit the /etc/neutron/plugins/ml2/ml2_plugin.ini file and add hyperv to the list of enabled mechanism drivers:
1 |
mechanism_drivers = openvswitch,hyperv |
After editing and saving the ml2_plugin.ini file, restart neutron-server:
1 |
service neutron-server restart |
Congratulations, you have now a fully operational Hyper-V compute node added to your OpenStack Cloud!
Add Hyper-V guest images in Glance
When adding Hyper-V VHD or VHDX images to Glance, make sure to specify the hypervisor_type property to let the Nova scheduler know that you want to target Hyper-V:
1 2 |
glance image-create --property hypervisor_type=hyperv --name "Windows Server 2012 R2 Std" \ --container-format bare --disk-format vhd --file windows2012r2.vhdx |
Similarly, for KVM / QEMU images specify hypervisor_type=qemu
We provide free evaluation versions of Windows Server guest images for OpenStack (KVM or Hyper-V) along with commercial support for fully updated and tested Windows production images.
Automation
The deployment and configuration described above can be fully automated with Puppet, Chef, SaltStack, DSC, etc. This is particularly useful in case you’d want to add and manage multiple Hyper-V hosts in your Fuel deployment.