RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2092833 - [RFE] Support vDPA live migration in libvirt
Summary: [RFE] Support vDPA live migration in libvirt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Eugenio Pérez Martín
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-02 10:33 UTC by yalzhang@redhat.com
Modified: 2022-11-15 10:40 UTC (History)
12 users (show)

Fixed In Version: libvirt-8.5.0-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 10:04:39 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-124053 0 None None None 2022-06-02 10:41:45 UTC
Red Hat Product Errata RHSA-2022:8003 0 None None None 2022-11-15 10:05:06 UTC

Description yalzhang@redhat.com 2022-06-02 10:33:34 UTC
Description of problem: 
Support vDPA live migration

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Current libvirt do not support vDPA live migration:
# virsh dumpxml rhel | grep /interface -B6
<interface type='vdpa'>
      <mac address='00:11:22:33:44:00'/>
      <source dev='/dev/vhost-vdpa-0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </interface>
# virsh save rhel rhel.save
error: Failed to save domain 'rhel' to rhel.save
error: Requested operation is not valid: vDPA devices cannot be migrated

Comment 13 yalzhang@redhat.com 2022-07-28 06:24:26 UTC
With downstream packages below, test 2 scenarios includeing: 
1)try to migrate with vdpa interface(vdpa_sim) -> fail with reasonable error msg
2)try to migrate with vhost-net -> pass
The result is as expected.

1)current downstream kernel and qemu do not support vdpa yet, so the result is as expected:
# rpm -q libvirt qemu-kvm kernel
libvirt-8.5.0-3.el9.x86_64
qemu-kvm-7.0.0-9.el9.x86_64
kernel-5.14.0-136.el9.x86_64

# modprobe vdpa
# modprobe vhost_vdpa
# modprobe vdpa_sim
# modprobe vdpa_sim_net
#  vdpa mgmtdev show
vdpasim_net: 
  supported_classes net
  max_supported_vqs 2
  dev_features MAC ANY_LAYOUT VERSION_1 ACCESS_PLATFORM
# vdpa dev add name vdpa0 mgmtdev vdpasim_net mac 00:11:22:33:44:00
# virsh dumpxml rhel --xpath //interface 
<interface type="vdpa">
  <mac address="00:11:22:33:44:00"/>
  <source dev="/dev/vhost-vdpa-0"/>
  <model type="virtio"/>
  <alias name="net0"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>

# virsh migrate rhel qemu+ssh://xxx/system --live --verbose 
root@xxx's password: 
error: Requested operation is not valid: cannot migrate domain: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.

2) vhost-net can be migrated:
# virsh dumpxml rhel --xpath //interface  
<interface type="network">
  <mac address="52:54:00:df:28:e5"/>
  <source network="default" portid="4569e614-8f12-4787-8831-14b442cc91c4" bridge="virbr0"/>
  <target dev="vnet0"/>
  <model type="virtio"/>
  <alias name="net0"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
# virsh migrate rhel qemu+ssh://xxx/system --live --verbose 
root@xxx's password: 
Migration: [100 %]

Comment 19 yalzhang@redhat.com 2022-08-04 03:20:00 UTC
Test with latest libvirt-8.5.0-4.el9.x86_64 with vdpa interface:

1) Run save for 2 times:
# virsh save rhel rhel.save
error: Failed to save domain 'rhel' to rhel.save
error: Requested operation is not valid: cannot migrate domain: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.

# virsh save rhel rhel.save
error: Failed to save domain 'rhel' to rhel.save
error: Requested operation is not valid: cannot migrate domain: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.

2) migrate:
with vdpa interface
# virsh migrate rhel  qemu+ssh://10.66.146.xx/system --live --verbose 
root.146.xx's password: 
error: Requested operation is not valid: cannot migrate domain: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.

with vhost-net:
# virsh migrate rhel  qemu+ssh://10.66.146.xx/system --live --verbose  
root.146.xx's password: 
Migration: [100 %]

Comment 20 yalzhang@redhat.com 2022-08-04 03:49:55 UTC
Hi Eugenio, when I tried to migrate with mlx vdpa, the error msg is like below.
It is different from the error msg with vdpa_sim, additional text "; Migration disabled: vhost lacks VHOST_F_LOG_ALL feature."
Is that expected? Please help to confirm, Thank you!

# virsh migrate test qemu+ssh://xxx.redhat.com/system --live --verbose 
root.com's password: 
error: Requested operation is not valid: cannot migrate domain: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.; Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.

Comment 21 Eugenio Pérez Martín 2022-08-04 06:18:16 UTC
(In reply to yalzhang from comment #20)
> Hi Eugenio, when I tried to migrate with mlx vdpa, the error msg is like
> below.
> It is different from the error msg with vdpa_sim, additional text ";
> Migration disabled: vhost lacks VHOST_F_LOG_ALL feature."
> Is that expected? Please help to confirm, Thank you!
> 
> # virsh migrate test qemu+ssh://xxx.redhat.com/system --live --verbose 
> root.com's password: 
> error: Requested operation is not valid: cannot migrate domain: Migration
> disabled: vhost lacks VHOST_F_LOG_ALL feature.; Migration disabled: vhost
> lacks VHOST_F_LOG_ALL feature.

Hi!

This is expected, you'll find one message per data virtqueue pair + one
message if the guest enabled CVQ on that vdpa device.

In the vhost-kernel or vhost-user devices there is no control vq message.

Thanks!

Comment 23 errata-xmlrpc 2022-11-15 10:04:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: libvirt security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8003


Note You need to log in before you can comment on or make changes to this bug.