In a number of scenarios it’s very useful to have different hypervisors in your OpenStack infrastructure, for example you might have KVM or XEN for Linux images and Hyper-V for Windows images.
How can you tell Nova Scheduler to associate a given Glance image to a specific hypervisor?
The answer is provided by a filter called ImagePropertiesFilter, enabled by default in Nova Scheduler. This filter looks for a Glance image property called “hypervisor_type” which must contain a value matching with the desired hypervisor type as the name implies. Images without this property set will simply be booted on any available hypervisor, unless other filter will influence the scheduler’s behaviour.
Here’s how to add an image which will boot only on Hyper-V Nova Compute hosts:
glance image-create --property hypervisor_type=hyperv --name "Ubuntu Server 12.04"
--container-format bare --disk-format vhd < UbuntuServer1204.vhd
Changing the property on an existing image is also very simple:
glance image-update --property hypervisor_type=hyperv <IMAGE_ID>
This feature is supported in the current Hyper-V Grizzly code, already included in our daily updated beta installer.
It can also be easily backported to Folsom, all you need to do is to copy the content of the “nova/virt/hyperv/” folder available in the source repository on github to the corresponding folder in your Hyper-V Nova Compute node.
When I try perform the above procedure and restart the service, I get the following error on windows event log:
The description for Event ID 0 from source nova-compute cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event: