From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <t.lamprecht@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 588FC6C02E
 for <pve-devel@lists.proxmox.com>; Thu, 28 Jan 2021 16:55:37 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 439372F80F
 for <pve-devel@lists.proxmox.com>; Thu, 28 Jan 2021 16:55:07 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [212.186.127.180])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 9C3E72F803
 for <pve-devel@lists.proxmox.com>; Thu, 28 Jan 2021 16:55:05 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5E14046144;
 Thu, 28 Jan 2021 16:55:05 +0100 (CET)
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 Gandalf Corvotempesta <gandalf.corvotempesta@gmail.com>
References: <CAJH6TXgwKTpAZ_Jp=dGB__G+EGaJ_MxsSpFrV4EPPuHZWx8Hrw@mail.gmail.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Message-ID: <ba6aa8c3-7c55-8abf-b427-57d3b6adaae0@proxmox.com>
Date: Thu, 28 Jan 2021 16:55:04 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101
 Thunderbird/85.0
MIME-Version: 1.0
In-Reply-To: <CAJH6TXgwKTpAZ_Jp=dGB__G+EGaJ_MxsSpFrV4EPPuHZWx8Hrw@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.064 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -0.001 Looks like a legit reply (A)
 RCVD_IN_DNSWL_MED        -2.3 Sender listed at https://www.dnswl.org/,
 medium trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [proxmox.com]
Subject: Re: [pve-devel] Direct migration from XenServer to PVE
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 28 Jan 2021 15:55:37 -0000

Ciao,

On 27.01.21 10:13, Gandalf Corvotempesta wrote:
> Ciao,
> i'm the author of this simple tool: https://github.com/guestisp/xen-to-=
pve
>=20
> it works by exporting a XenServer DomU directly to PVE in one phase,
> there is no need to export, extract, join each chunks and so. Just
> call it and a new image file is made.
>=20
> But there is one issue that i'm unable to resolve: the image should be
> imported with "qm import"
> This lead to loss of time (an additional step is needed) and space
> wasted (the image coming from XenServer should be stored somewhere on
> PVE and then imported).
>=20
> I would like to write directly to the ZFS volume .

Would it be enough if `qm importdisk` would accept stdin as source as lon=
g
as the image size explicitly passed as a paramter?

As that'd seem reasonable and help with other import issues too as one
could just pipe the data over ssh from the source server directly into
importdisk, no intermediate required.


> Can someone tell me how to do that or , even better, make a PR ?
>=20

If above is OK then adding special handling to use stdin for when $source=

equals "-" and adding a new "size" parameter, which is in general optiona=
l
but required for the "-" case.

That change should be limited to editing the CLI definition[0] and the
method doing the actual import[1].

cheers,
Thomas

[0]: https://git.proxmox.com/?p=3Dqemu-server.git;a=3Dblob;f=3DPVE/CLI/qm=
=2Epm;h=3D1aa273f39a373594eea0c1dc866e6b245d97e99e;hb=3DHEAD#l443
[1]: https://git.proxmox.com/?p=3Dqemu-server.git;a=3Dblob;f=3DPVE/QemuSe=
rver/ImportDisk.pm;h=3D51ad52eab43ebad24a104de116dc5eea88587c7a;hb=3DHEAD=