[libvirt] [PATCH] mdev: point user to mdevctl for missing devices

Jonathon Jongsma jjongsma at redhat.com
Mon Aug 19 19:30:05 UTC 2019


When a host is rebooted, any mediated devices that were previously
configured will disappear. There have been requests for libvirt to
handle persisting these mediated devices across reboots, but the
decision was made that this should be handled at a lower level. mdevctl
is a new tool that handles registration and persistence of mediated
devices. If desired, mdevctl can automatically start these mediated
devices when the parent device becomes available.

Since mdevctl is the recommended solution for handling persistent
mediated devices, point users there when they encounter an error for a
missing mediated device.

Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
---

NOTE:
- previous patch which attempted to start missing devices using mdevctl has
  been withdrawn.

 src/util/virmdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/util/virmdev.c b/src/util/virmdev.c
index 3d5488cdae..df02fc8d28 100644
--- a/src/util/virmdev.c
+++ b/src/util/virmdev.c
@@ -149,7 +149,9 @@ virMediatedDeviceNew(const char *uuidstr, virMediatedDeviceModelType model)
 
     if (!virFileExists(sysfspath)) {
         virReportError(VIR_ERR_DEVICE_MISSING,
-                       _("mediated device '%s' not found"), uuidstr);
+                       _("mediated device '%s' not found. "
+                         "Persistent devices can be managed with 'mdevctl'."),
+                       uuidstr);
         return NULL;
     }
 
-- 
2.21.0




More information about the libvir-list mailing list