Revision history [back]

click to hide/show revision 1
initial version

Setting Qemu Architecture

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.