summaryrefslogtreecommitdiff
path: root/roles/vm/define/templates/libvirt-domain.xml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/vm/define/templates/libvirt-domain.xml.j2')
-rw-r--r--roles/vm/define/templates/libvirt-domain.xml.j28
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/vm/define/templates/libvirt-domain.xml.j2 b/roles/vm/define/templates/libvirt-domain.xml.j2
index af9fbf52..c4c9e52a 100644
--- a/roles/vm/define/templates/libvirt-domain.xml.j2
+++ b/roles/vm/define/templates/libvirt-domain.xml.j2
@@ -1,15 +1,15 @@
<domain type='kvm'>
<name>{{ install_hostname }}</name>
- <memory>{{ hostvars[install_hostname].install_cooked.vm.mem * 1024 }}</memory>
- <currentMemory>{{ hostvars[install_hostname].install_cooked.vm.mem * 1024 }}</currentMemory>
- <vcpu>{{ hostvars[install_hostname].install_cooked.vm.numcpu }}</vcpu>
+ <memory>{{ ((hostvars[install_hostname].install_cooked.vm.memory | human_to_bytes) / 1024) | int }}</memory>
+ <currentMemory>{{ ((hostvars[install_hostname].install_cooked.vm.memory | human_to_bytes) / 1024) | int }}</currentMemory>
+ <vcpu>{{ hostvars[install_hostname].install_cooked.vm.numcpus }}</vcpu>
<os>
<type arch='x86_64' machine='pc-0.12'>hvm</type>
{% if vm_define_installer %}
{% if install_distro == 'debian' or install_distro == 'ubuntu' %}
<kernel>{{ installer_path }}/{{ install_distro }}-{{ install_codename }}/{{ hostvars[install_hostname].install_cooked.arch | default('amd64') }}/linux</kernel>
<initrd>{{ preseed_tmpdir }}/initrd.preseed.gz</initrd>
- <cmdline>console=ttyS0,115200n8</cmdline>
+ <cmdline>console=ttyS0,115200n8 DEBCONF_DEBUG=5</cmdline>
<boot dev='hd'/>
{% elif install_distro == 'openbsd' %}
<boot dev='cdrom'/>