Hyperv Debian + UEFI
This commit is contained in:
@@ -68,6 +68,20 @@ build {
|
||||
compression_level = 9
|
||||
output = "output/{{ .Provider }}/${local.name}.box"
|
||||
vagrantfile_template = "vagrant/${var.arch}.rb"
|
||||
only = ["qemu.amd64"]
|
||||
include = [
|
||||
"${var.efi_dir}/OVMF_CODE.fd",
|
||||
"${var.efi_dir}/OVMF_VARS.fd",
|
||||
"output/libvirt/${local.name}/efivars.fd"
|
||||
]
|
||||
}
|
||||
|
||||
post-processor "vagrant" {
|
||||
keep_input_artifact = true
|
||||
compression_level = 9
|
||||
output = "output/{{ .Provider }}/${local.name}.box"
|
||||
vagrantfile_template = "vagrant/${var.arch}.rb"
|
||||
except = ["qemu.amd64"]
|
||||
}
|
||||
|
||||
post-processor "vagrant-cloud" {
|
||||
|
||||
@@ -11,7 +11,7 @@ source "hyperv-iso" "amd64" {
|
||||
ssh_password = local.ssh.password
|
||||
ssh_handshake_attempts = local.ssh.handshake_attempts
|
||||
ssh_private_key_file = local.ssh.private_key_file
|
||||
ssh_host = "10.42.2.254"
|
||||
#ssh_host = "10.42.2.254"
|
||||
|
||||
vm_name = "packer-${local.name}"
|
||||
disk_size = "${local.disk_size}000"
|
||||
@@ -19,7 +19,8 @@ source "hyperv-iso" "amd64" {
|
||||
memory = local.memory
|
||||
headless = var.headless
|
||||
switch_name = "packer-amd64"
|
||||
mac_address = "0000deadbeef"
|
||||
#mac_address = "0000deadbeef"
|
||||
generation = 2
|
||||
|
||||
http_content = var.http_files
|
||||
http_directory = var.http_directory
|
||||
|
||||
@@ -99,6 +99,11 @@ variable "memory" {
|
||||
default = 8192
|
||||
}
|
||||
|
||||
variable "efi_dir" {
|
||||
type = string
|
||||
default = env("EFI_DIR")
|
||||
}
|
||||
|
||||
locals {
|
||||
name = "${var.distro}-${var.version}"
|
||||
description = templatefile("../README.box.md", {
|
||||
|
||||
@@ -25,6 +25,9 @@ source "qemu" "amd64" {
|
||||
disk_cache = "writeback"
|
||||
format = "qcow2"
|
||||
cpu_model = var.cpu_model
|
||||
efi_boot = true
|
||||
efi_firmware_code = "${var.efi_dir}OVMF_CODE.fd"
|
||||
efi_firmware_vars = "${var.efi_dir}OVMF_VARS.fd"
|
||||
|
||||
qemuargs = [
|
||||
#["-chardev", "stdio,id=char0,logfile=serial-output-qemu-${var.arch}-${var.distro}-${var.version},signal=off"],
|
||||
|
||||
@@ -18,6 +18,7 @@ source "virtualbox-iso" "amd64" {
|
||||
cpus = local.cpus
|
||||
memory = local.memory
|
||||
headless = var.headless
|
||||
firmware = "efi"
|
||||
guest_os_type = "Linux_64"
|
||||
guest_additions_url = "http://download.virtualbox.org/virtualbox/7.0.10/VBoxGuestAdditions_7.0.10.iso"
|
||||
guest_additions_sha256 = "bbabd89b8fff38a257bab039a278f0c4dc4426eff6e4238c1db01edb7284186a"
|
||||
|
||||
Reference in New Issue
Block a user