Ask Your Question
0

how to specify architecture for a instance to run in compute node ?

asked 2014-08-13 22:34:06 -0500

srinivasulu gravatar image

Is there any command to specify arch ( armv8/ x86 ) for a instance to be in compute node ?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-08-14 06:35:42 -0500

Attila Szlovencsak gravatar image

updated 2014-08-14 11:49:38 -0500

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/conf...

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"]]
edit flag offensive delete link more

Comments

Thanks for reply, i have doubt that how can we run a vm with arch as "arm" on a compute node( who is arch is x86)

srinivasulu gravatar imagesrinivasulu ( 2014-08-14 09:59:25 -0500 )edit
1

See the edited post. Hope that helps

Attila Szlovencsak gravatar imageAttila Szlovencsak ( 2014-08-14 11:50:12 -0500 )edit

As you suggested, i did updated my qemu, and i got to list at compute node having arm as supported list. how could we specify at controller or compute node to run a VM having a achitecture of our choice ( x86, arm etc) . give some command if possible.

srinivasulu gravatar imagesrinivasulu ( 2014-08-18 05:43:39 -0500 )edit
0

answered 2014-08-14 00:46:13 -0500

srinivasulu gravatar image

I red CLI, i could find following command for specifying arch details for a image

          $glance image-update IMG-UUID --property architecture=x86_64

Any other idea ?

edit flag offensive delete link more

Comments

Ask this in question or comment. Please don't post it as answer.

SGPJ gravatar imageSGPJ ( 2014-08-14 22:38:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2014-08-13 22:34:06 -0500

Seen: 1,437 times

Last updated: Aug 14 '14