aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKameron Carr <kameroncarrcollege@gmail.com>2020-07-13 22:19:04 +0000
committerJake Hunsaker <jhunsake@redhat.com>2020-07-23 16:06:42 -0400
commitb981d743cf851c67ace10e3384513b46385364c7 (patch)
tree9de234b131e358a61cea6a6e6ab01103ed2378f1
parentf9cc0df78991228de8fd23e18bc7d28ff7235ef9 (diff)
downloadsos-b981d743cf851c67ace10e3384513b46385364c7.tar.gz
[hyperv] Add plugin for Hyper-V clients
The hyperv plugin collects config files specific to Hyper-V and runs commands for debugging the vmbus. Resolves: #2151 Signed-off-by: Kameron Carr <kameroncarrcollege@gmail.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/hyperv.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/sos/report/plugins/hyperv.py b/sos/report/plugins/hyperv.py
new file mode 100644
index 00000000..f7eb808d
--- /dev/null
+++ b/sos/report/plugins/hyperv.py
@@ -0,0 +1,28 @@
+# This file is part of the sos project: https://github.com/sosreport/sos
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions of
+# version 2 of the GNU General Public License.
+#
+# See the LICENSE file in the source distribution for further information.
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+
+
+class Hyperv(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ """Hyper-V client information"""
+
+ plugin_name = "hyperv"
+ files = ('/sys/bus/vmbus/',)
+
+ def setup(self):
+
+ self.add_copy_spec([
+ "/sys/bus/vmbus/drivers/",
+ # copy devices/*/* instead of devices/ to follow link files
+ "/sys/bus/vmbus/devices/*/*"
+ ])
+
+ self.add_cmd_output("lsvmbus -vv")
+
+# vim: set et ts=4 sw=4 :