qemuvirsh

virsh "Operation not supported: Cannot use direct socket mode if no URI is set"


Env: MacOS Arm64

Installed:

sudo port install virt-manager

Trying to create a default network following this

When I do this:

sudo virsh net-define --file default.xml

I get this:

error: failed to connect to the hypervisor
error: Operation not supported: Cannot use direct socket mode if no URI is set

Solution

  • I had the exact same problem while trying to run the FCOS on my Fedora laptop for the very first time.

    Solution for Fedora-based system:

    sudo dnf install libvirt

    I would assume Ubuntu would accept:

    sudo apt-get install libvirt

    Regards!