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
|
||||
|
||||
firmware = var.uefi ? "/usr/share/edk2-ovmf/OVMF_CODE.fd" : null
|
||||
machine = var.machine
|
||||
|
||||
network_interface {
|
||||
bridge = module.ipam.lawndale_interface
|
||||
mac = macaddress.this.address
|
||||
@@ -95,6 +98,7 @@ locals {
|
||||
match = {
|
||||
macaddress = macaddress.this.address
|
||||
}
|
||||
"set-name" = "eth"
|
||||
addresses = [
|
||||
"${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
|
||||
}
|
||||
|
||||
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" {
|
||||
type = number
|
||||
description = "VM memory allocation in megabytes"
|
||||
|
||||
Reference in New Issue
Block a user