From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Le6kW-0003Qr-C4 for qemu-devel@nongnu.org; Mon, 02 Mar 2009 06:55:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Le6kU-0003Of-IU for qemu-devel@nongnu.org; Mon, 02 Mar 2009 06:55:55 -0500 Received: from [199.232.76.173] (port=33386 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Le6kU-0003Nv-A2 for qemu-devel@nongnu.org; Mon, 02 Mar 2009 06:55:54 -0500 Received: from mx1.redhat.com ([66.187.233.31]:47203) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Le6kT-0002QX-ON for qemu-devel@nongnu.org; Mon, 02 Mar 2009 06:55:53 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n22Bto6A022606 for ; Mon, 2 Mar 2009 06:55:50 -0500 Received: from file.fab.redhat.com (file.fab.redhat.com [10.33.63.6]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n22BtqTx021513 for ; Mon, 2 Mar 2009 06:55:52 -0500 Received: from file.fab.redhat.com (localhost.localdomain [127.0.0.1]) by file.fab.redhat.com (8.13.1/8.13.1) with ESMTP id n22BtoNb015421 for ; Mon, 2 Mar 2009 11:55:50 GMT Received: (from berrange@localhost) by file.fab.redhat.com (8.13.1/8.13.1/Submit) id n22Bto1X015417 for qemu-devel@nongnu.org; Mon, 2 Mar 2009 11:55:50 GMT Date: Mon, 2 Mar 2009 11:55:50 +0000 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] Citrix VHD implementation Message-ID: <20090302115550.GF15108@redhat.com> References: <49ACE6E7-4C5B-4AC5-A8FD-29D2201DE9D1@schmidp.com> <49ABC5E5.3070107@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49ABC5E5.3070107@eu.citrix.com> Reply-To: "Daniel P. Berrange" , 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 On Mon, Mar 02, 2009 at 11:41:25AM +0000, Stefano Stabellini wrote: > 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? There is no blktap unless you have Xen userspace and the Xen kernel installed. Having a native vhd QEMU driver would avoid the need to install Xen just to use VHD format images under non-Xen QEMU/KVM. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|