Quantcast
Channel: Cloudbase Solutions
Viewing all articles
Browse latest Browse all 83

Filtering Glance images for Hyper-V

$
0
0

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.

 

The post Filtering Glance images for Hyper-V appeared first on Cloudbase Solutions.


Viewing all articles
Browse latest Browse all 83

Trending Articles