Skip to content

Commit f2cdf3e

Browse files
committed
parameter for overwrite virtualization type
1 parent 3d12dcf commit f2cdf3e

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

cloudify_libvirt/domain_tasks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def configure(**kwargs):
7575
template_params['memory_size'] = memory_size * 2
7676
if not template_params.get("instance_uuid"):
7777
template_params["instance_uuid"] = str(uuid.uuid4())
78+
if not template_params.get("domain_type"):
79+
template_params["domain_type"] = "qemu"
7880

7981
params = {"ctx": ctx}
8082
params.update(template_params)

cloudify_libvirt/templates/domain.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" xmlns="" type="qemu">
1+
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" xmlns="" type="{{ domain_type }}">
22
<resource>
33
<partition>/machine</partition>
44
</resource>
@@ -61,6 +61,11 @@
6161
<type machine="pc" arch="x86_64">hvm</type>
6262
<boot dev="hd"/>
6363
</os>
64-
<clock offset="utc"/>
64+
<cpu mode="host-model"/>
65+
<clock offset="utc">
66+
<timer name="rtc" tickpolicy="catchup"/>
67+
<timer name="pit" tickpolicy="delay"/>
68+
<timer name="hpet" present="no"/>
69+
</clock>
6570
<name>{{ resource_id }}</name>
6671
</domain>

0 commit comments

Comments
 (0)