guest: Only add input devices if graphics are specified

This commit is contained in:
Cole Robinson 2017-06-28 12:05:14 -04:00
parent 5a1f2f7b66
commit 4e7cd661ee
10 changed files with 2 additions and 12 deletions

View File

@ -23,7 +23,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>

View File

@ -32,7 +32,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>
@ -69,7 +68,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>

View File

@ -23,7 +23,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>

View File

@ -37,7 +37,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
<memory model="dimm" access="private">
<source>

View File

@ -37,7 +37,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
<memory model="nvdimm">
<source>

View File

@ -37,7 +37,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>

View File

@ -39,7 +39,6 @@
<mac address="00:11:22:33:44:55"/>
<model type="virtio"/>
</interface>
<input type="tablet" bus="usb"/>
<console type="pty"/>
<channel type="unix">
<source mode="bind"/>

View File

@ -32,7 +32,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>
@ -69,7 +68,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>

View File

@ -41,7 +41,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>
@ -86,7 +85,6 @@
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<input type="mouse" bus="ps2"/>
<console type="pty"/>
</devices>
</domain>

View File

@ -618,6 +618,8 @@ class Guest(XMLBuilder):
return
if self.get_devices("input"):
return
if not self.get_devices("graphics"):
return
self.add_device(VirtualInputDevice(self.conn))
def add_default_sound_device(self):