summaryrefslogtreecommitdiff
path: root/docs/providers/libvirt
diff options
context:
space:
mode:
authorAlvaro Saurin <alvaro.saurin@gmail.com>2016-07-05 18:12:26 +0200
committerAlvaro <alvaro.saurin@gmail.com>2016-10-10 17:40:24 +0200
commit44a504bcc42e16a6f7d8589fe23f602581838d8a (patch)
tree5847e20d31293ec05da2641b51e891aa1f992f6e /docs/providers/libvirt
parent47f938971bb94d24751664eb1f9bf807e27557fa (diff)
downloadterraform-provider-libvirt-44a504bcc42e16a6f7d8589fe23f602581838d8a.tar
terraform-provider-libvirt-44a504bcc42e16a6f7d8589fe23f602581838d8a.tar.gz
Implement firmware/nvram for domains, so we can use UEFI images
Minor fixes
Diffstat (limited to 'docs/providers/libvirt')
-rw-r--r--docs/providers/libvirt/r/domain.html.markdown36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/providers/libvirt/r/domain.html.markdown b/docs/providers/libvirt/r/domain.html.markdown
index c06490e8..d5fb93a2 100644
--- a/docs/providers/libvirt/r/domain.html.markdown
+++ b/docs/providers/libvirt/r/domain.html.markdown
@@ -41,6 +41,42 @@ The following arguments are supported:
cloud-init won't cause the domain to be recreated, however the change will
have effect on the next reboot.
+Some extra arguments are also provided for using UEFI images:
+
+* `firmware` - (Optional) The UEFI rom images for exercising UEFI secure boot in a qemu
+environment. Users should usually specify one of the standard _Open Virtual Machine
+Firmware_ (_OVMF_) images available for their distributions. The file will be opened
+read-only.
+* `nvram` - (Optional) the _nvram_ variables file corresponding to the firmware. When provided,
+this file must be writable and specific to this domain, as it will be updated when running
+the domain. However, `libvirt` can manage this automatically (and this is the recommended solution)
+if a mapping for the firmware to a _variables file_ exists in `/etc/libvirt/qemu.conf:nvram`.
+In that case, `libvirt` will copy that variables file into a file specific for this domain.
+
+So you should typically use the firmware as this,
+
+```
+
+resource "libvirt_domain" "my_machine" {
+ name = "my_machine"
+ firmware = "/usr/share/qemu/ovmf-x86_64-code.bin"
+ memory = "2048"
+
+ disk {
+ volume_id = "${libvirt_volume.volume.id}"
+ }
+ ...
+}
+```
+
+and `/etc/libvirt/qemu.conf` should contain:
+
+```
+nvram = [
+ "/usr/share/qemu/ovmf-x86_64-code.bin:/usr/share/qemu/ovmf-x86_64-vars.bin"
+]
+```
+
The `disk` block supports:
* `volume_id` - (Required) The volume id to use for this disk.