When creating a libvirt guest using XML, how do I determine what 'arch' values are valid for <domain><os><type arch=?>
? The problem is, for example, arm
is invalid and must be armv7l
instead. How is one supposed to know that?
The documentation says:
There are also two optional attributes, arch specifying the CPU architecture to virtualization, and machine referring to the machine type. The Capabilities XML provides details on allowed values for these.
When I use the virsh command line or the Python API, I cannot get capabilities without providing an architecture. For example:
connection.getDomainCapabilities('/usr/bin/qemu-system-arm')
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/.../libvirt.py", line 4573, in getDomainCapabilities
raise libvirtError('virConnectGetDomainCapabilities() failed')
libvirt.libvirtError: invalid argument: architecture from emulator 'armv7l' doesn't match given architecture 'x86_64'
The equivalent virsh command gives me a similar error. So how can I know what architectures are available to send as an argument to getDomainCapabilities?
Aside: to confuse things, virt-manager lists architectures that don't match the internal representation. So for example, when I create an arm machine, the XML generated lists armv7l.