Vitor de Lima has uploaded a new change for review.
Change subject: vmxml.py, vm.py: Remove QEMU passthrough hack in ppc64
......................................................................
vmxml.py, vm.py: Remove QEMU passthrough hack in ppc64
Recent libvirt versions already include a virtual USB keyboard and
mouse in guests with graphical consoles. This patch does not include
any information about input devices in the domain XML in order to
libvirt handle the creation of these devices automatically.
Change-Id: I64d660bf7534203d5d5cdbc318ffd1429a16f954
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1122627
Signed-off-by: Vitor de Lima <vdelima(a)redhat.com>
---
M vdsm/virt/vm.py
M vdsm/virt/vmxml.py
2 files changed, 3 insertions(+), 27 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/33871/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 1eebb69..5b39752 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2679,7 +2679,9 @@
_VMCHANNEL_DEVICE_NAME)
domxml._appendAgentDevice(self._qemuguestSocketFile.decode('utf-8'),
_QEMU_GA_DEVICE_NAME)
- domxml.appendInput()
+
+ if self.arch == caps.Architecture.X86_64:
+ domxml.appendInput()
if self.arch == caps.Architecture.PPC64:
domxml.appendEmulator()
@@ -2694,9 +2696,6 @@
for drive in self._devices[DISK_DEVICES][:]:
for leaseElement in drive.getLeasesXML():
domxml._devices.appendChild(leaseElement)
-
- if self.arch == caps.Architecture.PPC64:
- domxml.appendKeyboardDevice()
return domxml.toxml()
diff --git a/vdsm/virt/vmxml.py b/vdsm/virt/vmxml.py
index eb07ba9..a83adb1 100644
--- a/vdsm/virt/vmxml.py
+++ b/vdsm/virt/vmxml.py
@@ -165,14 +165,6 @@
domainAttrs = {'type': domainType}
- # Hack around libvirt issue BZ#988070, this is going to be removed as
- # soon as the domain XML format supports the specification of USB
- # keyboards
-
- if self.arch == caps.Architecture.PPC64:
- domainAttrs['xmlns:qemu'] = \
- 'http://libvirt.org/schemas/domain/qemu/1.0'
-
self.dom = Element('domain', **domainAttrs)
self.doc.appendChild(self.dom)
@@ -444,21 +436,6 @@
inputAttrs = {'type': 'mouse', 'bus': mouseBus}
self._devices.appendChildWithArgs('input', **inputAttrs)
-
- def appendKeyboardDevice(self):
- """
- Add keyboard device for ppc64 using a QEMU argument directly.
- This is a workaround to the issue BZ#988070 in libvirt
-
- <qemu:commandline>
- <qemu:arg value='-usbdevice'/>
- <qemu:arg value='keyboard'/>
- </qemu:commandline>
- """
- commandLine = Element('qemu:commandline')
- commandLine.appendChildWithArgs('qemu:arg', value='-usbdevice')
- commandLine.appendChildWithArgs('qemu:arg', value='keyboard')
- self.dom.appendChild(commandLine)
def appendEmulator(self):
emulatorPath = '/usr/bin/qemu-system-' + self.arch
--
To view, visit
http://gerrit.ovirt.org/33871
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I64d660bf7534203d5d5cdbc318ffd1429a16f954
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima <vdelima(a)redhat.com>