From 3aef715e851cccecdca18914616a2569f61445f1 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 9 Jan 2024 22:18:34 -0600 Subject: [PATCH] Fix opensuse on virtualbox --- distros/opensuse/15.5/amd64.pkrvars.hcl | 2 ++ sources/inputs.pkr.hcl | 5 +++++ sources/virtualbox-iso.pkr.hcl | 6 ++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/distros/opensuse/15.5/amd64.pkrvars.hcl b/distros/opensuse/15.5/amd64.pkrvars.hcl index 0ee1fab..8b80ad3 100644 --- a/distros/opensuse/15.5/amd64.pkrvars.hcl +++ b/distros/opensuse/15.5/amd64.pkrvars.hcl @@ -7,7 +7,9 @@ iso = { boot_command = [ "e", "", + "", " autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/autoinst.xml textmode=1", "x" ] http_directory = "distros/opensuse/15.5/http/" +vbox_os_type = "OpenSUSE_Leap_64" diff --git a/sources/inputs.pkr.hcl b/sources/inputs.pkr.hcl index 68300c4..711ff8e 100644 --- a/sources/inputs.pkr.hcl +++ b/sources/inputs.pkr.hcl @@ -104,6 +104,11 @@ variable "efi_dir" { default = env("EFI_DIR") } +variable "vbox_os_type" { + type = string + default = "Linux_64" +} + locals { name = "${var.distro}-${var.version}" description = templatefile("../README.box.md", { diff --git a/sources/virtualbox-iso.pkr.hcl b/sources/virtualbox-iso.pkr.hcl index eefa28c..efee8c1 100644 --- a/sources/virtualbox-iso.pkr.hcl +++ b/sources/virtualbox-iso.pkr.hcl @@ -19,13 +19,15 @@ source "virtualbox-iso" "amd64" { memory = local.memory headless = var.headless firmware = "efi" - guest_os_type = "Linux_64" + guest_os_type = var.vbox_os_type guest_additions_url = "http://download.virtualbox.org/virtualbox/7.0.10/VBoxGuestAdditions_7.0.10.iso" guest_additions_sha256 = "bbabd89b8fff38a257bab039a278f0c4dc4426eff6e4238c1db01edb7284186a" + nic_type = "virtio" + gfx_vram_size = 128 vboxmanage = [ ["modifyvm", "{{ .Name }}", "--uart1", "0x3F8", "4"], #["modifyvm", "{{ .Name }}", "--uartmode1", "file", "output/vritualbox/serial-${var.arch}-${var.distro}-${var.version}"], - ["modifyvm", "{{ .Name }}", "--nat-localhostreachable1", "on"], + ["modifyvm", "{{ .Name }}", "--nat-localhostreachable1", "on"] ] http_content = var.http_files