<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7601.19038"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt 微软雅黑">
<DIV><BR><BR>>>> Cole Robinson <crobinso@redhat.com> 2017/11/22 星期三 上午 6:16 >>><BR>>On 11/07/2017 05:34 AM, Lin Ma wrote:<BR>>> Signed-off-by: Lin Ma <lma@suse.com><BR>>> ---<BR>>> virtManager/addhardware.py | 3 +++<BR>>> 1 file changed, 3 insertions(+)<BR>>> <BR>>> diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py<BR>>> index cd82cd3e..fb111344 100644<BR>>> --- a/virtManager/addhardware.py<BR>>> +++ b/virtManager/addhardware.py<BR>>> @@ -889,6 +889,9 @@ class vmmAddHardware(vmmGObjectUI):<BR>>> for t in VirtualController.TYPES:<BR>>> if t == VirtualController.TYPE_PCI:<BR>>> continue<BR>>> + elif (t == VirtualController.TYPE_IDE and<BR>>> + self.vm.get_xmlobj().os.is_q35()):<BR>>> + continue<BR>>> model.append([t, VirtualController.pretty_type(t)])<BR>>> <BR>>> if len(model) > 0:<BR>>> <BR>><BR>>Thanks, but thinking about it, is there any case that we can manually<BR>>add an IDE controller? It's built into the PIIX machine model, not<BR>>available on Q35, and I don't think qemu has any ide controller that can<BR>>be specified with -device, that I know of at least. So I think we can<BR>>disable it unconditionally here<BR>Exactly.</DIV>
<DIV>How about I ignore ide while adding controllers and post a new patch</DIV>
<DIV>with the corresponding code?</DIV>
<DIV>e.g:</DIV>
<DIV>@@ -887,7 +887,8 @@ class vmmAddHardware(vmmGObjectUI):<BR> model.clear()<BR> <BR> for t in VirtualController.TYPES:<BR>- if t == VirtualController.TYPE_PCI:<BR>+ if (t == VirtualController.TYPE_PCI or<BR>+ t == VirtualController.TYPE_IDE):<BR> continue<BR> model.append([t, VirtualController.pretty_type(t)])</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Lin</DIV></BODY></HTML>