[virt-tools-list] [virt-manager] [PATCH 2/7] domcapabilities: Add supports_filesystem_virtiofs()
Lin Ma
lma at suse.com
Sun Aug 1 12:36:37 UTC 2021
Check whether virtiofs is exposed in domcapabilities, We can use it as a
proxy for 'libvirt is new enough to allow bare memory access mode=shared'
as well.
Signed-off-by: Lin Ma <lma at suse.com>
---
virtinst/domcapabilities.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
index 65b984ce..978deb85 100644
--- a/virtinst/domcapabilities.py
+++ b/virtinst/domcapabilities.py
@@ -363,6 +363,13 @@ class DomainCapabilities(XMLBuilder):
types = self.devices.graphics.get_enum("type").get_values()
return bool("spice" in types)
+ def supports_filesystem_virtiofs(self):
+ """
+ Return True if libvirt advertises support for virtiofs
+ """
+ types = self.devices.filesystem.get_enum("driverType").get_values()
+ return bool("virtiofs" in types)
+
XML_NAME = "domainCapabilities"
os = XMLChildProperty(_OS, is_single=True)
--
2.26.2
More information about the virt-tools-list
mailing list