Bug 1234328
Summary: | [RFE] SR-IOV --> add support for Hotplug/unplug of VFs | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Michael Burman <mburman> | ||||||||
Component: | General | Assignee: | Edward Haas <edwardh> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Michael Burman <mburman> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | --- | CC: | bazulay, bgraveno, bugs, danken, gklein, lsurette, mburman, rbalakri, sbonazzo, srevivo, ykaul | ||||||||
Target Milestone: | ovirt-4.0.0-beta | Keywords: | FutureFeature | ||||||||
Target Release: | 4.0.0 | Flags: | rule-engine:
ovirt-4.0.0+
gklein: testing_plan_complete- rule-engine: planning_ack+ rule-engine: devel_ack+ rule-engine: testing_ack+ |
||||||||
Hardware: | x86_64 | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | ovirt 4.0.0 alpha1 | Doc Type: | Enhancement | ||||||||
Doc Text: |
It is now possible to hot plug and unplug SR-IOV virtual functions to running virtual machines.
|
Story Points: | --- | ||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2016-07-05 08:05:10 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | Network | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 868811, 1425313 | ||||||||||
Attachments: |
|
Description
Michael Burman
2015-06-22 11:41:02 UTC
Created attachment 1041748 [details]
screenshot
Created attachment 1041751 [details]
screenshot_engine_log
This should first be implemented in Vdsm. Attaching a VF during vm.create is based on attaching of generic host device, with some network decoration (vlan id). Similarly, attaching a VF after the VM is running (=hotplugging) should be based on hot-plugging of a host device, which requires a new Vdsm verb. Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release. Could you try if hot unplug magically works with ovirt-3.6.1's vdsm? To do this, please start a VM with a VF as its nic, and then use vdsClient -S 0 hotunplugNic <vmid> macAddr:<macaddress> (you may need to play a bit with this command line as I have not used it for years) Please include vdsm.log's section where the hotunplug request is passed to libvirt. surprisingly (or not) calling hot(un)plug almost works. The missing part is automatically attach the device back to the host once it is unplugged from the vm and the other way around. We tried to do the following step by hand: unplug steps: calling hostdev.reattach_detachable on vdsm calling hotunplugNic result: the device was sucssessfully removed from the vma and reattached to host plug steps: calling hostdev.detach_detachable on vdsm calling hotplugNic result: the device was attached to the vm and detached from host, but detach_detachable returned the following libvirt error: 2015-11-29 13:27:40.638+0000: 1731: error : virPCIDeviceReattach:1377 : internal error: Not reattaching active device 0000:05:10.1 from vdsm.log: Thread-19191::DEBUG::2015-11-29 15:27:40,634::bindingxmlrpc::1257::vds::(wrapper) client [127.0.0.1]::call vmHotplugNic with ({'nic': {'device': 'hostdev', 'type': 'interface', 'macAddr': '00:00:00:00:00:22', 'h ostdev': 'pci_0000_05_10_1', 'specParams': {}}, 'vmId': 'ed5a35cc-4811-4000-8af8-51a8daae03b2'},) {} Thread-19191::INFO::2015-11-29 15:27:40,637::vm::1979::virt.vm::(hotplugNic) vmId=`ed5a35cc-4811-4000-8af8-51a8daae03b2`::Hotplug NIC xml: <interface managed="no" type="hostdev"> <mac address="00:00:00:00:00:22"/> <source> <address bus="5" domain="0" function="1" slot="16" type="pci"/> </source> <driver name="vfio"/> </interface> Thread-19191::ERROR::2015-11-29 15:27:40,639::vm::1984::virt.vm::(hotplugNic) vmId=`ed5a35cc-4811-4000-8af8-51a8daae03b2`::Hotplug failed Traceback (most recent call last): File "/usr/share/vdsm/virt/vm.py", line 1982, in hotplugNic self._dom.attachDevice(nicXml) File "/usr/share/vdsm/virt/virdomain.py", line 68, in f ret = attr(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 124, in wrapper ret = f(*args, **kwargs) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 530, in attachDevice if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) libvirtError: internal error: Not reattaching active device 0000:05:10.1 Thread-19191::DEBUG::2015-11-29 15:27:40,640::bindingxmlrpc::1264::vds::(wrapper) return vmHotplugNic with {'status': {'message': 'internal error: Not reattaching active device 0000:05:10.1', 'code': 49}} so it seems that the basic missing functionality is small and there is a small libvirt issue that needs to be resolved, Relevant patches have been merged to the master branch of both Engine is Vdsm. Tested on 4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos with vdsm-4.17.999-892.git435139d.el7.centos.noarch and failed QA. We have few problems here, not sure if it's engine or vdsm or both side. Issues: 1) Enable Vfs on host 2) Run VM with 'passthorugh' vNIC(1 VF is taken) 3) Hotunpug the vNIC --> VF not released and still considered as non-FREE 4) Hotplug back the vNIC --> Another VF is taken from the host 5) For every hotunplug and hotplug back, another VF will be taken from the host 6) Shutdown the VM won't release the VFs and all of them will be considered as non-free until we will reboot the server. 7) Question: When unplugging a 'pci-passthrouhg' vNIC, can we update the profile with another 'passthough' profile? should it be blocked or supported? Moving back to assigned and attaching logs. Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release. Created attachment 1144693 [details]
failed qa logs
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA. VF leakage was fixed by https://gerrit.ovirt.org/56013 please recheck. regarding your Question 7: you may edit vnic profiles while VMs are running. The changes would take effect on the next time the profile is used on unplug or startup. Verified on - 4.0.0-0.0.master.20160524171531.gitfba61e9.el7.centos and vdsm-4.18.0-43.git6f7fc83.el7.centos.x86_64 oVirt 4.0.0 has been released, closing current release. |