Lab 1: VM Startup Troubleshooting

Overview & Objectives

This lab focuses on diagnosing and resolving Virtual Machine startup issues in OpenShift Virtualization.

  • Understand the OpenShift Virtualization VM startup workflow and object lifecycle.

  • Inspect key Kubernetes/OpenShift objects including VirtualMachine (VM), VirtualMachineInstance (VMI), virt-launcher pods, PersistentVolumeClaims (PVC), and DataVolumes (DV).

Tasks

Task 1: Troubleshooting Failure Scenario A

Problem Scenario

A Virtual Machine vm1 is configured with a container disk image in namespace {{ bootstrap_tenant_username }}-troubleshoot-01. When attempting to start the VM, the startup process fails.

Reference Documentation & Setup

Diagnostic Commands

Run the following commands in sequence to inspect the VM startup workflow:

oc get vm
oc get vmi
oc describe vmi <vm-name>
oc get pods -l kubevirt.io/created-by=<vmi-uid>
oc describe pod <virt-launcher-pod>
oc get pvc
oc get dv
oc get events

Task 2: Troubleshooting Failure Scenario B

Problem Scenario

A Virtual Machine vm2 fails to start as expected in namespace {{ bootstrap_tenant_username }}-troubleshoot-01. Investigate the issue to determine the root cause and restore the VM to a running state.

Diagnostic Commands

Execute the following commands to check the state of the relevant objects:

oc get vm
oc get vmi
oc describe vmi <vm-name>
oc get pods -l kubevirt.io/created-by=<vmi-uid>
oc describe pod <virt-launcher-pod>
oc get pvc
oc get dv
oc get events