|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * virt/logging_events_monitoring/virt-monitoring-vm-health.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="virt-define-guest-agent-ping-probe_{context}"] |
| 7 | + |
| 8 | += Defining a guest agent ping probe |
| 9 | + |
| 10 | +Define a guest agent ping probe by setting the `spec.readinessProbe.guestAgentPing` field of the virtual machine instance (VMI) configuration. |
| 11 | + |
| 12 | +:FeatureName: The guest agent ping probe |
| 13 | +include::snippets/technology-preview.adoc[] |
| 14 | + |
| 15 | +.Prerequisites |
| 16 | + |
| 17 | +* The QEMU guest agent must be installed and enabled on the virtual machine. |
| 18 | + |
| 19 | +.Procedure |
| 20 | + |
| 21 | +. Include details of the guest agent ping probe in the VMI configuration file. For example: |
| 22 | ++ |
| 23 | + |
| 24 | +.Sample guest agent ping probe |
| 25 | +[source,yaml] |
| 26 | +---- |
| 27 | +# ... |
| 28 | +spec: |
| 29 | + readinessProbe: |
| 30 | + guestAgentPing: {} <1> |
| 31 | + initialDelaySeconds: 120 <2> |
| 32 | + periodSeconds: 20 <3> |
| 33 | + timeoutSeconds: 10 <4> |
| 34 | + failureThreshold: 3 <5> |
| 35 | + successThreshold: 3 <6> |
| 36 | +# ... |
| 37 | +---- |
| 38 | +<1> The guest agent ping probe to connect to the VMI. |
| 39 | +<2> Optional: The time, in seconds, after the VMI starts before the guest agent probe is initiated. |
| 40 | +<3> Optional: The delay, in seconds, between performing probes. The default delay is 10 seconds. This value must be greater than `timeoutSeconds`. |
| 41 | +<4> Optional: The number of seconds of inactivity after which the probe times out and the VMI is assumed to have failed. The default value is 1. This value must be lower than `periodSeconds`. |
| 42 | +<5> Optional: The number of times that the probe is allowed to fail. The default is 3. After the specified number of attempts, the pod is marked `Unready`. |
| 43 | +<6> Optional: The number of times that the probe must report success, after a failure, to be considered successful. The default is 1. |
| 44 | + |
| 45 | +. Create the VMI by running the following command: |
| 46 | ++ |
| 47 | +[source,terminal] |
| 48 | +---- |
| 49 | +$ oc create -f <file_name>.yaml |
| 50 | +---- |
0 commit comments