Files
vms/sources/virtualbox-iso.pkr.hcl
T

40 lines
1.7 KiB
HCL

source "virtualbox-iso" "amd64" {
iso_urls = [ "s3::${var.storage_url}/isos/cache/${var.iso.checksum}.iso?aws_access_key_id=root&aws_access_key_secret=${var.minio_secret}" ]
iso_target_path = "cache/${var.iso.checksum}.iso"
iso_checksum = var.iso.checksum
output_directory = "output/virtualbox/${local.name}"
boot_command = var.boot_command
shutdown_command = var.shutdown_command
boot_wait = var.boot_wait
ssh_timeout = local.ssh.timeout
ssh_username = local.ssh.username
ssh_password = local.ssh.password
ssh_handshake_attempts = local.ssh.handshake_attempts
ssh_private_key_file = "vagrant/insecure_key"
vm_name = "packer-${local.name}"
disk_size = "${local.disk_size}000"
cpus = local.cpus
memory = local.memory
headless = var.headless
firmware = "efi"
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"]
]
http_content = var.http_files
http_directory = var.http_directory
cd_content = var.cd_content
cd_files = var.cd_files
cd_label = var.cd_label
}