Skip to content

Commit

Permalink
Merge pull request #3 from robcxyz/fix-firmware-path-ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
kubealex committed Jan 6, 2024
2 parents 2ccbc3d + 624d7ec commit c8de873
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module "instance_provisioning" {
instance_libvirt_network = "default"
instance_libvirt_pool = "default"
instance_uefi_enabled = true
instance_firmware = "/usr/share/edk2/ovmf/OVMF_CODE.fd"
instance_network_interfaces = [
{
interface_network_name = "default"
Expand Down
2 changes: 1 addition & 1 deletion modules/terraform-libvirt-instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource "libvirt_domain" "service-vm" {
memory = var.instance_memory*1024
vcpu = var.instance_cpu
machine = var.instance_uefi_enabled ? "q35" : ""
firmware = var.instance_uefi_enabled ? "/usr/share/edk2/ovmf/OVMF_CODE.fd" : ""
firmware = var.instance_uefi_enabled ? var.instance_firmware : ""

boot_device {
dev = [ "hd", "cdrom", "network" ]
Expand Down
7 changes: 7 additions & 0 deletions modules/terraform-libvirt-instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ variable "instance_uefi_enabled" {
description = "Set this to true if OS should be installed via ISO"
}


variable "instance_firmware" {
type = string
default = "/usr/share/edk2/ovmf/OVMF_CODE.fd"
description = "Path to the ovmf firmware on the host machine. Ubuntu=/usr/share/OVMF/OVMF_CODE.fd"
}

variable "instance_network_interfaces" {
type = list(object({
interface_network = string
Expand Down

0 comments on commit c8de873

Please sign in to comment.