[Kimchi-devel] [PATCH v3 3/4] Define the USB xhci controller in the template for Power Systems

Ramon Medeiros ramonn at linux.vnet.ibm.com
Tue Aug 4 13:20:28 UTC 2015



On 07/13/2015 11:47 AM, Jose Ricardo Ziviani wrote:
>   model
> +        distro, _, _ = platform.linux_distribution()
> +        if distro != "IBM_PowerKVM":
> +            return ''
> +
> +        return """
> +        <controller type='usb' index='0' model='nec-xhci'>
the model "nec-xhci" does not accept keys when kimchi is being used 
inside a VNC session. Please, use "pci-ohci" instead

> +            <address type='pci' domain='0x0000'
> +            bus='0x00' slot='0x0f' function='0x0'/>
> +        </controller>
> +        """
> +
>       def to_vm_xml(self, vm_name, vm_uuid, **kwargs):
>           params = dict(self.info)
>           params['name'] = vm_name
> @@ -323,6 +337,8 @@ class VMTemplate(object):
>           elif params['slots'] == 0:
>               params['slots'] = 1
>
> +        params['usb_controller'] = self._get_usb_controller()
> +
>           xml = """
>           <domain type='%(domain)s'>
>             %(qemu-stream-cmdline)s
> @@ -352,6 +368,7 @@ class VMTemplate(object):
>               %(networks)s
>               %(graphics)s
>               %(input_output)s
> +            %(usb_controller)s
>               <memballoon model='virtio' />
>             </devices>
>           </domain>

-- 

Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com




More information about the Kimchi-devel mailing list