File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ Role Variables
16
16
VM console logs, if a VM-specific log file path is not given. Default is
17
17
"/var/log/libvirt/qemu/".
18
18
19
+ - ` libvirt_vm_default_uuid_deterministic ` : Whether UUID should be calculated by
20
+ hashing the VM name. If not, the UUID is randomly generated by libvirt when
21
+ the VM is defined. Default is False.
22
+
19
23
- ` libvirt_vm_image_cache_path ` : The directory in which to cache downloaded
20
24
images. Default is "/tmp/".
21
25
@@ -64,6 +68,12 @@ Role Variables
64
68
65
69
- ` name ` : the name to assign to the VM.
66
70
71
+ - ` uuid ` : the UUID to manually assign to the VM. If specified, neither
72
+ ` uuid_deterministic ` nor ` libvirt_vm_default_uuid_deterministic ` are used.
73
+
74
+ - ` uuid_deterministic ` : overrides default set in
75
+ ` libvirt_vm_default_uuid_deterministic `
76
+
67
77
- ` memory_mb ` : the memory to assign to the VM, in megabytes.
68
78
69
79
- ` vcpus ` : the number of VCPU cores to assign to the VM.
Original file line number Diff line number Diff line change 1
1
<domain type =' {{ libvirt_vm_engine }}' >
2
2
<name >{{ vm.name }}</name >
3
+ {% if vm .uuid is defined %}
4
+ <uuid >{{ vm.uuid }}</uuid >
5
+ {% elif libvirt_vm_default_uuid_deterministic is sameas true or (vm .uuid_deterministic is defined and vm .uuid_deterministic is sameas true %}
6
+ <uuid >{{ vm.name | to_uuid }}</uuid >
7
+ {% endif %}
3
8
<memory >{{ vm.memory_mb | int * 1024 }}</memory >
4
9
<vcpu >{{ vm.vcpus }}</vcpu >
5
10
{% if vm .clock_offset |default ( libvirt_vm_clock_offset ) %}
You can’t perform that action at this time.
0 commit comments