From 178c57a608795024fc61e5700622cede26d349dd Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 26 Apr 2024 12:51:05 +1000 Subject: [PATCH] Vagrant: add support for Ubuntu Noble, 24.04 --- Tools/vagrant/initvagrant.sh | 10 ++++++++-- Vagrantfile | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Tools/vagrant/initvagrant.sh b/Tools/vagrant/initvagrant.sh index acb0f48281..3da7d92442 100755 --- a/Tools/vagrant/initvagrant.sh +++ b/Tools/vagrant/initvagrant.sh @@ -22,9 +22,15 @@ echo USING VAGRANT_USER:$VAGRANT_USER cd /home/$VAGRANT_USER +IS_BENTO=0 +if [ -e /etc/update-motd.d/99-bento ]; then + IS_BENTO=1 +fi -# artful rootfs is 2GB without resize: -sudo resize2fs /dev/sda1 +# artful rootfs is 2GB without resize. Do not resize if using Bento: +if [ ! $IS_BENTO ]; then + sudo resize2fs /dev/sda1 +fi echo "calling pre-reqs script..." sudo -H -u $VAGRANT_USER /vagrant/Tools/environment_install/install-prereqs-ubuntu.sh -y diff --git a/Vagrantfile b/Vagrantfile index 9ab2a986a5..e3344a75a4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -282,4 +282,25 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end mantic.vm.boot_timeout = 1200 end + + # 24.04 end of standard support Jun 2029 + # note the use of "bento" here; Ubuntu stopped providing Vagrant + # images due to Hashicorp adopting the "Business Source License". + config.vm.define "noble", autostart: false do |noble| + noble.vm.box = "bento/ubuntu-24.04" + noble.vm.provision :shell, path: "Tools/vagrant/initvagrant.sh" + noble.vm.provider "virtualbox" do |vb| + vb.name = "ArduPilot (noble)" + end + noble.vm.boot_timeout = 1200 + end + config.vm.define "noble-desktop", autostart: false do |noble| + noble.vm.box = "bento/ubuntu-24.04" + noble.vm.provision :shell, path: "Tools/vagrant/initvagrant-desktop.sh" + noble.vm.provider "virtualbox" do |vb| + vb.name = "ArduPilot (noble-desktop)" + vb.gui = true + end + noble.vm.boot_timeout = 1200 + end end