[virt-tools-list] 答复: Re: [PATCH] addhardware: Hide IDE while adding controller for q35-based machinetypes
Lin Ma
lma at suse.com
Wed Nov 22 03:44:16 UTC 2017
>>> Cole Robinson <crobinso at redhat.com> 2017/11/22 星期三 上午 6:16 >>>
>On 11/07/2017 05:34 AM, Lin Ma wrote:
>> Signed-off-by: Lin Ma <lma at suse.com>
>> ---
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20171121/fc2ddba9/attachment.htm>
More information about the virt-tools-list
mailing list