On Wednesday, 6 October 2021 15:14:10 CEST [email protected] wrote: > ovirt.domain.com: Software Version:4.3.4.3-1.el7 > ovirt2.domain.com: Software Version:4.3.10.4-1.el7 > > I test everything on the server ovirt2.domains.com. > > No i try #1: > GET > https://ovirt2.domain.com/ovirt-engine/api/disks/f770c0d1-dd0d-40a8-a69a-a6 > 3d8db5c2cc > Result #2: > <disk href="/ovirt-engine/api/disks/1e0a39c1-08d5-41b1-8e4e-5174597c59c9" > id="1e0a39c1-08d5-41b1-8e4e-5174597c59c9"> .... > <propagate_errors>false</propagate_errors> > <provisioned_size>107374182400</provisioned_size> > <qcow_version>qcow2_v3</qcow_version> > <shareable>false</shareable> > <sparse>true</sparse> > <status>ok</status> > <storage_type>image</storage_type> > <total_size>20090257408</total_size> > ... > </disk> > > No i try #2: > PUT > https://ovirt2.domain.com/ovirt-engine/api/disks/f770c0d1-dd0d-40a8-a69a-a6 > 3d8db5c2cc <disk> > <provisioned_size>30737418240</provisioned_size> > </disk> > > Result #2: > "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" > standalone=\"yes\"?>\n<fault>\n <detail>Updating disk attributes other > than QCOW version is permitted only for disk-attachments, which reside > under VMs.</detail>\n <reason>Operation Failed</reason>\n</fault>\n", > "msg": "Status code was 409 and not [200]: HTTP Error 409: Conflict", > "url": > "https://ovirt2.domain.com/ovirt-engine/api/disks/f770c0d1-dd0d-40a8-a69a-a > 63d8db5c2cc", > So version 4.3 really has no way to adjust the disk size via the API? The > only way is to upgrade to 4.4?
It does, but the disk has t be attached to a VM (Vm don't has to be running).
Example XML (extend.xml):
<disk_attachment>
<disk>
<provisioned_size>2147483648</provisioned_size>
</disk>
</disk_attachment>
Example command using this XML:
curl --insecure -X PUT --header "Accept: application/xml" --header
"Content-Type: application/xml" --user "admin@internal:ovirt" -T extend.xml
https://engine-test.local/ovirt-engine/api/vms/651faf06-9dd3-41a5-94f6-ef126a933923/diskattachments/69f96ba5-df7b-46d7-93c1-93e4adf0404b
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Users mailing list -- [email protected] To unsubscribe send an email to [email protected] Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/[email protected]/message/L6YNAFWU5AQEGCQQ76BFY2OXBNEOJEDX/

