From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZDHM-0003Ya-QB for qemu-devel@nongnu.org; Tue, 11 Mar 2008 18:49:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZDHH-0003XT-Vk for qemu-devel@nongnu.org; Tue, 11 Mar 2008 18:49:04 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZDHH-0003XF-Ra for qemu-devel@nongnu.org; Tue, 11 Mar 2008 18:48:59 -0400 Received: from relay2-v.mail.gandi.net ([217.70.178.76]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JZDHH-0002Cd-ES for qemu-devel@nongnu.org; Tue, 11 Mar 2008 18:48:59 -0400 Received: from localhost (mfilter5-v.gandi.net [217.70.178.39]) by relay2-v.mail.gandi.net (Postfix) with ESMTP id C27A3135E0 for ; Tue, 11 Mar 2008 23:48:58 +0100 (CET) Received: from relay2-v.mail.gandi.net ([217.70.178.76]) by localhost (mfilter5-v.gandi.net [217.70.178.39]) (amavisd-new, port 10024) with ESMTP id GOjY9mVEl4E3 for ; Tue, 11 Mar 2008 23:35:55 +0100 (CET) Received: from [86.73.70.43] (unknown [86.73.70.43]) by relay2-v.mail.gandi.net (Postfix) with ESMTP id D43B9135D9 for ; Tue, 11 Mar 2008 23:48:45 +0100 (CET) Message-ID: <47D70C23.9030808@bellard.org> Date: Tue, 11 Mar 2008 23:48:03 +0100 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Modify qemu-img to mount locally disk image using NBD (v2) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Laurent Vivier wrote: > This patch is a new version of qemu-img using NBD device to mount Qemu > disk image. > > To not hang on UP system, it needs following patch: > http://article.gmane.org/gmane.linux.drivers.nbd.general/42 > If you want to use loop to see partitions, you need this patch: > http://article.gmane.org/gmane.linux.kernel/651269 > otherwise use kpartx (see kpartx package of your distro). > > This patch implements in qemu-img the client and the server of the nbd protocol. > Moreover, to avoid to specify a port to use, it creates a UNIX socket instead of > a INET socket. > > It adds two actions to qemu-img: > - bind, to bind a disk image to a NBD device, > > qemu-img bind [-d] [-f fmt] device filename > > ('-d' to daemonize) > > - unbind, to unbind it. > > qemu-img unbind device > [...] Perhaps adding a new specialized tool would be better as there is no direct relation with qemu-img. Fabrice.