i'm using OLVM 4.3.10 oVirt and i'm trying to import a VM from the Export Storage
Domain with the REST API.
curl command is:
curl \
-X POST \
--header "Version:4" \
--header "Accept:application/xml" \
--header "Content-type:application/xml" \
--user $_OLVM_USERNAME:$_OLVM_PASSWORD \
--data '
<action>
<storage_domain>
<name>'$DST_SD'</name>
</storage_domain>
<cluster>
<name>'$CLUSTER'</name>
</cluster>
<clone>true</clone>
<vm>
<name>'$VM_NAME'</name>
</vm>
</action>
'
https://$_OLVM_HOSTNAME/ovirt-engine/api/storagedomains/$SRC_SD_ID/vms/$SD_VM_ID/import
Response is:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
When i use the same syntax to just get a list of importable VMs there is no error and the
Response is a xml entity.
Any idea?
Show replies by date
i've put all in a rest client to check the syntax and how the request looks, now i got
this response:
access_denied: Cannot authenticate user 'admin@intern': No valid profile found in
credentials..
:(
yeah, you're absolutly right. now it works, how it schould do :)