[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] libguestfs on Ubuntu



So I got a lot further building libguestfs on Ubuntu, up to the point
where I can boot the appliance and run some simple commands.  We need
to push some patches upstream, and there are still some things in
Ubuntu itself which are broken.  This documents how far I've got.

(1) libguestfs from git, Ubuntu 9.10, all updated to the latest
versions.  You will of course also need to read the README file and
install the long list of dependencies, all of which are in the Ubuntu
repositories.

http://git.annexia.org/?p=libguestfs.git;a=summary
http://libguestfs.org/README.txt

(2) I'm going to post patches as follow-ups to this email, of which
most/all will be required.

(3) You will need debirf 0.25.  I installed it from:

http://gb.archive.ubuntu.com/ubuntu/pool/universe/d/debirf/

(4) This is how I'm configuring:

./autogen.sh \
  --with-readline \
  --with-repo=karmic \
  --with-mirror=http://gb.archive.ubuntu.com/ubuntu/ \
  --enable-debug-command

(5) make

(6) 'make check' fails during the Gnulib tests.

(7) After building you can do a quick sanity check:

$ ./fish/guestfish alloc /tmp/test.img 10M : run : list-devices
/dev/sda

If it doesn't work, add the '-v' option and post the full output here.

I was able to run some basic guestfish commands, but I didn't yet test
it extensively.

Rich.

----------------------------------------------------------------------
$ ./fish/guestfish 

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help with commands
      'quit' to quit the shell

><fs> alloc /tmp/test.img
use 'alloc file size' to create an image
><fs> alloc /tmp/test.img 10M
><fs> run
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
><fs> list-devices 
/dev/sda
><fs> help part-disk 
NAME
    part-disk - partition whole disk with a single primary partition

SYNOPSIS
     part-disk device parttype

DESCRIPTION
    This command is simply a combination of "part_init" followed by
    "part_add" to create a single primary partition covering the whole disk.

    "parttype" is the partition table type, usually "mbr" or "gpt", but
    other possible values are described in "part_init".

    This command is dangerous. Without careful use you can easily destroy
    all your data.

><fs> part-disk /dev/sda mbr
><fs> mkfs ext3 /dev/sda1 
><fs> mount /dev/sda1 /
><fs> touch /hello
><fs> umount-all 
><fs> list-partitions 
/dev/sda1
><fs> sync
><fs> 
$ strings /tmp/test.img 
lost+found
hello
lost+found
hello

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]