From 8367c0506c19ab7900f3540cd0e293f96472c179 Mon Sep 17 00:00:00 2001 From: Sam Batschelet Date: Wed, 6 Sep 2017 07:30:19 -0400 Subject: domain: Improve documentation and add examples for BootDevice. --- examples/boot/libvirt.tf | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 examples/boot/libvirt.tf (limited to 'examples') diff --git a/examples/boot/libvirt.tf b/examples/boot/libvirt.tf new file mode 100644 index 00000000..048b3a35 --- /dev/null +++ b/examples/boot/libvirt.tf @@ -0,0 +1,33 @@ +provider "libvirt" { + uri = "qemu:///system" +} + +// blank 10GB image for net install. +resource "libvirt_volume" "debian9-qcow2" { + name = "debian9-qcow2" + pool = "default" + format = "qcow2" + size = 10000000000 +} + +// set boot order hd, network +resource "libvirt_domain" "domain-debian9-qcow2" { + name = "debian9" + memory = "1024" + vcpu = 1 + + network_interface { + bridge = "br0" + mac = "52:54:00:b2:2f:86" + } + boot_devices { + dev = [ "hd", "network"] + } + disk { + volume_id = "${libvirt_volume.debian9-qcow2.id}" + } + graphics { + type = "vnc" + listen_type = "address" + } +} -- cgit v1.2.3