feat(lawndale-vm): options for machine type and firmware
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
@@ -40,6 +40,9 @@ resource "libvirt_domain" "this" {
|
|||||||
|
|
||||||
cloudinit = libvirt_cloudinit_disk.this.id
|
cloudinit = libvirt_cloudinit_disk.this.id
|
||||||
|
|
||||||
|
firmware = var.uefi ? "/usr/share/edk2-ovmf/OVMF_CODE.fd" : null
|
||||||
|
machine = var.machine
|
||||||
|
|
||||||
network_interface {
|
network_interface {
|
||||||
bridge = module.ipam.lawndale_interface
|
bridge = module.ipam.lawndale_interface
|
||||||
mac = macaddress.this.address
|
mac = macaddress.this.address
|
||||||
@@ -95,6 +98,7 @@ locals {
|
|||||||
match = {
|
match = {
|
||||||
macaddress = macaddress.this.address
|
macaddress = macaddress.this.address
|
||||||
}
|
}
|
||||||
|
"set-name" = "eth"
|
||||||
addresses = [
|
addresses = [
|
||||||
"${module.ipam.ip_address}/${module.ipam.cidr}"
|
"${module.ipam.ip_address}/${module.ipam.cidr}"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
output "macaddress" {
|
||||||
|
value = macaddress.this.address
|
||||||
|
}
|
||||||
|
|
||||||
|
output "_pool" {
|
||||||
|
value = var.create_root_storage_pool ? libvirt_pool.this : null
|
||||||
|
}
|
||||||
|
|
||||||
|
output "_disk" {
|
||||||
|
value = libvirt_volume.this
|
||||||
|
}
|
||||||
|
|
||||||
|
output "_domain" {
|
||||||
|
value = libvirt_domain.this
|
||||||
|
}
|
||||||
|
|
||||||
|
output "ipam" {
|
||||||
|
value = module.ipam
|
||||||
|
}
|
||||||
@@ -19,6 +19,18 @@ variable "vcpu" {
|
|||||||
default = 1
|
default = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "uefi" {
|
||||||
|
type = bool
|
||||||
|
description = "Whether or not to create an UEFI domain"
|
||||||
|
default = false
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "machine" {
|
||||||
|
type = string
|
||||||
|
description = "The machine type - can be i440fx (default) or q35. PCIe support requires Q35 (or better)"
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
variable "memory_mb" {
|
variable "memory_mb" {
|
||||||
type = number
|
type = number
|
||||||
description = "VM memory allocation in megabytes"
|
description = "VM memory allocation in megabytes"
|
||||||
|
|||||||
Reference in New Issue
Block a user