diff --git a/tests/uitests/test_details.py b/tests/uitests/test_details.py
index 0110b224..f823c9ef 100644
--- a/tests/uitests/test_details.py
+++ b/tests/uitests/test_details.py
@@ -588,6 +588,7 @@ def testDetailsEditDevices1(app):
def testDetailsEditDevices2(app):
+ app.uri = tests.utils.URIs.kvm_x86
win = app.manager_open_details("test-many-devices",
shutdown=True)
appl = win.find("config-apply", "push button")
@@ -617,6 +618,9 @@ def testDetailsEditDevices2(app):
# Filesystem tweaks
tab = _select_hw(app, win, "Filesystem /target/", "filesystem-tab")
+ tab.combo_select("Driver:", "virtiofs")
+ w = tab.find_fuzzy("Enable shared memory", "label")
+ lib.utils.check(lambda: w.visible)
tab.find("Source path:", "text").set_text("/frib1")
tab.find("Target path:", "text").set_text("newtarget")
tab.find_fuzzy("Export filesystem", "check box").click()
diff --git a/ui/fsdetails.ui b/ui/fsdetails.ui
index 7f0c7074..6d0d18ae 100644
--- a/ui/fsdetails.ui
+++ b/ui/fsdetails.ui
@@ -7,7 +7,7 @@
100
1000
-
+
1
- 5
+ 6
@@ -37,7 +37,7 @@
1
- 6
+ 7
@@ -76,7 +76,7 @@
1
- 3
+ 4
@@ -118,7 +118,7 @@
0
- 3
+ 4
@@ -132,7 +132,7 @@
0
- 5
+ 6
@@ -145,7 +145,7 @@
0
- 6
+ 7
@@ -159,7 +159,7 @@
0
- 4
+ 5
@@ -198,7 +198,7 @@
1
- 4
+ 5
@@ -212,7 +212,7 @@
0
- 2
+ 3
@@ -230,7 +230,7 @@
1
- 2
+ 3
@@ -269,5 +269,45 @@
1
+
+
+
+ 1
+ 2
+
+
+
+
+
diff --git a/virtManager/device/fsdetails.py b/virtManager/device/fsdetails.py
index 17048352..40868d1c 100644
--- a/virtManager/device/fsdetails.py
+++ b/virtManager/device/fsdetails.py
@@ -8,6 +8,7 @@
from gi.repository import Gtk
from virtinst import DeviceFilesystem
+from virtinst import xmlutil
from ..lib import uiutil
from ..baseclass import vmmGObjectUI
@@ -152,6 +153,16 @@ class vmmFSDetails(vmmGObjectUI):
uiutil.set_grid_row_visible(
self.widget("fs-driver-combo"), show_driver_combo)
+ need_shared_mem = fsdriver == "virtiofs"
+ have_shared_mem, _shared_mem_err = self.vm.has_shared_mem()
+ show_shared_mem_warn = need_shared_mem and not have_shared_mem
+ uiutil.set_grid_row_visible(
+ self.widget("fs-driver-warn-box"), show_shared_mem_warn)
+ if show_shared_mem_warn:
+ label = _(
+ "You may need to 'Enable shared memory' on the 'Memory' screen.")
+ self.widget("fs-driver-warn").set_markup(
+ "%s" % xmlutil.xml_escape(label))
##############