bk node and refactor
This commit is contained in:
@@ -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'>
|
||||
|
||||
Reference in New Issue
Block a user