correct virt customize command
use vars for vhd sizes
This commit is contained in:
parent
595c2f177e
commit
f648ce0448
@ -19,3 +19,6 @@ vm_gateway: "192.168.199.254"
|
||||
vm_domain: "balsillie.net"
|
||||
vm_machine_type: "pc-q35-7.1"
|
||||
vm_machine_arch: "x86_64"
|
||||
containers_vhd_size: "64G"
|
||||
data_nvme_vhd_size: "64G"
|
||||
data_hdd_vhd_size: "3T"
|
@ -37,8 +37,8 @@
|
||||
when: root_vhd_created is changed
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
virt-customize -a {{ root_vhd_pool_dir }}/{{ vm_name }}_vda.qcow2 \
|
||||
--format qcow2 \
|
||||
virt-customize --format qcow2 \
|
||||
-a {{ root_vhd_pool_dir }}/{{ vm_name }}_vda.qcow2 \
|
||||
--hostname {{ vm_name }}.{{ vm_domain }} \
|
||||
--copy-in /tmp/eno1_{{ vm_name }}.network:/etc/systemd/network/10-eno1.network \
|
||||
--append-line "/etc/hosts:127.0.1.1 {{ vm_name }}.{{ vm_domain }} {{ vm_name }}"
|
||||
@ -55,19 +55,19 @@
|
||||
- name: create container storage vhd
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
qemu-img create -f qcow2 {{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2 64G
|
||||
qemu-img create -f qcow2 {{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2 {{ containers_vhd_size }}
|
||||
creates: "{{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2"
|
||||
|
||||
- name: create nvme data storage vhd
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
qemu-img create -f qcow2 {{ data_nvme_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2 64G
|
||||
qemu-img create -f qcow2 {{ data_nvme_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2 {{ data_nvme_vhd_size }}
|
||||
creates: "{{ data_nvme_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2"
|
||||
|
||||
- name: create hdd data storage vhd
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
qemu-img create -f qcow2 {{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2 4T
|
||||
qemu-img create -f qcow2 {{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2 {{ data_hdd_vhd_size }}
|
||||
creates: "{{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2"
|
||||
|
||||
- name: define vm
|
||||
|
Loading…
Reference in New Issue
Block a user