Bug 1942315 - improve error message when try to managedsave a domain with hostdev type interface
Summary: improve error message when try to managedsave a domain with hostdev type inte...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.4
Assignee: khanicov
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-24 06:58 UTC by yalzhang@redhat.com
Modified: 2021-11-16 08:23 UTC (History)
8 users (show)

Fixed In Version: libvirt-7.6.0-2.module+el8.5.0+12219+a5ea13d2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 07:52:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4684 0 None None None 2021-11-16 07:52:47 UTC

Description yalzhang@redhat.com 2021-03-24 06:58:42 UTC
Description of problem:
The error message can be improved when try to managedsave a domain with hostdev type interface

Version-Release number of selected component (if applicable):
libvirt-7.0.0-10.module+el8.4.0+10417+37f6984d.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Start a vm with hostdev type interface as below# virsh dumpxml test | grep /interface -B12
<interface type='hostdev' managed='yes'>
<mac address='52:54:00:bc:37:1b'/>
<driver name='vfio'/>
<source>
<address type='pci' domain='0x0000' bus='0x04' slot='0x10' function='0x7'/>
</source>
<alias name='hostdev0'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</interface>
2. Tried to do managedsave which is not supported:
# virsh managedsave test
error: Failed to save domain 'test' state
error: Operation not supported: cannot migrate a domain with <hostdev mode='subsystem' type='pci'>

Actual results:
The error message reported "cannot migrate a domain with <hostdev mode='subsystem' type='pci'>", but in fact, it is a hostdev interface "<interface type='hostdev' managed='yes'>"

Expected results:
The error message can be improved to be like "cannot do mangedsave for a domain with hostdev interface or device"

Additional info:

Comment 3 khanicov 2021-08-05 10:50:18 UTC
Merged upstream as:

814a8aaeeb qemu_migration: check for interface type 'hostdev'

v7.6.0-11-g814a8aaeeb

Comment 5 yalzhang@redhat.com 2021-08-16 10:35:56 UTC
Test on libvirt-libs-7.6.0-2.module+el8.5.0+12219+a5ea13d2.x86_64 with hostdev interface, the result is as expected

# virsh managedsave rhel 
error: Failed to save domain 'rhel' state
error: Operation not supported: cannot migrate a domain with <interface type='hostdev'>

With hostdev device, it is also expected:
# virsh managedsave rhel 
error: Failed to save domain 'rhel' state
error: Operation not supported: cannot migrate a domain with <hostdev mode='subsystem' type='pci'>

Comment 8 yalzhang@redhat.com 2021-08-30 01:43:52 UTC
Test on libvirt-7.6.0-2.module+el8.5.0+12219+a5ea13d2.x86_64, the result is as expected.

Comment 10 errata-xmlrpc 2021-11-16 07:52:17 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 (virt:av 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/RHBA-2021:4684


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