bk node and refactor

This commit is contained in:
il
2026-06-23 10:57:10 +09:00
parent 927b5b4934
commit fe146b25c7
131 changed files with 2310 additions and 920 deletions
@@ -0,0 +1,8 @@
<!-- Storage pool define -->
<!-- backup-pool.xml -->
<pool type='dir'>
<name>backup-pool</name>
<target>
<path>/var/lib/libvirt/disk/backup</path>
</target>
</pool>
@@ -3,6 +3,6 @@
<pool type='dir'>
<name>data-pool</name>
<target>
<path>/var/lib/libvirt/data</path>
<path>/var/lib/libvirt/disk/data</path>
</target>
</pool>
@@ -70,10 +70,14 @@
</source>
<address type='pci' domain='{{ device['domain'] }}' bus='{{ device['bus'] }}' slot='{{ device['slot'] }}' function='{{ device['function'] }}'/>
</hostdev>
{% endif %}
{% if hostvars[target_vm]['vm']['data_storage'] is defined %}
{% set pool = hostvars[target_vm]['vm']['data_storage']['pool'] %}
{% set disk = hostvars['vmm']['hardware']['disk'][pool]['fs'] %}
<disk type='file' device='disk'>
<driver name='qemu' type='raw' />
<source file='{{ hardware['btrfs']['mount_point'] }}/{{ target_vm }}.raw' />
<target dev='vdb' bus='virtio' />
<source file='{{ disk['mount_point'] }}/{{ hostvars[target_vm]['vm']['name'] }}.raw' />
<target dev='{{ hostvars[target_vm]['vm']['data_storage']['name'] }}' bus='virtio' />
</disk>
{% endif %}
<tpm model='tpm-crb'>