diff --git a/virttest/qemu_storage.py b/virttest/qemu_storage.py index f53a388b2b8..5a3e03edc94 100755 --- a/virttest/qemu_storage.py +++ b/virttest/qemu_storage.py @@ -188,8 +188,10 @@ def filename_to_file_opts(filename): if matches['user'] is not None: file_opts['username'] = matches['user'] # FIXME: Judge the host device by the string starts with "/dev/". - elif filename.startswith('/dev/'): + elif filename.startswith('/dev/') and not filename.startswith("/dev/vhost-vdpa"): file_opts = {'driver': 'host_device', 'filename': filename} + elif filename.startswith("/dev/vhost-vdpa"): + file_opts = {'driver': 'virtio-blk-vhost-vdpa', 'path': filename} else: file_opts = {'driver': 'file', 'filename': filename}