qemuMigrationDstPrepareStorage: Properly consider path for 'vdpa' devices

Allow storage migration of VDPA devices by properly checking that they
exist on the destionation. Pre-creation is not supported but if the
device exists the migration should be able to succeed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2024-02-16 16:40:20 +01:00
parent e158b523b8
commit 00c0a94ab5

View File

@ -479,10 +479,13 @@ qemuMigrationDstPrepareStorage(virDomainObj *vm,
diskSrcPath = nvmePath;
break;
case VIR_STORAGE_TYPE_VHOST_VDPA:
diskSrcPath = disk->src->vdpadev;
break;
case VIR_STORAGE_TYPE_NETWORK:
case VIR_STORAGE_TYPE_VOLUME:
case VIR_STORAGE_TYPE_VHOST_USER:
case VIR_STORAGE_TYPE_VHOST_VDPA:
case VIR_STORAGE_TYPE_LAST:
case VIR_STORAGE_TYPE_NONE:
break;