Ask Your Question

Setting Qemu Architecture

asked 2016-07-01 15:00:15 -0500

vNick gravatar image

I have a situation where I need to emulate some PPC VMs on Intel hardware, and would like to use OpenStack to allow my engineering teams to spin up their own instances of these PPC VMs whenever they need to. I'm having a hard time figuring out how to create a flavor that will correctly call the PPC version of Qemu to start these VMs. Here's what I've done so far...

  • Installed the qemu-system-ppc binary into the path and restarted libvirtd. Used "virsh capabilities" to verify ppc is listed as a CPU for guests.
  • Restarted the openstack-nova-compute service, and then looked at the database to verify the capabilities are coming in correctly from libvirt on all of the hosts:

nova=# SELECT hypervisor_hostname,supported_instances FROM compute_nodes; hypervisor_hostname | supported_instances
---------------------+-------------------------------------------------------------------------------------------------------------------------------- | [["i686", "qemu", "hvm"], ["i686", "kvm", "hvm"], ["ppc", "qemu", "hvm"], ["x86_64", "qemu", "hvm"], ["x86_64", "kvm", "hvm"]] | [["i686", "qemu", "hvm"], ["i686", "kvm", "hvm"], ["ppc", "qemu", "hvm"], ["x86_64", "qemu", "hvm"], ["x86_64", "kvm", "hvm"]] | [["i686", "qemu", "hvm"], ["i686", "kvm", "hvm"], ["ppc", "qemu", "hvm"], ["x86_64", "qemu", "hvm"], ["x86_64", "kvm", "hvm"]]

  • Verified that I can launch instances using the standard flavors, without any modifications.
  • Created two new flavors - p1.tiny (for PPC) and i1.tiny (for i686). PPC is really what I need to get working, but figured I would try i686, too, since that is built-in to KVM, just in case it was some sort of issue with my PPC binary.
  • For the p1.tiny flavor, tried various incantations of flavor-key set for "cpu_arch=ppc", "arch=ppc", "architecture=ppc", "hw:cpu_arch=ppc", etc., and I consistently get the following when trying to launch an instance of that flavor: No valid host was found. There are not enough hosts available.
  • For the i1.tiny flavor, also tried various options - cpu_arch=i686, arch=i686, etc. - and got similar results.

If I had to venture a guess, I would say I'm telling the instance that it is supposed to run on hardware of that architecture, rather than telling it to request a certain Qemu hardware type, and I'm probably not getting the right key/value pair set. If someone can point me in the direction of the correct key/value for making a flavor emulate a certain CPU using the Qemu capabilities on those hosts, I'd really appreciate it.

edit retag flag offensive close merge delete


Were you able to make any progress on this?

sheath gravatar imagesheath ( 2017-02-22 12:38:16 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-07-05 02:35:44 -0500

simon gravatar image

Your flavor looks correct. It's just that you don't have any hypervisors (nova-compute nodes) that can run instances with the desired ppc architecture. Try configuring (some of) your compute nodes with cpu_mode set to custom and an appropriate cpu_model in the [libvirt]section of nova.conf. We do this here to emulate slightly different (restricted) models of Intel x86 CPUs compared to the actual hardware; I'm not sure whether this mechanism is general enough to select a different CPU architecture.

edit flag offensive delete link more


The output I posted above from the DB table indicates that libvirt and OpenStack are seeing the PPC arch of Qemu. I was able to push a little further by setting an image architecture to ppc, but now the libvirt config is causing problems - some options pushed by OpenStack don't work with ppc qemu.

vNick gravatar imagevNick ( 2016-07-06 23:21:56 -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

1 follower


Asked: 2016-07-01 15:00:15 -0500

Seen: 101 times

Last updated: Jul 05 '16