-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
29 lines (22 loc) · 767 Bytes
/
Vagrantfile
File metadata and controls
29 lines (22 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.configure("2") do |config|
NUM_VMS = 3
# Base box image for openSUSE MicroOS
BOX_IMAGE = "https://download.opensuse.org/tumbleweed/appliances/openSUSE-MicroOS.x86_64-ContainerHost-Vagrant.box"
IP_PREFIX = "10.1.57."
# --- Define VMs using a loop ---
(1..NUM_VMS).each do |i|
vm_name = "containerops-#{i}"
ip_address = "#{IP_PREFIX}#{10 + i}"
config.vm.define vm_name do |node|
# Set the box for this specific VM
node.vm.box = "opensuse/MicroOS.x86_64"
node.vm.box_url = BOX_IMAGE
config.vm.synced_folder ".", "/vagrant", disabled: true
node.vm.provider :libvirt do |domain|
domain.memory = 1024
domain.cpus = 2
end
end
end
end