Skip to content

Commit 51decbd

Browse files
committed
Allow role to run without Intel Virtualisation Technology (VT)
While this provides better VM performance, it may not be available in certain environments.
1 parent 0e8f309 commit 51decbd

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ should be a dict containing the following items:
2929
supported.
3030
- `bridge` The name of the bridge interface for this network.
3131

32+
`libvirt_host_require_vt`is whether to require that Intel Virtualisation
33+
Technology (VT) is enabled in order to run this role. While this provides
34+
better VM performance, it may not be available in certain environments. The
35+
default value is `true`.
36+
3237
Dependencies
3338
------------
3439

defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ libvirt_host_pools: []
1717
# supported.
1818
# bridge: The name of the bridge interface for this network.
1919
libvirt_host_networks: []
20+
21+
# Whether to require that Intel Virtualisation Technology (VT) is enabled in
22+
# order to run this role. While this provides better VM performance, it may not
23+
# be available in certain environments.
24+
libvirt_host_require_vt: true

tasks/validate.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,20 @@
55
failed_when: False
66
register: result
77

8+
- name: Notify if Virtualization Technology (VT) is disabled
9+
debug:
10+
msg: >
11+
Virtualization Technology (VT) is currently disabled. Please enable VT
12+
before running this role again.
13+
when:
14+
- not libvirt_host_require_vt | bool
15+
- result.rc != 0
16+
817
- name: Fail if Virtualization Technology (VT) is disabled
918
fail:
1019
msg: >
1120
Virtualization Technology (VT) is currently disabled. Please enable VT
1221
before running this role again.
13-
when: result.rc != 0
22+
when:
23+
- libvirt_host_require_vt | bool
24+
- result.rc != 0

0 commit comments

Comments
 (0)