[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Vagrant and virt-manager on Fedora 23

Here are some instructions for setting up vagrant and virt-manager on Fedora 23 (and presumably higher).

* Install packages.

    dnf install vagrant vagrant-libvirt virt-manager

* Start libvirtd.

    systemctl enable libvirtd.service
    systemctl start libvirtd.service

* Allow local administrators (members of the wheel group) to manage VMs by creating a polkit rule.

    [ -f /etc/polkit-1/rules.d/80-libvirt-manage.rules ] || cat > /etc/polkit-1/rules.d/80-libvirt-manage.rules <<'END'
    polkit.addRule(function(action, subject) {
        if (action.id == \"org.libvirt.unix.manage\" && subject.isInGroup(\"wheel\")) {

            return polkit.Result.YES;

* Test virsh as your regular user (that is a member of the wheel group - check with "id -Gn | grep wheel"):

    $ virsh -c qemu:///system pool-list

    Name                 State      Autostart


    default              active     yes

* Try starting a VM:

    $ mkdir vagrant-test
    $ cd vagrant-test
    $ vagrant init centos/7 && vagrant up --provider libvirt && vagrant ssh
    A `Vagrantfile` has been placed in this directory. You are now
    ready to `vagrant up` your first virtual environment! Please read
    the comments in the Vagrantfile as well as documentation on
    `vagrantup.com` for more information on using Vagrant.
    Bringing machine 'default' up with 'libvirt' provider...
    [...lots of output...]
    [vagrant@localhost ~]$ cat /etc/redhat-release
    CentOS Linux release 7.1.1503 (Core) 
    [vagrant@localhost ~]$ logout
    Connection to closed.
    $ vagrant destroy

To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.