virsh command with sudo

  • KM01453609
  • 25-Mar-2015
  • 25-Mar-2015

Summary

Run virsh command with sudo privileges

Error


error: failed to connect to the hypervisor
error: no valid connection

Cause

The virsh command must be included in the sudo list in order for this to work. Also, if the path for the command was changed on the customer environment, this path can be changed from the properties tab of the job.
If this is not set correctly, you can get this error:

error: failed to connect to the hypervisor
error: no valid connection

Fix

The virsh command must be included in the sudo list: .*virsh