Logs to collect when opening a case with OpenShift Virtualization Support
Environment
- OpenShift Container Platform 4.1x
- OpenShift Virtualization 4.1x
- 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 Resource Definitions (CRDs) 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
For Migration Toolkit for Virtualization cases:
$oc adm must-gather
$DIR=$(date +%s)
$oc adm inspect plans,providers,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 -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.
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.