From d168af8fad9a7eec661e134a2a29ff0caf30be6b Mon Sep 17 00:00:00 2001 From: Yingshun Cui Date: Wed, 18 Sep 2024 16:02:40 +0800 Subject: [PATCH] vIOMMU: Remove the iommu device before attaching it Update to remove the iommu device before attaching it to avoid failures. Signed-off-by: Yingshun Cui --- libvirt/tests/src/sriov/vIOMMU/attach_iommu_device.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt/tests/src/sriov/vIOMMU/attach_iommu_device.py b/libvirt/tests/src/sriov/vIOMMU/attach_iommu_device.py index bf208b9acd..7ff0bb3f16 100644 --- a/libvirt/tests/src/sriov/vIOMMU/attach_iommu_device.py +++ b/libvirt/tests/src/sriov/vIOMMU/attach_iommu_device.py @@ -34,6 +34,7 @@ def run(test, params, env): vmxml.sync() err_msg = '' + libvirt_vmxml.remove_vm_devices_by_type(vm, 'iommu') iommu_dev = libvirt_vmxml.create_vm_device_by_type('iommu', iommu_dict) test.log.debug(f"iommu device: {iommu_dev}") res = virsh.attach_device(vm.name, iommu_dev.xml, debug=True,