From 93e4b414c95f1be1522cd19655259ec9946ddbe2 Mon Sep 17 00:00:00 2001 From: Venkat Nagappan Date: Mon, 26 Jul 2021 08:25:06 +0100 Subject: [PATCH] Modified vagrantfile to include libvirt --- vagrantfiles/ubuntu20/Vagrantfile | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/vagrantfiles/ubuntu20/Vagrantfile b/vagrantfiles/ubuntu20/Vagrantfile index 6e1313d..e7ce293 100644 --- a/vagrantfiles/ubuntu20/Vagrantfile +++ b/vagrantfiles/ubuntu20/Vagrantfile @@ -7,19 +7,33 @@ Vagrant.configure(2) do |config| config.vm.provision "shell", path: "bootstrap.sh" - NodeCount = 1 + NodeCount = 2 (1..NodeCount).each do |i| - config.vm.define "ubuntuvm0#{i}" do |node| - node.vm.box = "bento/ubuntu-20.04" - node.vm.hostname = "ubuntuvm0#{i}.example.com" + + config.vm.define "ubuntuvm#{i}" do |node| + + node.vm.box = "generic/ubuntu2004" + node.vm.box_check_update = false + node.vm.box_version = "3.2.18" + node.vm.hostname = "ubuntuvm#{i}.example.com" + node.vm.network "private_network", ip: "172.16.16.10#{i}" - node.vm.provider "virtualbox" do |v| - v.name = "ubuntuvm0#{i}" - v.memory = 2048 - v.cpus = 2 + + node.vm.provider :virtualbox do |v| + v.name = "ubuntuvm#{i}" + v.memory = 1024 + v.cpus = 1 end + + node.vm.provider :libvirt do |v| + v.nested = true + v.memory = 1024 + v.cpus = 1 + end + end + end end