Giter VIP home page Giter VIP logo

vagrant-vms's Introduction

Vagrant configuration to create libvirt-based VMs for flat fish front/back builds

Configuration file

A configuration file called config.yml is present in the repository's root folder. It contains the following configuration variables:

  • ubuntu_contry: the contry code of the ubuntu archive mirror

Vagrant, Chef and libvirt install

# Install the vagrant-libvirt plugin https://github.com/pradels/vagrant-libvirt
sudo apt install qemu-kvm
# You might have to remove the liblzma shipped with vagrant and replace by
# symlinks to the system's
# 
# Don't do it unless you start seeing symbol resolution problems
#
# Reference: https://github.com/mitchellh/vagrant/issues/5787
sudo -i
cd /opt/vagrant/embedded
rm -f lib/liblzma.*
ln -s /lib/x86_64-linux-gnu/liblzma.so.* lib/
# Install the libvirt-bin package.
sudo apt install libvirt-bin
# Make sure the local user is a member of the libvirtd group by running
# 'id'. If it is not, run "adduser YOURUSER libvirtd" and log out / log in to
# apply to the current login shell

# Install the vagrant plugins
vagrant plugin install vagrant-libvirt

# At this point, vagrant should be operational

Libvirt images
==============
I'm pushing some libvirt images to the Hashicorp atlas. Check out
https://atlas.hashicorp.com/sylvainjoyeux.

Converting a virtualbox image into a libvirt image
==================================================

If you need other libvirt images, you can use the vagrant mutate plugin to
convert them

# Download the ubuntu/trusty64 box and convert it to a libvirt box
# Needed for mutate
sudo apt install qemu-utils
vagrant box add ubuntu/trusty64
vagrant plugin install vagrant-mutate
vagrant mutate ubuntu/trusty64 libvirt

# You're good to go

Additional Vagrant plugins

Those are a list of vagrant plugins that are not required, but are generally useful

  • cachier caches the various packages, allowing to re-provision a VM that much faster
  • sahara provides a sandbox (save current state and allows to rollback to it)

Starting one of the VMs Troubleshooting

Error while creating domain: Error saving the server: Call to virDomainDefineXML
failed: unknown OS type hvm

Assuming you installed qemu-kvm as instructed above, restart libvirt-bin with systemctl restart libvirt-bin.service

vagrant-vms's People

Contributors

doudou avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.