Logs to collect when opening a case with OpenShift Virtualization Support
Environment
- OpenShift Container Platform 4.x
- OpenShift Virtualization 4.x
- Migration Toolkit for Virtualization 2.x
Issue
This article outlines the basic logs to collect when troubleshooting OpenShift Virtualization and Migration Toolkit for Virtualization cases with Red Hat Support. A standard must-gather does not capture virtualization-specific Custom Resources (CRs) like Virtual Machines (VMs) and Virtual Machine Instances (VMIs). As such, additional logs are needed for investigation.
All the steps in this document must be done inside a bastion host (a server that has access to OCP via cli), and the account to be used must have cluster-admin privileges.
Resolution
For OpenShift Virtualization cases
-
Standard must-gather:
oc adm must-gather tar cvaf must-gather.tar.gz must-gather.local.XXXX -
Inspectof theopenshift-cnvnamespace and the namespace where the VM is located:oc adm inspect ns/openshift-cnv ns/[vm_namespace] tar cvaf inspect.local.tar.gz inspect.local.XXXX -
To troubleshoot hypervisor issues, generate a sos report of the node.
In some cases, like for example when additional details of a VM are needed, it's also necessary to collect a must-gather using the virtualization specific image as detailed in the documentation.
For Migration Toolkit for Virtualization cases:
oc adm must-gather
DIR=$(date +%s)
oc adm inspect plans,providers,migrations,storagemaps,networkmaps -A --dest-dir=mtv-inspect.$DIR
oc adm inspect ns/openshift-mtv ns/openshift-cnv ns/[target_ns] --dest-dir=mtv-inspect.$DIR
tar cvaf mtv-logs.tar mtv-inspect.$DIR
tar cvaf must-gather.tar.gz must-gather.local.XXXX
Provide mtv-logs.tar and must-gather.tar.gz to the case.
NOTE: If using a Windows client to run the above, use the following:
oc adm must-gather
oc adm inspect plans,providers,migrations,storagemaps,networkmaps -A
oc adm inspect ns/openshift-mtv ns/openshift-cnv ns/[target_ns]
With a Windows client, you will need to tar each inspect and upload it to the case.
Note that MTV CRs can also be obtained using the MTV specific must-gather image.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.