Skip to content

storage pool in /var/lib/libvirt/images without sudo #29

@brianjmurrell

Description

@brianjmurrell

I have my system configured so that I can use virsh with qemu:///system by way of:

LIBVIRT_DEFAULT_URI=qemu:///system

So generally speaking I can do all virsh commands including start VMs without having to use sudo or authenticate otherwise.

I have a storage pool called images and virsh list --all shows me the volumes in that storage pool. vagrant up is unable to create it's VMs there however giving me an error about not being able to find the storage pool.

I resolved that by doing a chmod 777 /var/lib/libvirt/images/ (purely as a test -- I don't want to leave it that way) but do question the validity of having to do this.

Why is it that I can start VMs using virsh from that storage pool but Vagrant cannot manage to use it?

Is this because Vagrant-libvirt wants to create the disks-as-snapshots in /var/lib/libvirt/images and uses the permission as the calling user to do so? If so, doesn't libvirt provide a better method than just manipulating directory permissions so that the calling user can write into that directory directly?

Vagrant seems to use sudo for other things, why not this?

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