Hi David,

It seems that you're trying to create a RAW SPARSE disk.

According to [1], the RAW Sparse disks' configuration is supported for NFS storage domains (not for block domains like iSCSI or FCP).
Can you please verify the target storage domain's type on your script?

[1] https://www.ovirt.org/documentation/admin-guide/chap-Virtual_Machine_Disks/#understanding-virtual-disks

Regards,
Shani Leviim

On Wed, Aug 29, 2018 at 10:40 AM, David David <dd432690@gmail.com> wrote:
hi all

ovirt engine 4.2.5.2-1.el7

ovirt node:
KVM Version: 2.9.0 - 16.el7_4.14.1
LIBVIRT Version: libvirt-3.2.0-14.el7_4.9
VDSM Version: vdsm-4.20.27.1-1.el7.centos

Can't restore vm by following this instruction https://ovirt.org/develop/release-management/features/storage/backup-restore-disk-snapshots/
error message:

# python upload_disk_snapshots.py
Creating disk: 414d6613-5cfe-493c-ae6c-aa29caa32983
Traceback (most recent call last):
  File "upload_disk_snapshots.py", line 305, in <module>
    disk = create_disk(base_volume, disk_id, sd_name, disks_service)
  File "upload_disk_snapshots.py", line 186, in create_disk
    name=sd_name
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/services.py", line 6715, in add
    return self._internal_add(disk, headers, query, wait)
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 232, in _internal_add
    return future.wait() if wait else future
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 55, in wait
    return self._code(response)
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 229, in callback
    self._check_fault(response)
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 132, in _check_fault
    self._raise_error(response, body)
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 118, in _raise_error
    raise error
ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot add Virtual Disk. Disk configuration (RAW Sparse) is incompatible with the storage domain type.]". HTTP response code is 400.

# tree 414d6613-5cfe-493c-ae6c-aa29caa32983/
414d6613-5cfe-493c-ae6c-aa29caa32983/
├── 3610d5fd-6f55-46d9-a226-c06eee8e21e6
└── f77207b2-6e5b-4464-bd6f-5ae6d776435d

414d6613-5cfe-493c-ae6c-aa29caa32983 - disk id
3610d5fd-6f55-46d9-a226-c06eee8e21e6 - base image file
f77207b2-6e5b-4464-bd6f-5ae6d776435d - snapshot1 file

# qemu-img info 414d6613-5cfe-493c-ae6c-aa29caa32983/3610d5fd-6f55-46d9-a226-c06eee8e21e6
image: 414d6613-5cfe-493c-ae6c-aa29caa32983/3610d5fd-6f55-46d9-a226-c06eee8e21e6
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 22G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

# qemu-img info 414d6613-5cfe-493c-ae6c-aa29caa32983/f77207b2-6e5b-4464-bd6f-5ae6d776435d
image: 414d6613-5cfe-493c-ae6c-aa29caa32983/f77207b2-6e5b-4464-bd6f-5ae6d776435d
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 1.0G
cluster_size: 65536
backing file: 3610d5fd-6f55-46d9-a226-c06eee8e21e6 (actual path: 414d6613-5cfe-493c-ae6c-aa29caa32983/3610d5fd-6f55-46d9-a226-c06eee8e21e6)
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

upload_disk_snapshots.py:
==========================
if __name__ == "__main__":

    # Set storage domain name
    sd_name = 'data_sas3'

    # Set OVF file path
    ovf_file_path = 'f4fdaf18-b944-4d22-879b-e235145a93f6.ovf'

    # Disk to upload
    disk_path = '414d6613-5cfe-493c-ae6c-aa29caa32983'
    disk_id = os.path.basename(disk_path)
==========================




_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/EATGJIKM3ZHUVKXYA2ZRDNLBDDSEM4XG/