0

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
Chris G.
  • 23,930
  • 48
  • 177
  • 302

2 Answers2

3

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!

c4rt0
  • 48
  • 6
  • In my case libvirt was already installed but the daemon was not started. Make sure libvirt is properly installed using this solution and make sure it is started using `sudo systemctl enable --now libvirtd` ... as i aws following this procedure https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm – Louis Loudog Trottier Jul 29 '23 at 22:14
3

I encountered this message and fixed it by adding uri_default = "qemu:///session" to /etc/libvirt/libvirt.conf

Of course the solution will be different if you're using a different hypervisor other than qemu.

anonymous
  • 31
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Albert Logic Einstein Aug 23 '22 at 14:50