aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorDuncan Mac-Vicar P <dmacvicar@gmail.com>2017-11-27 08:29:46 +0100
committerGitHub <noreply@github.com>2017-11-27 08:29:46 +0100
commitb7894a88a97a5882084d6ccfa5c1496f51dc5ae2 (patch)
tree2af08467c51e8b55af7facc54dab8bcc7a18f326 /website
parentbdbfc7ca1d4251fe5ecad10857ccec65a69afc65 (diff)
parent9f7f0253a320a3fe96c2970fa486064fd7cb3963 (diff)
downloadterraform-provider-libvirt-b7894a88a97a5882084d6ccfa5c1496f51dc5ae2.tar
terraform-provider-libvirt-b7894a88a97a5882084d6ccfa5c1496f51dc5ae2.tar.gz
Merge pull request #242 from dmacvicar/kernel_initrd
Add support for kernel/initrd/cmdline options
Diffstat (limited to 'website')
-rw-r--r--website/docs/r/domain.html.markdown94
1 files changed, 94 insertions, 0 deletions
diff --git a/website/docs/r/domain.html.markdown b/website/docs/r/domain.html.markdown
index b047a6e7..f008501e 100644
--- a/website/docs/r/domain.html.markdown
+++ b/website/docs/r/domain.html.markdown
@@ -59,6 +59,100 @@ The following arguments are supported:
[below](#define-boot-device-order).
* `emulator` - (Optional) The path of the emulator to use
+### Kernel and boot arguments
+
+* `kernel` - (Optional) The path of the kernel to boot
+
+If you are using a qcow2 volume, you can pass the id of the volume (eg. `${libvirt_volume.kernel.id}`)
+as they are local to the hypervisor.
+
+Given that you can define a volume from a remote http file, this means, you can also have remote kernels.
+
+```hcl
+resource "libvirt_volume" "kernel" {
+ source = "http://download.opensuse.org/tumbleweed/repo/oss/boot/x86_64/loader/linux"
+ name = "kernel"
+ pool = "default"
+ format = "raw"
+}
+
+resource "libvirt_domain" "domain-suse" {
+ name = "suse"
+ memory = "1024"
+ vcpu = 1
+
+ kernel = "${libvirt_volume.kernel.id}"
+
+ // ...
+}
+```
+
+* `kernel` - (Optional) The path of the initrd to boot.
+
+You can use it in the same way as the kernel.
+
+* `cmdline` - (Optional) Arguments to the kernel
+
+```hcl
+resource "libvirt_domain" "domain-suse" {
+ name = "suse"
+ memory = "1024"
+ vcpu = 1
+
+ kernel = "${libvirt_volume.kernel.id}"
+
+ cmdline {
+ arg1 = "value1"
+ arg2 = "value2"
+ }
+}
+```
+
+Also note that the `cmd` block is actually a list of maps, so it is possible to
+declare several of them by using either the literal list and map syntax as in
+the following examples:
+
+```hcl
+resource "libvirt_domain" "my_machine" {
+ //...
+
+ cmdline {
+ arg1 = "value1"
+ }
+ cmdline {
+ arg2 = "value2"
+ }
+}
+```
+
+```hcl
+resource "libvirt_domain" "my_machine" {
+ ...
+ cmdline = [
+ {
+ arg1 = "value1"
+ },
+ {
+ arg2 = "value2"
+ }
+ ]
+}
+```
+The kernel supports passing the same option multiple times. If you need this, use separate cmdline blocks.
+
+```hcl
+resource "libvirt_domain" "my_machine" {
+ //...
+
+ cmdline {
+ arg1 = "value1"
+ }
+ cmdline {
+ arg1 = "value2"
+ }
+}
+```
+
### UEFI images
Some extra arguments are also provided for using UEFI images: