Add a common tool for creating libvirt vms w/o puppet
[bottlenecks.git] / utils / dev_env / deploy / libvirt_template.xml
diff --git a/utils/dev_env/deploy/libvirt_template.xml b/utils/dev_env/deploy/libvirt_template.xml
new file mode 100644 (file)
index 0000000..eddeff0
--- /dev/null
@@ -0,0 +1,41 @@
+<domain type='kvm'>
+  <name>REPLACE_NAME</name>
+  <memory unit='MiB'>REPLACE_MEM</memory>
+  <currentMemory unit='MiB'>REPLACE_MEM</currentMemory>
+  <vcpu placement='static'>REPLACE_CPU</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/><apic/><pae/>
+  </features>
+  <clock offset="utc"/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  <devices>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='REPLACE_IMAGE'/>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <disk type='file' device='cdrom'>
+      <driver name='qemu'/>
+      <source file='REPLACE_SEED_IMAGE'/>
+      <target dev='hdb'/>
+      <readonly/>
+    </disk>
+    <interface type='network'>
+      <source network='default'/>
+      <mac address='REPLACE_MAC_ADDR'/>
+      <model type='virtio'/>
+    </interface>
+    <input type='tablet' bus='usb'/>
+    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
+    <console type='pty'/>
+    <video>
+      <model type='cirrus'/>
+    </video>
+  </devices>
+</domain>