[ovirt-users] Disk image upload via CLI?

Matthias Leopold matthias.leopold at meduniwien.ac.at
Tue Sep 12 14:42:45 UTC 2017


Thanks, i tried this script and it _almost_ worked ;-)

i uploaded two images i created with
qemu-img create -f qcow2 -o preallocation=full
and
qemu-img create -f qcow2 -o preallocation=falloc

for initial_size and provisioned_size i took the value reported by 
"qemu-img info" in "virtual size" (same as "disk size" in this case)

the upload goes to 100% and then fails with

200 OK Completed 100%
Traceback (most recent call last):
   File "./upload_disk.py", line 157, in <module>
     headers=upload_headers,
   File "/usr/lib64/python2.7/httplib.py", line 1017, in request
     self._send_request(method, url, body, headers)
   File "/usr/lib64/python2.7/httplib.py", line 1051, in _send_request
     self.endheaders(body)
   File "/usr/lib64/python2.7/httplib.py", line 1013, in endheaders
     self._send_output(message_body)
   File "/usr/lib64/python2.7/httplib.py", line 864, in _send_output
     self.send(msg)
   File "/usr/lib64/python2.7/httplib.py", line 840, in send
     self.sock.sendall(data)
   File "/usr/lib64/python2.7/ssl.py", line 746, in sendall
     v = self.send(data[count:])
   File "/usr/lib64/python2.7/ssl.py", line 712, in send
     v = self._sslobj.write(data)
socket.error: [Errno 104] Connection reset by peer

in web GUI the disk stays in Status: "Transferring via API"
it can only be removed when manually unlocking it (unlock_entity.sh)

engine.log tells nothing interesting

i attached the last lines of ovirt-imageio-proxy/image-proxy.log and 
ovirt-imageio-daemon/daemon.log (from the executing node)

the HTTP status 403 in ovirt-imageio-daemon/daemon.log doesn't look too 
nice to me

can you explain what happens?

ovirt engine is 4.1.5
ovirt node is 4.1.3 (is that a problem?)

thx
matthias



Am 2017-09-12 um 13:15 schrieb Fred Rolland:
> Hi,
> 
> You can check this example:
> https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_disk.py
> 
> Regards,
> Fred
> 
> On Tue, Sep 12, 2017 at 11:49 AM, Matthias Leopold 
> <matthias.leopold at meduniwien.ac.at 
> <mailto:matthias.leopold at meduniwien.ac.at>> wrote:
> 
>     Hi,
> 
>     is there a way to upload disk images (not OVF files, not ISO files)
>     to oVirt storage domains via CLI? I need to upload a 800GB file and
>     this is not really comfortable via browser. I looked at ovirt-shell
>     and
>     https://www.ovirt.org/develop/release-management/features/storage/image-upload/
>     <https://www.ovirt.org/develop/release-management/features/storage/image-upload/>,
>     but i didn't find an option in either of them.
> 
>     thx
>     matthias
> 
>     _______________________________________________
>     Users mailing list
>     Users at ovirt.org <mailto:Users at ovirt.org>
>     http://lists.ovirt.org/mailman/listinfo/users
>     <http://lists.ovirt.org/mailman/listinfo/users>
> 
> 

-- 
Matthias Leopold
IT Systems & Communications
Medizinische Universität Wien
Spitalgasse 23 / BT 88 /Ebene 00
A-1090 Wien
Tel: +43 1 40160-21241
Fax: +43 1 40160-921200
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageio-daemon.log
Type: text/x-log
Size: 3800 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170912/57f5d9f7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image-proxy.log
Type: text/x-log
Size: 4735 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170912/57f5d9f7/attachment-0001.bin>


More information about the Users mailing list