mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
guest: remove spiceport devices when spice is removed
serial/console type='spiceport' is another spice specific device, so remove that too Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
229b905053
commit
f0078a179d
@ -26,5 +26,15 @@
|
||||
</video>
|
||||
<redirdev bus="usb" type="spicevmc"/>
|
||||
<redirdev bus="usb" type="spicevmc"/>
|
||||
<serial type='spiceport'>
|
||||
<source channel='org.qemu.console.serial.0'/>
|
||||
<target type='isa-serial' port='0'>
|
||||
<model name='isa-serial'/>
|
||||
</target>
|
||||
</serial>
|
||||
<console type='spiceport'>
|
||||
<source channel='org.qemu.console.serial.0'/>
|
||||
<target type='serial' port='0'/>
|
||||
</console>
|
||||
</devices>
|
||||
</domain>
|
||||
|
@ -1355,10 +1355,16 @@ class Guest(XMLBuilder):
|
||||
if redirdev.type == "spicevmc":
|
||||
self.devices.remove_child(redirdev)
|
||||
|
||||
def _remove_spiceport(self):
|
||||
for dev in self.devices.serial + self.devices.console:
|
||||
if dev.type == dev.TYPE_SPICEPORT:
|
||||
self.devices.remove_child(dev)
|
||||
|
||||
def _force_remove_spice_devices(self):
|
||||
self._remove_spice_audio()
|
||||
self._remove_spice_channels()
|
||||
self._remove_spice_usbredir()
|
||||
self._remove_spiceport()
|
||||
|
||||
def _remove_spice_devices(self, rmdev):
|
||||
if rmdev.DEVICE_TYPE != "graphics" or self.has_spice():
|
||||
|
Loading…
Reference in New Issue
Block a user