From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Le6db-0004p0-6B for qemu-devel@nongnu.org; Mon, 02 Mar 2009 06:48:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Le6dZ-0004oi-Tv for qemu-devel@nongnu.org; Mon, 02 Mar 2009 06:48:46 -0500 Received: from [199.232.76.173] (port=34144 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Le6dZ-0004of-O5 for qemu-devel@nongnu.org; Mon, 02 Mar 2009 06:48:45 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:61037) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Le6dY-00014c-Si for qemu-devel@nongnu.org; Mon, 02 Mar 2009 06:48:45 -0500 Message-ID: <49ABC5E5.3070107@eu.citrix.com> Date: Mon, 2 Mar 2009 11:41:25 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] Citrix VHD implementation References: <49ACE6E7-4C5B-4AC5-A8FD-29D2201DE9D1@schmidp.com> In-Reply-To: <49ACE6E7-4C5B-4AC5-A8FD-29D2201DE9D1@schmidp.com> Content-Type: text/plain; charset="UTF-8" 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" Philipp Schmid wrote: > Hi, > > as some of you might know, citrix has open sourced the library they > use to read and write to VHD disk images. > > I'm trying to implementing a block-vhd driver on top of libvhd, but my > C knowledge is very limited as I haven't written any code in C for a > long time. > > What I already have is a git repo with the libvhd code extracted from > the xen-unstable tree with the blocktap2 patches applied. > libvhd also comes with vhd-util, a utility to create and modify vhd > images. > I have only tried to compile it on ubuntu 8.10, so it might not work > on your system. > > The git repo is hosted on github: http://github.com/schmidp/libvhd/tree/master > > Are there any docs about how to implement a block driver for qemu? > As far as I have seen from the qemu code, block_int.h defines the > interface and you register your driver in block.c, but that is all > I've found out so far. > > I will try to implement a synchrones driver first as it seems more > simple... Why don't you just use blktap2 to create a raw device from the vhd file and then open the raw device in qemu?