If a machine doesn’t behave as expected, collect its state and the state of the related resources into a single archive.

The collect-debug-info command requires d8 v0.27.0 or later.

The archive contains the following information:

  • the virtual machine configuration;
  • operations on the virtual machine;
  • migration information;
  • block devices;
  • related PVCs and PVs;
  • pods related to the VM, including their logs (the last 10000 lines);
  • events for all related resources;
  • the XML configuration of the VM domain.

The collected data is stored in the archive in YAML format (for resources) and in text files (for logs). You can send such an archive to technical support to analyze a problem.

The following example shows how to collect such an archive:

  • Using the CLI
  • Using the web interface

The collect-debug-info command collects diagnostic data about a virtual machine and all related resources into a compressed archive (tar.gz) that goes to stdout, so the output has to be redirected to a file.

Usage example:

# Collect debug information for the 'linux-vm' virtual machine
d8 v collect-debug-info linux-vm > debug-info.tar.gz

# Collect debug information for a VM with the namespace specified
d8 v collect-debug-info linux-vm -n mynamespace > debug-info.tar.gz

# Collect debug information for a VM with the full name specified (name.namespace)
d8 v collect-debug-info linux-vm.mynamespace > debug-info.tar.gz

Without the output redirected to a file, the command fails, and on success you get the debug-info.tar.gz archive.

  1. Go to the Projects tab and select the project you need.
  2. Go to VirtualizationVirtual machines.
  3. Select the VM you need from the list and click its name.
  4. Go to the Diagnostics tab.
  5. The VM pods block shows the pods of the virtual machine, their phase, and the node they’re placed on.
  6. In the VM pod logs block, you can view the pod logs, filter the lines with a regular expression, and set the number of last lines.
  7. To download the archive with diagnostic data, click Download diagnostic data.

Current and completed operations on the VM are shown on the Operations tab: for each operation, the date, the VirtualMachineOperation resource name, the type (Start, Stop, and others), the status, the progress, and the message are shown; you can limit the list to the Day, Week, or Month period. Events are shown on the Events tab, and resource consumption charts on the Monitoring tab.

Additional resources