>>> Cole Robinson <[email protected]> 2017/11/22 星期三 上午 6:16 >>>
>On 11/07/2017 05:34 AM, Lin Ma wrote:
>> Signed-off-by: Lin Ma <[email protected]>
>> ---
>>  virtManager/addhardware.py | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
>> index cd82cd3e..fb111344 100644
>> --- a/virtManager/addhardware.py
>> +++ b/virtManager/addhardware.py
>> @@ -889,6 +889,9 @@ class vmmAddHardware(vmmGObjectUI):
>>                for t in VirtualController.TYPES:
>>                        if t == VirtualController.TYPE_PCI:
>>                                continue
>> +                elif (t == VirtualController.TYPE_IDE and
>> +                              self.vm.get_xmlobj().os.is_q35()):
>> +                        continue
>>                        model.append([t, VirtualController.pretty_type(t)])
>>  
>>                if len(model) > 0:
>> 
>
>Thanks, but thinking about it, is there any case that we can manually
>add an IDE controller? It's built into the PIIX machine model, not
>available on Q35, and I don't think qemu has any ide controller that can
>be specified with -device, that I know of at least. So I think we can
>disable it unconditionally here
Exactly.
How about I ignore ide while adding controllers and post a new patch
with the corresponding code?
e.g:
@@ -887,7 +887,8 @@ class vmmAddHardware(vmmGObjectUI):
                 model.clear()
 
                 for t in VirtualController.TYPES:
-                   if t == VirtualController.TYPE_PCI:
+                   if (t == VirtualController.TYPE_PCI or
+                           t == VirtualController.TYPE_IDE):
                                 continue
                         model.append([t, VirtualController.pretty_type(t)])
 
Thanks,
Lin
_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to