Import VDI on XCP-NG from stdin

189 views Asked by At

I'm trying to export and import a VDI on XCP-NG, using STDIN but it fails.

Sample of export | importing:

xe -s 10.10.10.10 -u root -pw testpw vdi-export format=vhd vdi=3bae25a9-e289-4f9d-8bee-764e890d4480 filename= | xe vdi-import uuid=f4b9de0a-f90d-42b8-8de4-4028c8b66b55 format=vhd filename=/dev/stdin
Error code: VDI_IO_ERROR
Error parameters: Device I/O errors

Tried downloading the file in advance and used cat (for testing purposes), same error:

cat file2.vhd | xe vdi-import uuid=f4b9de0a-f90d-42b8-8de4-4028c8b66b55 format=vhd  filename=/dev/stdin
Error code: VDI_IO_ERROR
Error parameters: Device I/O errors

But when I send a filename, it works fine:

xe vdi-import uuid=f4b9de0a-f90d-42b8-8de4-4028c8b66b55 format=vhd  filename=file.vhd

The problem is that the file is huge, I cannot download it first then pass by parameter, I would like to export and import simultaneously.

Some logs I catch on /var/log/xensource.log

VDI.import D:7b2728ebb130 failed with exception Db_exn.DBCache_NotFound("missing row", "task", "OpaqueRef:4a172d44-7593-4a0f-baa2-cc0b9def3337")
[error||2101786 HTTP 127.0.0.1->:::80|VDI import R:4a172d447593|vhd_tool_wrapper] vhd-tool output: vhd-tool: internal error, uncaught exception:\x0A          End_of_file\x0A          \x0A

Any way to do it?

0

There are 0 answers