libguestfs on Ubuntu
by Richard W.M. Jones
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
14 years, 10 months
[FOR REVIEW ONLY] ESX work in progress
by Matthew Booth
The following patches are where I'm currently at with ESX support. I can now
import a domain from ESX along with its storage. Note that I'm not yet doing any
conversion. In fact, I've never even tested past the import stage (I just had an
exit in there).
The meat is really in the 4th patch. The rename of MetadataReader->Connection
was because the Connection is now really providing the whole guest, rather than
just its metadata.
I intend to add more transfer methods once ESX conversion is working. A copy
method for LibVirtXML is required at least.
_storage_iterate in Sys::VirtV2V::Connection does interesting things with the
domain's storage devices. I'd especially appreciate a close look there.
Matt
14 years, 11 months
[PATCH 0/2] hivex shell
by Richard W.M. Jones
Currently 'hivexget' is a very clumsy command line tool which only
lets you display a single registry key in a hive file, for example:
$ hivexget SOFTWARE '\Microsoft\Windows\TabletPC\TabSetup\'
"TabletSetup"=dword:00000000"
This is inflexible and got really annoying as I was trying to explore
these hive files in preparation for adding write support to hivex.
The first patch implements a simple interactive shell which allows you
to 'cd' around a hive and list out values and subkeys. For example:
$ ./hivex/hivexsh SOFTWARE
Welcome to hivexsh, the hivex interactive shell for examining
Windows Registry binary hive files.
Type: 'help' for help summary
'quit' to quit the shell
SOFTWARE\> ls
ATI Technologies
Classes
Clients
Intel
Microsoft
ODBC
Policies
RegisteredApplications
Sonic
Wow6432Node
SOFTWARE\> cd \Microsoft\Windows\TabletPC\TabSetup
SOFTWARE\Microsoft\Windows\TabletPC\TabSetup> ls
SOFTWARE\Microsoft\Windows\TabletPC\TabSetup> lsval
"TabletSetup"=dword:00000000"
SOFTWARE\Microsoft\Windows\TabletPC\TabSetup> cd ..
SOFTWARE\Microsoft\Windows\TabletPC> ls
Snipping Tool
TabSetup
The (later) write part will enhance this shell to allow hive
modifications, but these patches do not contain that change yet.
The second patch removes the old C-based hivexget and replaces it with
a simple shell script based around hivexsh.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
14 years, 11 months
how do i use a blob appliance the compiling from source
by Piavlo
Hi,
Since I've never succeeded to compile libguestfs from source on
Gentoosince the build process of the appliance based on debootstrap fails,
I'm wondering how can I tell the compilation process to use a
precompiled blob appliance?
Also can I use non fedora & debian but use some minimal gentoo based
appliance I have?
Thanks
Alex
14 years, 11 months
[PATCH] Remove function wait_ready in virt-v2v.pl
by jyang@redhat.com
From: Osier Yang <jyang(a)redhat.com>
---
v2v/virt-v2v.pl | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl
index 9eee590..0ad3c6e 100755
--- a/v2v/virt-v2v.pl
+++ b/v2v/virt-v2v.pl
@@ -265,7 +265,6 @@ sub get_guestfs_handle
$g->set_selinux(1);
$g->launch ();
- $g->wait_ready ();
return $g;
}
--
1.6.4.2
14 years, 11 months