Attach exiting disk to VM

10 views
Skip to first unread message

Pietro Pesce (Mistak3)

unread,
May 9, 2023, 8:37:20 AM5/9/23
to Ansible Project
Hello

im trying to attach exiting disk (raw) to a vm:

---

# Add fiber chanel disk
#- name: Create disk
#  ovirt.ovirt.ovirt_disk:
#    auth: "{{ ovirt_auth }}"
#    name: "{{ item.0 }}"
#    host: "{{host}}"
#    shareable: True
#    interface: virtio_scsi
#    vm_name: "{{hostname}}"
#    scsi_passthrough: disabled
#    logical_unit:
#        id: "{{ item.1 }}"
#        storage_type: fcp
#  loop: "{{ disk_name | zip(lun) | list }}"

# Add disk second node
- name: Create disk
  ovirt.ovirt.ovirt_disk:
    auth: "{{ ovirt_auth }}"
    vm_name: "{{hostname2}}"
    name: "{{ item.0 }}"
    host: "{{host}}"
    interface: virtio_scsi
    logical_unit:
        id: "{{ item.1 }}"
        storage_type: fcp
  loop: "{{ disk_name | zip(lun) | list }}"

the commented task work, but i want add the disk to second vm but not work.

any suggest?

regards
Reply all
Reply to author
Forward
0 new messages