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:
Merged upstream as: 814a8aaeeb qemu_migration: check for interface type 'hostdev' v7.6.0-11-g814a8aaeeb
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'>
Test on libvirt-7.6.0-2.module+el8.5.0+12219+a5ea13d2.x86_64, the result is as expected.
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