feat(repo): IaaS baseline

This commit is contained in:
il
2026-06-17 13:17:24 +09:00
parent a6bba986a5
commit 927b5b4934
250 changed files with 1074 additions and 28750 deletions
@@ -0,0 +1,8 @@
<!-- Storage pool define -->
<!-- data-pool.xml -->
<pool type='dir'>
<name>data-pool</name>
<target>
<path>/var/lib/libvirt/data</path>
</target>
</pool>
@@ -1,8 +1,8 @@
<!-- Storage pool define -->
<!-- images.xml -->
<!-- images-pool.xml -->
<pool type='dir'>
<name>images-pool</name>
<target>
<path>/var/lib/libvirt/images</path>
</target>
</target>
</pool>
@@ -4,5 +4,5 @@
<name>seeds-pool</name>
<target>
<path>/var/lib/libvirt/seeds</path>
</target>
</target>
</pool>
@@ -4,6 +4,7 @@
<vcpu placement='static'>{{ hostvars[target_vm]['vm']['cpu'] }}</vcpu>
<cputune>
<shares>{{ hostvars[target_vm]['vm']['shares'] }}</shares>
{{ hostvars[target_vm]['vm']['cpu_pin'] | indent(8) }}
</cputune>
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-10.0'>hvm</type>
@@ -12,7 +13,7 @@
<feature enabled='yes' name='secure-boot'/>
</firmware>
<loader readonly='yes' secure='yes' type='pflash' format='raw'>/usr/share/OVMF/OVMF_CODE_4M.ms.fd</loader>
<nvram template='/usr/share/OVMF/OVMF_VARS_4M.ms.fd' templateFormat='raw' format='raw'>/var/lib/libvirt/qemu/nvram/{{ hostvars[target_vm]['vm']['name'] }}_VARS.fd</nvram>
<nvram template='/usr/share/OVMF/OVMF_VARS_4M.ms.fd' templateFormat='raw' format='raw'>{{ node['libvirt_path'] }}/qemu/nvram/{{ hostvars[target_vm]['vm']['name'] }}_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
@@ -26,12 +27,12 @@
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' discard='unmap' />
<source file='/var/lib/libvirt/images/{{ hostvars[target_vm]['vm']['name'] }}.qcow2' />
<source file='{{ node['libvirt_path'] }}/images/{{ hostvars[target_vm]['vm']['name'] }}.qcow2' />
<target dev='vda' bus='virtio' />
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='none' />
<source file='/var/lib/libvirt/seeds/{{ hostvars[target_vm]['vm']['name'] }}_seed.iso' />
<source file='{{ node['libvirt_path'] }}/seeds/{{ hostvars[target_vm]['vm']['name'] }}_seed.iso' />
<target dev='sdb' bus='sata' />
<readonly/>
</disk>
@@ -61,7 +62,7 @@
<address type='virtio-serial' controller='0' bus='0' port='1' />
</channel>
{% if target_vm == 'app' %}
{% for device in hostvars[target_vm]['vm']['pass_through'].values() %}
{% set device=hostvars['vmm']['hardware']['igpu'] %}
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
@@ -69,8 +70,12 @@
</source>
<address type='pci' domain='{{ device['domain'] }}' bus='{{ device['bus'] }}' slot='{{ device['slot'] }}' function='{{ device['function'] }}'/>
</hostdev>
{% endfor %}
{% endif %}
<disk type='file' device='disk'>
<driver name='qemu' type='raw' />
<source file='{{ hardware['btrfs']['mount_point'] }}/{{ target_vm }}.raw' />
<target dev='vdb' bus='virtio' />
</disk>
{% endif %}
<tpm model='tpm-crb'>
<backend type='emulator' version='2.0'/>
</tpm>