diff --git a/virtManager/object/nodedev.py b/virtManager/object/nodedev.py index 797569b2e..a89663fbc 100644 --- a/virtManager/object/nodedev.py +++ b/virtManager/object/nodedev.py @@ -57,6 +57,13 @@ class vmmNodeDevice(vmmLibvirtObject): return self._STATUS_ACTIVE def _using_events(self): return self.conn.using_node_device_events + def _get_backend_status(self): + is_active = True + if self.conn.support.nodedev_isactive(self._backend): + is_active = self._backend.isActive() + return (is_active and + self._STATUS_ACTIVE or + self._STATUS_INACTIVE) def pretty_name(self): return _pretty_name(self.xmlobj) diff --git a/virtinst/support.py b/virtinst/support.py index 5511bb7aa..b43e024e9 100644 --- a/virtinst/support.py +++ b/virtinst/support.py @@ -304,6 +304,11 @@ class SupportCache: flag="VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA", version="1.0.1") + # Nodedev checks + # Added in libvirt 7.8.0 mid 2021 + nodedev_isactive = _make( + function="virNodeDevice.isActive", run_args=()) + def _check_version(self, version): """