Skip to content

Instantly share code, notes, and snippets.

@nnzv
Last active January 1, 2023 17:01
Show Gist options
  • Save nnzv/2b080ca03467387995e3c5810e7e1bf4 to your computer and use it in GitHub Desktop.
Save nnzv/2b080ca03467387995e3c5810e7e1bf4 to your computer and use it in GitHub Desktop.
Vagrant libvirt example
all: env ssh
init:
-vagrant validate
clear:
vagrant destroy --force
env: init
vagrant up
ssh:
vagrant ssh default
Vagrant.configure("2") do |c|
c.vagrant.plugins = {
"vagrant-libvirt" => { "version" => "0.10.0"},
}
c.vm.box = "centos/7"
c.vm.synced_folder ".", "/vagrant",
type: "nfs", mount_options: ["vers=3,tcp"]
c.ssh.extra_args = ["-t", "cd /vagrant; bash --login"]
c.vm.provider :libvirt do |l|
l.driver = "kvm"
l.memory = 3500
l.cpus = 8
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment