ERROR: Configuration file <virt-who-conf>.conf contains no section headers

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.2
  • Virt-who

Issue

  • virt-who command is failing with below error:
# virt-who -d -o

:

ERROR: Configuration file virt-who.conf contains no section headers

Resolution

  • First, execute below command to verify character-set of virt-who configuration file:
    # file -i /etc/virt-who.d/<virt-who>.conf
  • Now move original virt-who configuration file to /tmp.
    # mv /etc/virt-who.d/<virt-who>.conf /tmp
  • After that run below command to change character-set to charset=us-ascii and copy it to virt-who configuration directory:
    # iconv -f UTF8 -t US-ASCII//TRANSLIT /tmp/<virt-who>.conf > /etc/virt-who.d/<virt-who>.conf
  • Verify the changes with below command:
    # file -i /etc/virt-who.d/<virt-who>.conf
  • Now run below command to print virt-who debug on screen:
    # virt-who -d -o

For more KB articles/solutions related to Virt-who and Virtual Datacenter (VDC) Subscriptions Issues, please refer to the Consolidated Troubleshooting Article for Virt-who and Virtual Datacenter (VDC) Subscriptions Issues

Root Cause

  • Virt-Who configuration file has been downloaded from Red Hat virt-who configuration helper Tool.
  • The downloaded file contains character-set in UTF-8 format, which is unsupported.
  • Virt-who configuration file needs to be in US-ASCII character-set format

Diagnostic Steps

  1. Download virt-who configuration file from Red Hat virt-who configuration helper Tool.
  2. virt-who command is printing below error:
# virt-who -d --one-shot

2017-09-01 16:00:48,575 ERROR: Configuration file <virt-who>.conf contains no section headers
2017-09-01 16:00:48,575 INFO: No configurations found (are there any '.conf' files in /etc/virt-who.d?), using libvirt as backend
2017-09-01 16:00:48,575 INFO: Using configuration "env/cmdline" ("libvirt" mode)
2017-09-01 16:00:48,575 INFO: Using reporter_id='satellite.example.conf-fe365534f07f47a6bfd2ee52b4800fdb'
2017-09-01 16:00:48,623 INFO: Using libvirt url: ""
2017-09-01 16:00:48,623 ERROR: Error in libvirt backend
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock-ro': No such file or directory
2017-09-01 16:00:48,623 ERROR: Thread 'env/cmdline' fails with error: Failed to connect socket to '/var/run/libvirt/libvirt-sock-ro': No such file or directory
2017-09-01 16:00:48,624 INFO: Report for config "env/cmdline" gathered, placing in datastore

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.

Comments