Skip to content

Commit

Permalink
feat: VirtualBox Guest Additions v7.0.14 (#2)
Browse files Browse the repository at this point in the history
Previously we only had the ISO inside the VM, but we didn't actually install the tools.
  • Loading branch information
urish authored Mar 9, 2024
2 parents 5605ebe + 4c27fb5 commit 2f5ee95
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions image.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ source "virtualbox-iso" "tinytapeout_analog_vm" {
http_directory = "./http"
iso_checksum = "a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd"
iso_url = "https://old-releases.ubuntu.com/releases/22.04/ubuntu-22.04.3-live-server-amd64.iso"
guest_additions_url = "https://download.virtualbox.org/virtualbox/7.0.14/VBoxGuestAdditions_7.0.14.iso"
guest_additions_sha256 = "0efbcb9bf4722cb19292ae00eba29587432e918d3b1f70905deb70f7cf78e8ce"
memory = 8192
gfx_controller = "vmsvga"
gfx_vram_size = 128
Expand Down Expand Up @@ -76,6 +78,7 @@ build {
XSCHEM_VERSION = "3.4.4"
}
scripts = [
"scripts/install_virtualbox_tools.sh",
"scripts/install_klayout.sh",
"scripts/install_magic.sh",
"scripts/install_netgen.sh",
Expand Down
20 changes: 20 additions & 0 deletions scripts/install_virtualbox_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/sh

set -e

ISO_PATH="/home/ttuser/VBoxGuestAdditions.iso"
MOUNT_PATH="/tmp/vbox_tools_iso"

sudo apt-get install -y build-essential gcc make perl dkms

mkdir -p "$MOUNT_PATH"

sudo mount -t iso9660 -o loop "$ISO_PATH" "$MOUNT_PATH"
# Exit code 2 is ok, it means the installer was successful
sudo "$MOUNT_PATH/VBoxLinuxAdditions.run" --nox11 || [ $? -eq 2 ]
sudo umount $MOUNT_PATH

# Verify that the installation was successful
sudo /usr/sbin/VBoxService --version

rm -rf $MOUNT_PATH $ISO_PATH

0 comments on commit 2f5ee95

Please sign in to comment.