summaryrefslogtreecommitdiffstats
path: root/opensteak/tools/templates_foreman/kvm-config
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2015-06-26 12:26:09 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-06-26 12:26:09 +0000
commit387c117c80740a055ff9470516b89c24c09ce6a5 (patch)
treebcb177a7620faedb1e5c2ea6a61c0cceae598cdf /opensteak/tools/templates_foreman/kvm-config
parent5e05469acdb8da55f8862677c7cd68d257c68501 (diff)
parentbff17c3ed2f7ba8a665a1ff2a0ba89ace4d3a5c9 (diff)
Merge "Add create vm script and foreman config"
Diffstat (limited to 'opensteak/tools/templates_foreman/kvm-config')
-rw-r--r--opensteak/tools/templates_foreman/kvm-config65
1 files changed, 65 insertions, 0 deletions
diff --git a/opensteak/tools/templates_foreman/kvm-config b/opensteak/tools/templates_foreman/kvm-config
new file mode 100644
index 0000000..7e3d65d
--- /dev/null
+++ b/opensteak/tools/templates_foreman/kvm-config
@@ -0,0 +1,65 @@
+<domain type='kvm'>
+ <name>${name}</name>
+ <memory>${ram}</memory>
+ <currentMemory>${ram}</currentMemory>
+ <vcpu>${cpu}</vcpu>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ <!-- uncomment to enable PXE boot
+ <boot dev='network'/>
+ -->
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <acpi/><apic/><pae/>
+ </features>
+ <clock offset="utc"/>
+ <on_poweroff>preserve</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='/var/lib/libvirt/images/${name}'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='/var/lib/libvirt/images/${name}-configuration.iso'/>
+ <target dev='vdb' bus='virtio'/>
+ </disk>
+ <input type='mouse' bus='ps2'/>
+ <!-- uncomment to allow virsh console
+ <console type='pty'/>
+ <!- - end -->
+ <!-- uncomment to allow console to a log file -->
+ <serial type='file'>
+ <source path='/var/log/libvirt/qemu/${name}-serial.log'/>
+ <target port='0'/>
+ <alias name='serial0'/>
+ </serial>
+ <serial type='pty'>
+ <source path='/dev/pts/1'/>
+ <target port='1'/>
+ <alias name='serial1'/>
+ </serial>
+ <console type='file'>
+ <source path='/var/log/libvirt/qemu/${name}-serial.log'/>
+ <target type='serial' port='0'/>
+ <alias name='serial0'/>
+ </console>
+ <!-- end -->
+ <graphics type='spice' port='-1' autoport='no'/>
+ <video>
+ <model type='qxl' ram='65536' vram='65536' heads='1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </video>
+ <memballoon model='virtio'/>
+ <interface type='bridge'>
+ <source bridge='${bridge}'/>
+ ${bridgeconfig}
+ <model type='virtio'/>
+ </interface>
+ </devices>
+</domain>