Aline, the point is not the kdb_bus used to configure the keyboard, but the type.<div><br><div>Ramon, I guess you can update, on osinfo.py file, the common_spec dictionary to add the kdb_type value - this will be common to all cases. Then, you can add a new key into power specs specific to ppc64le that have this different value. Anyway, a little modification on vmtemplate.py will be necessary to use the new variable/key.</div></div><br><div class="gmail_quote">On Tue Jan 27 2015 at 2:14:15 PM Aline Manera &lt;<a href="mailto:alinefm@linux.vnet.ibm.com">alinefm@linux.vnet.ibm.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 27/01/2015 10:38, Ramon Medeiros wrote:<br>
&gt; Changes<br>
&gt;<br>
&gt; v2:<br>
&gt;<br>
&gt; Improve coding by removing duplicated actions<br>
&gt; Fix typo<br>
&gt;<br>
&gt; On LE systems, some changes on libvirt xml is needed. The input device<br>
&gt; for keyboard is not kbd anymore, the architecture is still ppc64 and the<br>
&gt; qemu binary is not qemu-kvm as in the other archs.<br>
&gt;<br>
&gt; Signed-off-by: Ramon Medeiros &lt;<a href="mailto:ramonn@linux.vnet.ibm.com" target="_blank">ramonn@linux.vnet.ibm.com</a>&gt;<br>
&gt; ---<br>
&gt;   src/kimchi/<a href="http://config.py.in" target="_blank">config.py.in</a>  | 11 +++++++++--<br>
&gt;   src/kimchi/osinfo.py     |  6 +++++-<br>
&gt;   src/kimchi/vmtemplate.py | 11 +++++++++--<br>
&gt;   3 files changed, 23 insertions(+), 5 deletions(-)<br>
&gt;<br>
&gt; diff --git a/src/kimchi/<a href="http://config.py.in" target="_blank">config.py.in</a> b/src/kimchi/<a href="http://config.py.in" target="_blank">config.py.in</a><br>
&gt; index 83a5dd0..d5e0f6c 100644<br>
&gt; --- a/src/kimchi/<a href="http://config.py.in" target="_blank">config.py.in</a><br>
&gt; +++ b/src/kimchi/<a href="http://config.py.in" target="_blank">config.py.in</a><br>
&gt; @@ -68,12 +68,19 @@ def find_qemu_binary(find_<u></u>emulator=False):<br>
&gt;           raise Exception(&quot;Unable to get qemu binary location: %s&quot; % e)<br>
&gt;       try:<br>
&gt;           xml = connect.getCapabilities()<br>
&gt; +<br>
&gt; +        # On Little Endian system, the qemu binary is<br>
&gt; +        # qemu-system-ppc64, not qemu-system-ppc64le as expected<br>
&gt; +        arch = platform.machine()<br>
&gt; +        if arch == &quot;ppc64le&quot;:<br>
&gt; +            arch = &quot;ppc64&quot;<br>
&gt; +<br>
&gt;           if find_emulator:<br>
&gt;               expr = &quot;/capabilities/guest/arch[@<u></u>name=&#39;%s&#39;]\<br>
&gt; -                    /emulator&quot; % platform.machine()<br>
&gt; +                    /emulator&quot; % arch<br>
&gt;           else:<br>
&gt;               expr = &quot;/capabilities/guest/arch[@<u></u>name=&#39;%s&#39;]\<br>
&gt; -                    /domain[@type=&#39;kvm&#39;]/emulator&quot; % platform.machine()<br>
&gt; +                    /domain[@type=&#39;kvm&#39;]/emulator&quot; % arch<br>
&gt;           res = xpath_get_text(xml, expr)<br>
&gt;           location = res[0]<br>
&gt;       except Exception, e:<br>
&gt; diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py<br>
&gt; index 0e16b50..9bfd148 100644<br>
&gt; --- a/src/kimchi/osinfo.py<br>
&gt; +++ b/src/kimchi/osinfo.py<br>
&gt; @@ -29,7 +29,7 @@ from kimchi.config import paths<br>
&gt;<br>
&gt;<br>
&gt;   SUPPORTED_ARCHS = {&#39;x86&#39;: (&#39;i386&#39;, &#39;i686&#39;, &#39;x86_64&#39;),<br>
&gt; -                   &#39;power&#39;: (&#39;ppc&#39;, &#39;ppc64&#39;)}<br>
&gt; +                   &#39;power&#39;: (&#39;ppc&#39;, &#39;ppc64&#39;, &#39;ppc64le&#39;)}<br>
<br>
In osinfo.py we have a dict for each supported arch.<br>
<br>
template_specs = {&#39;x86&#39;: {&#39;old&#39;: dict(common_spec, disk_bus=&#39;ide&#39;,<br>
                                       nic_model=&#39;e1000&#39;,<br>
sound_model=&#39;ich6&#39;),<br>
                           &#39;modern&#39;: dict(common_spec, disk_bus=&#39;virtio&#39;,<br>
nic_model=&#39;virtio&#39;,<br>
sound_model=&#39;ich6&#39;)},<br>
                   &#39;power&#39;: {&#39;old&#39;: dict(common_spec, disk_bus=&#39;scsi&#39;,<br>
nic_model=&#39;spapr-vlan&#39;,<br>
cdrom_bus=&#39;scsi&#39;,<br>
                                         kbd_bus=&#39;usb&#39;, mouse_bus=&#39;usb&#39;,<br>
                                         tablet_bus=&#39;usb&#39;, memory=1280),<br>
                             &#39;modern&#39;: dict(common_spec, disk_bus=&#39;virtio&#39;,<br>
nic_model=&#39;virtio&#39;,<br>
cdrom_bus=&#39;scsi&#39;, kbd_bus=&#39;usb&#39;,<br>
                                            mouse_bus=&#39;usb&#39;,<br>
tablet_bus=&#39;usb&#39;,<br>
                                            memory=1280)}}<br>
<br>
You should add the new ppc64le there with the right bus values.<br>
So for ppc64el we should point the kbd_bus=&quot;keyboard&quot;<br>
<br>
And vmtemplate.py will not change.<br>
<br>
&gt;<br>
&gt;<br>
&gt;   common_spec = {&#39;cpus&#39;: 1, &#39;memory&#39;: 1024, &#39;disks&#39;: [{&#39;index&#39;: 0, &#39;size&#39;: 10}],<br>
&gt; @@ -94,6 +94,10 @@ def lookup(distro, version):<br>
&gt;       params[&#39;os_version&#39;] = version<br>
&gt;       arch = _get_arch()<br>
&gt;<br>
&gt; +    # set up arch to ppc64 instead of ppc64le due to libvirt compatibility<br>
&gt; +    if params[&quot;arch&quot;] == &quot;ppc64le&quot;:<br>
&gt; +        params[&quot;arch&quot;] = &quot;ppc64&quot;<br>
&gt; +<br>
&gt;       if distro in modern_version_bases[arch]:<br>
&gt;           if LooseVersion(version) &gt;= LooseVersion(<br>
&gt;                   modern_version_bases[arch][<u></u>distro]):<br>
&gt; diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py<br>
&gt; index e41a959..bcfbab6 100644<br>
&gt; --- a/src/kimchi/vmtemplate.py<br>
&gt; +++ b/src/kimchi/vmtemplate.py<br>
&gt; @@ -245,9 +245,16 @@ class VMTemplate(object):<br>
&gt;           mouse = &quot;&quot;&quot;<br>
&gt;               &lt;input type=&#39;mouse&#39; bus=&#39;%(mouse_bus)s&#39;/&gt;<br>
&gt;           &quot;&quot;&quot;<br>
&gt; +<br>
&gt; +        # PPC64EL does not uses kbd<br>
&gt; +        <a href="http://self.info" target="_blank">self.info</a>[&quot;kbd_type&quot;] = &quot;kbd&quot;<br>
&gt; +        if os.uname()[4] == &quot;ppc64le&quot;:<br>
&gt; +           <a href="http://self.info" target="_blank">self.info</a>[&quot;kbd_type&quot;] = &quot;keyboard&quot;<br>
&gt; +<br>
&gt;           keyboard = &quot;&quot;&quot;<br>
&gt; -            &lt;input type=&#39;kbd&#39; bus=&#39;%(kbd_bus)s&#39;&gt; &lt;/input&gt;<br>
&gt; -        &quot;&quot;&quot;<br>
&gt; +            &lt;input type=&#39;%(kbd_type)s&#39; bus=&#39;%(kbd_bus)s&#39;&gt; &lt;/input&gt;<br>
&gt; +        &quot;&quot;&quot;<br>
&gt; +<br>
&gt;           tablet = &quot;&quot;&quot;<br>
&gt;               &lt;input type=&#39;tablet&#39; bus=&#39;%(kbd_bus)s&#39;&gt; &lt;/input&gt;<br>
&gt;           &quot;&quot;&quot;<br>
<br>
______________________________<u></u>_________________<br>
Kimchi-devel mailing list<br>
<a href="mailto:Kimchi-devel@ovirt.org" target="_blank">Kimchi-devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel" target="_blank">http://lists.ovirt.org/<u></u>mailman/listinfo/kimchi-devel</a><br>
</blockquote></div>