You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-14
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
Terraform module for KVM/Libvirt Virtual Machine. This module will create a KVM Virtual Machine(s), configure it using Cloud Init and test the ssh connection. This module is using [dmacvicar/libvirt](https://github.com/dmacvicar/terraform-provider-libvirt) Terraform provider.
8
8
9
-
## What this module provides
9
+
## What it provides
10
10
11
11
- creates one or more VMs
12
12
- one NIC per domain, connected to the network using the **bridge interface**
@@ -17,15 +17,16 @@ Terraform module for KVM/Libvirt Virtual Machine. This module will create a KVM
17
17
18
18
## Tested on
19
19
20
-
- Ubuntu 20.04 TLS
20
+
- Ubuntu 20.04 TLS Cloud Image
21
+
- Ubuntu 22.04 TLS Cloud Image
21
22
22
23
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|[template_cloudinit_config.init_config](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/cloudinit_config)| data source |
43
-
|[template_file.init_config](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/file)| data source |
44
-
|[template_file.network_config](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/file)| data source |
45
43
46
44
## Inputs
47
45
48
46
| Name | Description | Type | Default | Required |
| <aname="input_additional_disk_ids"></a> [additional\_disk\_ids](#input\_additional\_disk\_ids)| List of volume ids |`list`|`[]`| no |
48
+
| <aname="input_additional_disk_ids"></a> [additional\_disk\_ids](#input\_additional\_disk\_ids)| List of volume ids |`list(string)`|`[]`| no |
51
49
| <aname="input_autostart"></a> [autostart](#input\_autostart)| Autostart the domain |`bool`|`true`| no |
52
-
| <aname="input_base_pool_name"></a> [base\_pool\_name](#input\_base\_pool\_name)| Name of base OS image |`any`|`null`| no |
53
-
| <aname="input_base_volume_name"></a> [base\_volume\_name](#input\_base\_volume\_name)| Name of base OS image |`any`|`null`| no |
50
+
| <aname="input_base_pool_name"></a> [base\_pool\_name](#input\_base\_pool\_name)| Name of base OS image |`string`|`null`| no |
51
+
| <aname="input_base_volume_name"></a> [base\_volume\_name](#input\_base\_volume\_name)| Name of base OS image |`string`|`null`| no |
54
52
| <aname="input_bridge"></a> [bridge](#input\_bridge)| Bridge interface |`string`|`"virbr0"`| no |
55
53
| <aname="input_cpu_mode"></a> [cpu\_mode](#input\_cpu\_mode)| CPU mode |`string`|`"host-passthrough"`| no |
56
54
| <aname="input_dhcp"></a> [dhcp](#input\_dhcp)| Use DHCP or Static IP settings |`bool`|`false`| no |
57
-
| <aname="input_hostname"></a> [hostname](#input\_hostname)| VM hostname or FQDN |`string`|`"server"`| no |
58
55
| <aname="input_index_start"></a> [index\_start](#input\_index\_start)| From where the indexig start |`number`|`1`| no |
59
56
| <aname="input_ip_address"></a> [ip\_address](#input\_ip\_address)| List of IP addresses |`list(string)`| <pre>[<br> "192.168.123.101"<br>]</pre> | no |
60
57
| <aname="input_ip_gateway"></a> [ip\_gateway](#input\_ip\_gateway)| IP addresses of a gateway |`string`|`"192.168.123.1"`| no |
61
58
| <aname="input_ip_nameserver"></a> [ip\_nameserver](#input\_ip\_nameserver)| IP addresses of a nameserver |`string`|`"192.168.123.1"`| no |
62
59
| <aname="input_local_admin"></a> [local\_admin](#input\_local\_admin)| Admin user without ssh access |`string`|`""`| no |
63
60
| <aname="input_local_admin_passwd"></a> [local\_admin\_passwd](#input\_local\_admin\_passwd)| Local admin user password |`string`|`"password_example"`| no |
64
61
| <aname="input_memory"></a> [memory](#input\_memory)| RAM in MB |`string`|`"1024"`| no |
65
-
| <aname="input_os_img_url"></a> [os\_img\_url](#input\_os\_img\_url)| URL to the OS image |`string`|`"https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"`| no |
62
+
| <aname="input_os_img_url"></a> [os\_img\_url](#input\_os\_img\_url)| URL to the OS image |`string`|`"https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"`| no |
66
63
| <aname="input_pool"></a> [pool](#input\_pool)| Storage pool name |`string`|`"default"`| no |
67
64
| <aname="input_runcmd"></a> [runcmd](#input\_runcmd)| Extra commands to be run with cloud init |`list(string)`| <pre>[<br> "[ systemctl, daemon-reload ]",<br> "[ systemctl, enable, qemu-guest-agent ]",<br> "[ systemctl, start, qemu-guest-agent ]",<br> "[ systemctl, restart, systemd-networkd ]"<br>]</pre> | no |
| <aname="input_ssh_admin"></a> [ssh\_admin](#input\_ssh\_admin)| Admin user with ssh access |`string`|`"ssh-admin"`| no |
70
67
| <aname="input_ssh_keys"></a> [ssh\_keys](#input\_ssh\_keys)| List of public ssh keys |`list(string)`|`[]`| no |
71
-
| <aname="input_ssh_private_key"></a> [ssh\_private\_key](#input\_ssh\_private\_key)| Private key for SSH connection test |`any`|`null`| no |
68
+
| <aname="input_ssh_private_key"></a> [ssh\_private\_key](#input\_ssh\_private\_key)| Private key for SSH connection test |`string`|`null`| no |
72
69
| <aname="input_system_volume"></a> [system\_volume](#input\_system\_volume)| System Volume size (GB) |`number`|`10`| no |
73
70
| <aname="input_time_zone"></a> [time\_zone](#input\_time\_zone)| Time Zone |`string`|`"UTC"`| no |
74
71
| <aname="input_vcpu"></a> [vcpu](#input\_vcpu)| Number of vCPUs |`number`|`1`| no |
75
72
| <aname="input_vm_count"></a> [vm\_count](#input\_vm\_count)| Number of VMs |`number`|`1`| no |
76
73
| <aname="input_vm_hostname_prefix"></a> [vm\_hostname\_prefix](#input\_vm\_hostname\_prefix)| VM hostname prefix |`string`|`"vm"`| no |
77
-
| <aname="input_xml_override"></a> [xml\_override](#input\_xml\_override)| With these variables you can: Enable hugepages; Set USB controllers; Attach USB devices |`any`| <pre>{<br> "hugepages": false,<br> "usb_controllers": [<br> {<br> "model": "piix3-uhci"<br> }<br> ],<br> "usb_devices": []<br>}</pre> | no |
74
+
| <aname="input_xml_override"></a> [xml\_override](#input\_xml\_override)| With these variables you can: Enable hugepages; Set USB controllers; Attach USB devices |<pre>object({<br> hugepages = bool<br> usb_controllers = list(object({<br> model = string<br> }))<br> usb_devices = list(object({<br> vendor = string<br> product = string<br> }))<br> })</pre>| <pre>{<br> "hugepages": false,<br> "usb_controllers": [<br> {<br> "model": "piix3-uhci"<br> }<br> ],<br> "usb_devices": []<br>}</pre> | no |
0 commit comments