No description, website, or topics provided.
Perl
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Makefile.PL
README
make-kvm-xml.pl
make-kvm-xml.tt
server01.xml
server02.xml
test.csv

README

make xml file for kvm with reference to this csv file.

edit test.csv file.
--------------------------------------------------------------------------------

The meaning of each item

1 = hostname,
2 = cpu,
3 = memory,
4 = kvm image file,
5 = netwrok interface
6 = mac address

[example]

web-server01,2,8,/var/lib/libvirt/images/web-server01.img,eth2,00:00:00:00:00:00

hostname = web-server01
cpu = 2
memory = 8192
kvm image file = /var/lib/libvirt/images/web-server01.img
network interface = eth2
mac address = 00:00:00:00:00:00

---

o server01.xml
=============================================================
<domain type='kvm'>
  <name>server01</name>
  <uuid>02EA52C4-A000-11E1-AE64-3E07BFE11232</uuid>
  <memory>2097152</memory>
  <currentMemory>2097152</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'>
    <timer name='pit' tickpolicy='delay'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='./make-kvm-xml-server01.img'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <interface type='bridge'>
      <mac address='00:00:00:00:00:00'/>
      <source bridge='eth2'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
  </devices>
</domain>
=============================================================

--------------------------------------------------------------------------------

enjoy make zabbix host xml

$ perl make-kvm-xml.pl

:)