From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57697 invoked by alias); 14 Jun 2018 11:16:22 -0000 Mailing-List: contact springfield-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: springfield-owner@sourceware.org Received: (qmail 55561 invoked by uid 89); 14 Jun 2018 11:15:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=accumulated, Springfield, enlightened, appliance X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Date: Mon, 01 Jan 2018 00:00:00 -0000 From: "Richard W.M. Jones" To: springfield@sourceware.org Cc: Steven Whitehouse Subject: Could libguestfs use springfield? Message-ID: <20180614111545.GB14740@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 14 Jun 2018 11:15:46 +0000 (UTC) X-SW-Source: 2018-06/txt/msg00000.txt.bz2 libguestfs provides a C library and large set of tools for manipulating disk images. http://libguestfs.org/ As part of this we provide APIs to open VM disks and do things like enumerate partitions or resize logical volumes. The actual way this works currently is we run the external commands (eg. parted, lvresize) inside a small virtual machine and pass the right command line options or parse the output. In some cases we're also parsing stuff out of kernel /sys/block. We've accumulated a large amount of code to do this (I counted 60619 lines of code in the current version). Here are a few examples so you can see in concrete terms what I'm talking about: https://github.com/libguestfs/libguestfs/blob/afd1c70601c51043684a0245ce2f63d71a9cc07a/daemon/parted.c#L344 https://github.com/libguestfs/libguestfs/blob/afd1c70601c51043684a0245ce2f63d71a9cc07a/daemon/lvm.c#L271 Steven W pointed me to "Project Springfield" and it sort of looks like it's in the same area. Could libguestfs replace the parsing code above with this? What might be problems: We have no python or dbus in the appliance. So anything that depends on those is a non-starter. TBH the project webpage left me more confused than enlightened. There seem to be lots of projects (subprojects?) doing stuff with odd names and no unifying philosophy, and I'm not sure if Project Springfield is a thing or more of an intention. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v