Vagrantfile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # Testing VM:
  4. # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
  5. VAGRANTFILE_API_VERSION = "2"
  6. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  7. config.ssh.forward_x11 = true
  8. # Provider-specific configuration so you can fine-tune various
  9. # backing providers for Vagrant. These expose provider-specific options.
  10. # Example for VirtualBox:
  11. #
  12. config.vm.provider "virtualbox" do |vb|
  13. # Don't boot with headless mode
  14. # vb.gui = true
  15. #
  16. # # Use VBoxManage to customize the VM. For example to change memory:
  17. vb.customize ["modifyvm", :id, "--memory", "3192"]
  18. vb.customize ["modifyvm", :id, "--ioapic", "on"]
  19. vb.customize ["modifyvm", :id, "--cpus", "2"]
  20. # Make some effort to avoid clock skew
  21. vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", "5000"]
  22. vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start"]
  23. vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", "1"]
  24. end
  25. config.vm.network "forwarded_port", guest: 8888, host: 8888
  26. # removing this line causes "A box must be specified." error
  27. # and this is the default box that will be booted if no name is specified
  28. config.vm.box = "ubuntu/focal"
  29. # 20.04 LTS EOL April 2025
  30. config.vm.define "focal", autostart: true do |focal|
  31. focal.vm.box = "ubuntu/focal64"
  32. focal.vm.provision :shell, path: "scripts/initvagrant.sh"
  33. focal.vm.provider "virtualbox" do |vb|
  34. vb.name = "CustomBuild (focal)"
  35. end
  36. focal.vm.boot_timeout = 1200
  37. end
  38. end