Change in vdsm[ovirt-3.5]: virt: keep libvirt's <driver> element
phoracek at redhat.com
phoracek at redhat.com
Thu Mar 26 09:38:06 UTC 2015
Petr Horáček has uploaded a new change for review.
Change subject: virt: keep libvirt's <driver> element
......................................................................
virt: keep libvirt's <driver> element
Most commonly, vdsm does not supply the <driver> element to libvirt, so
that libvirt is able to apply its logic for setting the correct one
(qemu/vhost).
Once libvirt has chosen the driver, it must not change. When link state
is modified, the chosen driver must be stated explicitly.
Change-Id: I043b1c4b932cf0bc83b1f911415245e858ae350d
Signed-off-by: Petr Horáček <phoracek at redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1200418
---
M vdsm/virt/vm.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/39220/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 904c8e1..ed4975c 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -5510,6 +5510,10 @@
devType = x.getAttribute('type')
mac = x.getElementsByTagName('mac')[0].getAttribute('address')
alias = x.getElementsByTagName('alias')[0].getAttribute('name')
+ xdrivers = x.getElementsByTagName('driver')
+ driver = ({'name': xdrivers[0].getAttribute('name'),
+ 'queues': xdrivers[0].getAttribute('queues')}
+ if xdrivers else {})
if devType == 'hostdev':
name = alias
model = 'passthrough'
@@ -5541,6 +5545,8 @@
nic.alias = alias
nic.address = address
nic.linkActive = linkActive
+ if driver:
+ nic.driver = driver
# Update vm's conf with address for known nic devices
knownDev = False
for dev in self.conf['devices']:
--
To view, visit https://gerrit.ovirt.org/39220
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I043b1c4b932cf0bc83b1f911415245e858ae350d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
More information about the vdsm-patches
mailing list