Пытаюсь загрузить диск локально с хоста в ovirt и подключить к ВМ, используя модуль:
ovirt.ovirt.ovirt_disk module
часть плейбука:
- name: Upload local disk
ovirt.ovirt.ovirt_disk:
name: test-upload1-sda
vm_name: vm_test1
interface: virtio
size: 20GiB
format: cow
image_path: /mnt/test-upload1-sda.qcow2
storage_domain: nfs-4
auth: "{{ ovirt_auth }}"
но получаю ошибку:
TASK [Upload local disk] *************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: subprocess.CalledProcessError: Command '['qemu-img', 'measure', '-O', 'qcow2', '--output', 'json', '/mnt/test-upload1-sda.qcow2']' returned non-zero exit status 1.
[WARNING]: Module did not set no_log for pass_discard
fatal: [ovirt-engine.example.domain]: FAILED! => {"changed": false, "msg": "Command '['qemu-img', 'measure', '-O', 'qcow2', '--output', 'json', '/mnt/test-upload1-sda.qcow2']' returned non-zero exit status 1."}
что делаю не так?
Пример вывода с -vvv, пытался загрузить как iso, получаю такую же ошибку:
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_ovirt.ovirt.ovirt_disk_payload_1t20xufr/ansible_ovirt.ovirt.ovirt_disk_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_disk.py", line 887, in main
File "/tmp/ansible_ovirt.ovirt.ovirt_disk_payload_1t20xufr/ansible_ovirt.ovirt.ovirt_disk_payload.zip/ansible_collections/ovirt/ovirt/plugins/module_utils/ovirt.py", line 673, in create
self.build_entity(),
File "/tmp/ansible_ovirt.ovirt.ovirt_disk_payload_1t20xufr/ansible_ovirt.ovirt.ovirt_disk_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_disk.py", line 672, in build_entity
File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib64/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['qemu-img', 'measure', '-O', 'qcow2', '--output', 'json', '/mnt/test-upload1-sda.qcow2']' returned non-zero exit status 1.
[WARNING]: Module did not set no_log for pass_discard
fatal: [ovirt-engine.example.domain]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"activate": null,
"auth": {
"ca_file": null,
"compress": true,
"headers": null,
"hostname": null,
"insecure": true,
"kerberos": false,
"password": null,
"timeout": 0,
"token": "<token>",
"url": "https://ovirt-engine.example.domain/ovirt-engine/api",
"username": null
},
"backup": null,
"bootable": true,
"content_type": "iso",
"description": null,
"download_image_path": null,
"fetch_nested": false,
"force": false,
"format": "cow",
"host": null,
"id": null,
"image_provider": null,
"interface": null,
"logical_unit": null,
"max_workers": null,
"name": "myiso-upload",
"nested_attributes": [],
"openstack_volume_type": null,
"pass_discard": null,
"poll_interval": 3,
"profile": null,
"propagate_errors": null,
"quota_id": null,
"scsi_passthrough": null,
"shareable": null,
"size": "20 GiB",
"sparse": null,
"sparsify": null,
"state": "present",
"storage_domain": "nfs-4",
"storage_domains": null,
"timeout": 180,
"upload_image_path": "/mnt/test-upload1-sda.qcow2",
"uses_scsi_reservation": null,
"vm_id": null,
"vm_name": null,
"wait": true,
"wipe_after_delete": null
}
},
"msg": "Command '['qemu-img', 'measure', '-O', 'qcow2', '--output', 'json', '/mnt/test-upload1-sda.qcow2']' returned non-zero exit status 1."
}
Вопрос, как это дебажить, т.е. как последовательно выяснить в чем заключается проблема, при условии, что воспроизводится пример из документации к модулю?