Description of problem: VM with vNIC profile configured as 'passthrough' fails to run on an SR-IOV host with free VF allocated. Vdsm reports the following error: 2017-08-08 10:55:50,243+0300 ERROR (vm/f70e5764) [virt.vm] (vmId='f70e5764-9d97-499b-97f4-1fe8b0e44733') The vm start process failed (vm:808) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 742, in _startUnderlyingVm self._run() File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 2327, in _run self._devices = self._make_devices() File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 2315, in _make_devices self.id, self.domain, self._md_desc, self.log File "/usr/lib/python2.7/site-packages/vdsm/virt/vmdevices/common.py", line 200, in dev_map_from_domain_xml dev_obj = dev_class.from_xml_tree(log, dev_elem, dev_meta) File "/usr/lib/python2.7/site-packages/vdsm/virt/vmdevices/network.py", line 74, in from_xml_tree params.update(_get_hostdev_params(dev)) File "/usr/lib/python2.7/site-packages/vdsm/virt/vmdevices/network.py", line 480, in _get_hostdev_params src_dev = vmxml.find_first(dev, 'source') File "/usr/lib/python2.7/site-packages/vdsm/virt/vmxml.py", line 105, in find_first raise NotFound((element, tag,)) NotFound: (<Element 'interface' at 0x7f24d80378d0>, 'source') Version-Release number of selected component (if applicable): 4.2.0-0.0.master.20170807212757.gitfe2e304.el7.centos How reproducible: 100% Steps to Reproduce: 1. On SR-IOV host, select SR-IOV interface and set allocated VFs to 1. 2. Create new VM network 'test' and configure the vnic profile for 'test' to be 'Passthrough'. 3. Attach the default vNIC to the network 'test'. 4. Start VM. Actual results: VM fails to run. Expected results: VM should run.
Created attachment 1310708 [details] vdsm supervdsm and engine logs
Vdsm packages: vdsm-hook-vmfex-dev-4.20.2-41.gitd789a5e.el7.centos.noarch vdsm-api-4.20.2-41.gitd789a5e.el7.centos.noarch vdsm-jsonrpc-4.20.2-41.gitd789a5e.el7.centos.noarch vdsm-python-4.20.2-41.gitd789a5e.el7.centos.noarch vdsm-http-4.20.2-41.gitd789a5e.el7.centos.noarch vdsm-hook-ethtool-options-4.20.2-41.gitd789a5e.el7.centos.noarch vdsm-yajsonrpc-4.20.2-41.gitd789a5e.el7.centos.noarch vdsm-client-4.20.2-41.gitd789a5e.el7.centos.noarch vdsm-4.20.2-41.gitd789a5e.el7.centos.x86_64
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
I suspect that this is related to the Engine domxml work.
here's what Vdsm received: <interface type="hostdev" managed="no"> <driver name="vfio"></driver> <vlan> <tag id="4"></tag> </vlan> <mac address="00:1a:4a:16:91:d8"></mac> <bandwidth> </bandwidth> </interface> Vdsm doesn't expect one hostdev device without the source address, like (made-up example): <source> <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x1'/> </source> Not sure if/how Vdsm should handle that or if it is just Engine bug.
it's missing the source element in hostdev case of writeInterface()
Verified on: 4.2.0-0.0.master.20170823165744.git116f435.el7.centos
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.