Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vagrant.configure(2) do |config|

  config.vm.box = "centos/7"

  config.vm.provider "libvirt" do |libvirt, override|
    libvirt.cpus = 2
    libvirt.memory = 1024
    libvirt.driver = 'kvm'
    libvirt.storage :file, :size => '10G'
  end

$script = <<SCRIPT
yum install -y docker atomic
systemctl start lvm2-lvmetad.service
echo DEVS="/dev/vdb" > /etc/sysconfig/docker-storage-setup
echo VG="docker" >> /etc/sysconfig/docker-storage-setup
docker-storage-setup
systemctl enable docker
systemctl start docker
SCRIPT

  config.vm.provision "shell", inline: $script

end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment