Skip to content

Commit 3e48e82

Browse files
authored
Merge pull request #38786 from ousleyp/must-gather-changes
[virt] must-gather changes for 4.9.1/4.8.4
2 parents 8db4de0 + afc1d24 commit 3e48e82

File tree

3 files changed

+86
-4
lines changed

3 files changed

+86
-4
lines changed

modules/virt-about-collecting-virt-data.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
You can use the `oc adm must-gather` CLI command to collect information about your
1111
cluster, including features and objects associated with {VirtProductName}:
1212

13-
* The Hyperconverged Cluster Operator namespaces (and child objects)
14-
* All namespaces (and their child objects) that belong to any {VirtProductName}
15-
resources
13+
* The {VirtProductName} Operator namespaces (and child objects)
1614
* All {VirtProductName} custom resource definitions (CRDs)
1715
* All namespaces that contain virtual machines
18-
* All virtual machine definitions
16+
* Basic virtual machine definitions
1917

2018
To collect {VirtProductName} data with `must-gather`, you must specify the
2119
{VirtProductName} image:
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/logging_events_monitoring/virt-collecting-virt-data.adoc
4+
5+
[id="virt-must-gather-usage-targeted-vm-data_{context}"]
6+
= must-gather tool usage for targeted VM data
7+
8+
When you use the `must-gather` CLI tool to collect {VirtProductName} data, the virtual machine (VM) information collected by default is limited to `VirtualMachine` and `VirtualMachineInstance` custom resources (CRs). You can request additional or targeted data by including parameters when you run the `must-gather` command. These parameters include environment variables and scripts.
9+
10+
[discrete]
11+
[id="supported-parameters_{context}"]
12+
=== Supported parameters
13+
14+
.Environment variables
15+
16+
`NS=<namespace_name>`:: Gather virtual machine details from the namespace that you specify.
17+
18+
`VM=<vm_name>`:: Gather details about a particular virtual machine. To use this option, you must also specify a namespace by using the `NS` environment variable.
19+
20+
`PROS=<number_of_processes>`:: Modify the maximum number of parallel processes that the `must-gather` tool uses. By default, the tool uses no more than five parallel processes.
21+
+
22+
[IMPORTANT]
23+
====
24+
Using too many parallel processes can cause performance issues. Increasing the maximum number of parallel processes is not recommended.
25+
====
26+
27+
.Scripts
28+
29+
Each script is only compatible with certain variable combinations.
30+
31+
`gather_vms_details`:: Collect virtual machine log files, VM definitions, and namespaces (and their child objects) that belong to {VirtProductName} resources. If you use this parameter without specifying a namespace or VM, the `must-gather` tool collects this data for all VMs in the cluster. This script is compatible with all of the supported environment variables, but you must specify a namespace if you use the `VM` variable.
32+
33+
`gather`:: Use the default `must-gather` script, which collects cluster data from all namespaces and includes only basic VM information. This script is only compatible with the `PROS` variable.
34+
35+
`gather_images`:: Collect image and image stream custom resource information. This script is only compatible with the `PROS` variable.
36+
37+
[discrete]
38+
[id="usage_{context}"]
39+
=== Usage
40+
41+
To customize the data that `must-gather` collects, append a double dash (`--`) to the command, followed by one or more compatible parameters. If you use any environment variables, you must specify a script.
42+
43+
The following options are valid:
44+
45+
* You can specify one script without using any environment variables.
46+
* You can use one or more environment variables in any order, followed by one script.
47+
48+
.Syntax
49+
50+
[source,terminal,subs="attributes+"]
51+
----
52+
$ oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v{HCOVersion} \
53+
-- <environment_variable_1> <environment_variable_2> <script_name>
54+
----
55+
56+
.Examples
57+
58+
* The following command collects extensive VM details for the `my-vm` VM in the `mynamespace` namespace:
59+
+
60+
[source,terminal,subs="attributes+"]
61+
----
62+
$ oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v{HCOVersion} -- NS=mynamespace VM=my-vm gather_vms_details
63+
----
64+
+
65+
[IMPORTANT]
66+
====
67+
If you use the `VM` environment variable, you must also specify a namespace.
68+
====
69+
70+
* The following command collects default `must-gather` information by using a maximum of three parallel processes:
71+
+
72+
[source,terminal,subs="attributes+"]
73+
----
74+
$ oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v{HCOVersion} -- PROS=3 gather
75+
----
76+
77+
* The following command collects image and image stream information from the cluster:
78+
+
79+
[source,terminal,subs="attributes+"]
80+
----
81+
$ oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v{HCOVersion} -- gather_images
82+
----

virt/logging_events_monitoring/virt-collecting-virt-data.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ include::modules/about-must-gather.adoc[leveloffset=+1]
2020
include::modules/virt-about-collecting-virt-data.adoc[leveloffset=+1]
2121

2222
include::modules/gathering-data-specific-features.adoc[leveloffset=+1]
23+
24+
include::modules/virt-must-gather-usage-targeted-vm-data.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)