Skip to content

libvirt-sock missing on Fedora 36 #39

@ayates83

Description

@ayates83

I kept getting the error about:

TASK [Use TF project to ensure pool and network are defined] **************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Terraform plan could not be created\r\nSTDOUT: \r\n\r\nSTDERR: \nError: failed to dial libvirt: dial unix /var/run/libvirt/libvirt-sock: connect: no such file or directory\n\n with provider["registry.terraform.io/dmacvicar/libvirt"],\n on libvirt-resources.tf line 10, in provider "libvirt":\n 10: provider "libvirt" {\n\n"}

PLAY RECAP ****************************************************************************************************************************************************************************
localhost : ok=15 changed=0 unreachable=0 failed=1 skipped=12 rescued=0 ignored=0

This is fixed by editing /etc/libvirt/libvirtd.conf and adding:

unix_sock_group = "libvirt"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"

and then restarting libvirtd:

sudo systemctl restart libvirtd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions