Revision history [back]

click to hide/show revision 1
initial version

It is rather works in an indirect way. Based on different properties of the instance, image, flavor the list of available compute nodes are filtered, and one is picked for starting your instance, but you cannot start directly where to/how to start your instance (like when you start qemu directly).

Openstack keeps track of the supported instance types for all compute nodes (this is set in nova.conf)

[root@controller ~]# mysql -e 'select hypervisor_hostname,supported_instances from nova.compute_nodes'
+--------------------------+--------------------------------------------------------------------------------------------------------+
 | hypervisor_hostname      | supported_instances                                                                                    |
+--------------------------+--------------------------------------------------------------------------------------------------------+
 | compute1.openstack.local | [["i686", "qemu", "hvm"], ["x86_64", "qemu", "hvm"]]                                                   |
 | compute2.openstack.local | [["i686", "qemu", "hvm"], ["i686", "kvm", "hvm"], ["x86_64", "qemu", "hvm"],  ["x86_64",   "kvm", "hvm"]] |
+--------------------------+--------------------------------------------------------------------------------------------------------+

So in case setting an image property "architecture" , the ImagePropertiesFilter at nova-scheduler will choose an appropriate compute node for you.

You could also use host aggregates, to suggest your preferred compute node. This case you create a flavor with a specific metadata (like arch=arm), and a matching host-aggregate (having the same key). If you start an instance with a that specific flavor, it will be started on the specific compute node(s) in the aggregate. See more: http://docs.openstack.org/havana/config-reference/content/host-aggregates.html

It is rather works in an indirect way. Based on different properties of the instance, image, flavor the list of available compute nodes are filtered, and one is picked for starting your instance, but you cannot start directly where to/how to start your instance (like when you start qemu directly).

Openstack keeps track of the supported instance types for all compute nodes (this is set in nova.conf)

[root@controller ~]# mysql -e 'select hypervisor_hostname,supported_instances from nova.compute_nodes'
+--------------------------+--------------------------------------------------------------------------------------------------------+
 | hypervisor_hostname      | supported_instances                                                                                    |
+--------------------------+--------------------------------------------------------------------------------------------------------+
 | compute1.openstack.local | [["i686", "qemu", "hvm"], ["x86_64", "qemu", "hvm"]]                                                   |
 | compute2.openstack.local | [["i686", "qemu", "hvm"], ["i686", "kvm", "hvm"], ["x86_64", "qemu", "hvm"],  ["x86_64",   "kvm", "hvm"]] |
+--------------------------+--------------------------------------------------------------------------------------------------------+

So in case setting an image property "architecture" , the ImagePropertiesFilter at nova-scheduler will choose an appropriate compute node for you.

You could also use host aggregates, to suggest your preferred compute node. This case you create a flavor with a specific metadata (like arch=arm), and a matching host-aggregate (having the same key). If you start an instance with a that specific flavor, it will be started on the specific compute node(s) in the aggregate. See more: http://docs.openstack.org/havana/config-reference/content/host-aggregates.html

To start arm images on x86 host, you should 1. Install qemu (ensure you have qemu-system-arm) 2. Check qemu capabilities

[root@compute1 ~]# virsh capabilities |grep -C 2 arm
 <guest>
 <os_type>hvm</os_type>
     <arch name='arm'>
     <wordsize>64</wordsize>
     <emulator>/usr/bin/qemu-system-arm</emulator>
     <machine>integratorcp</machine>
      <machine>collie</machine>

3. If you installed qemu recently, probably you should restart nova-compute 4. Check the nova_compute mysql table again.

 [root@controller ~]# mysql -e 'select hypervisor_hostname,supported_instances from nova.compute_nodes'

 | hypervisor_hostname      | supported_instances                                                                                                                 
+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| compute1.openstack.local | [["i686", "qemu", "hvm"], ["x86_64", "qemu", "hvm"], ["arm", "qemu", "hvm"], ["microblaze", "qemu", "hvm"], ["microblazeel", "qemu", "hvm"], ["mips", "qemu", "hvm"], ["mipsel", "qemu", "hvm"], ["sparc", "qemu", "hvm"], ["ppc", "qemu", "hvm"], ["ppc64", "qemu", "hvm"], ["s390x", "qemu", "hvm"]]