-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
51 lines (46 loc) · 1.54 KB
/
Vagrantfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
$:.unshift((Pathname.new(__FILE__).dirname).realpath.to_s)
require "lib/config"
require "lib/provision/initialize"
require "lib/provision/reinstall"
require "lib/provision/build_appimage"
case Config::current_vm_provider
when "libvirt"
ENV["VAGRANT_DEFAULT_PROVIDER"] = "libvirt"
when "lxc"
ENV["VAGRANT_DEFAULT_PROVIDER"] = "lxc"
else
raise "Invalid Config::current_vm_provider"
end
Vagrant.configure("2") do |config|
case ENV["VAGRANT_DEFAULT_PROVIDER"]
when "libvirt"
config.vm.box = "generic/ubuntu2004"
when "lxc"
config.vm.box = "isc/lxc-ubuntu-20.04"
end
config.vm.define "vm_for_build_nano_eaw_appimage_#{Config::current_appimage_revision}"
config.ssh.insert_key = false
config.vm.network :forwarded_port, guest: 22, host: 12022
config.vm.synced_folder "./", "/vagrant", type: "rsync", disabled: false, \
accessmode: "squash", owner: "1000"
config.vm.provider :libvirt do |libvirt|
case Config::current_libvirt_driver
when "qemu"
libvirt.driver = "qemu"
when "kvm"
libvirt.driver = "kvm"
else
raise "Invalid Config::current_libvirt_driver"
end
libvirt.cpus = 1
libvirt.memory = 10240
libvirt.machine_type = "pc-q35-4.2"
libvirt.disk_bus = 'sata'
libvirt.storage_pool_name = "default"
libvirt.video_type = "qxl"
libvirt.graphics_type = "spice"
end
config.vm.provider :lxc do |lxc|
lxc.customize 'cgroup.memory.limit_in_bytes', '20480M'
end
end