Oracle Linux Virtualization Manager (OLVM) (MOSC)

MOSC Banner

How to upload local file to Storage Domains using RestAPI

Hi Experts

I want to upload from local file to OLVM storage Domain using RestAPI

my program is below

-----------------------------------------------------------------------------

curl \

-verbose \

--cacert /etc/pki/ovirt-engine/ca.pem \

--user "${user}:${password}" \

--request POST \

--header "Version: 4" \

--header "Content-Type: application/xml" \

--header "Accept: application/xml" \

--data '

<image_transfer>

<disk id="/work/HOPESDEV-disk1.qcow2"/>

<direction>upload</direction>

</image_transfer>

' \

"${url}/storagedomains/38d8471a-3287-43c9-b6b4-87a3cf209b16/disks"

----------------------------------------------------------------------------------

output is

----------------------------------------------------------------------------------

Note: Unnecessary use of -X or --request, POST is already inferred.

*  Trying .......

* TCP_NODELAY set

* Connected to .............................................. port 443 (#0)

* ALPN, offering h2

* ALPN, offering http/1.1

* successfully set certificate verify locations:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center