refine disks
This commit is contained in:
parent
ba5672b72a
commit
03700ba0fb
@ -41,19 +41,25 @@
|
|||||||
--password ladmin:password:{{ hostvars[vm_name]['ansible_become_pass'] }} \
|
--password ladmin:password:{{ hostvars[vm_name]['ansible_become_pass'] }} \
|
||||||
--root-password password:{{ hostvars[vm_name]['ansible_root_pass'] }} \
|
--root-password password:{{ hostvars[vm_name]['ansible_root_pass'] }} \
|
||||||
--password-crypto sha512 \
|
--password-crypto sha512 \
|
||||||
--ssh-inject "ladmin:string:{{ }}"
|
--ssh-inject "ladmin:string:{{ hostvars[vm_name]['ssh_public_key_data'] }}"
|
||||||
|
|
||||||
- name: create container storage vhd
|
- name: create container storage vhd
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: |
|
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 64G
|
||||||
creates: "{{ root_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2"
|
creates: "{{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2"
|
||||||
|
|
||||||
# - name: create data storage vhd
|
- name: create nvme data storage vhd
|
||||||
# ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
# cmd: |
|
cmd: |
|
||||||
# qemu-img create -f qcow2 {{ data_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2 4T
|
qemu-img create -f qcow2 {{ data_nvme_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2 64G
|
||||||
# creates: "{{ data_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2"
|
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
|
||||||
|
creates: "{{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2"
|
||||||
|
|
||||||
- name: list vms
|
- name: list vms
|
||||||
community.libvirt.virt:
|
community.libvirt.virt:
|
||||||
|
@ -51,6 +51,16 @@
|
|||||||
<source file='{{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2'/>
|
<source file='{{ containers_vhd_pool_dir }}/{{ vm_name }}_vdb.qcow2'/>
|
||||||
<target dev='vdb' bus='virtio'/>
|
<target dev='vdb' bus='virtio'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
<disk type='file' device='disk'>
|
||||||
|
<driver name='qemu' type='qcow2'/>
|
||||||
|
<source file='{{ data_nvme_vhd_pool_dir }}/{{ vm_name }}_vdc.qcow2'/>
|
||||||
|
<target dev='vdc' bus='virtio'/>
|
||||||
|
</disk>
|
||||||
|
<disk type='file' device='disk'>
|
||||||
|
<driver name='qemu' type='qcow2'/>
|
||||||
|
<source file='{{ data_hdd_vhd_pool_dir }}/{{ vm_name }}_vdd.qcow2'/>
|
||||||
|
<target dev='vdd' bus='virtio'/>
|
||||||
|
</disk>
|
||||||
<controller type='usb' index='0' model='qemu-xhci' ports='15'/>
|
<controller type='usb' index='0' model='qemu-xhci' ports='15'/>
|
||||||
<controller type='sata' index='0'/>
|
<controller type='sata' index='0'/>
|
||||||
<controller type='virtio-serial' index='0'/>
|
<controller type='virtio-serial' index='0'/>
|
||||||
|
Loading…
Reference in New Issue
Block a user