[PATCH] daemon: fix directory outside current root when executing commands
by Matthew Booth
When executing a command, we temporarily chroot, fork and exec the command, then
chroot back. We intentionally don't chdir in the parent process so that we can
'jailbreak' the chroot later. However, this has the effect that commands are
executed with a current working directory which is outside the current root.
This unusual state can cause errors in executed commands which don't anticipate
it.
This change does a chdir("/") before executing and command. This happens inside
the fork, so the jailbreak isn't affected in the parent.
---
.gitignore | 1 +
daemon/guestfsd.c | 2 ++
generator/actions.ml | 7 ++++++-
tests/c-api/Makefile.am | 6 +++++-
tests/c-api/test-pwd.c | 35 +++++++++++++++++++++++++++++++++++
5 files changed, 49 insertions(+), 2 deletions(-)
create mode 100644 tests/c-api/test-pwd.c
diff --git a/.gitignore b/.gitignore
index 4a5f0c1..3873a19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -404,6 +404,7 @@ Makefile.in
/tests/c-api/test-last-errno
/tests/c-api/test.log
/tests/c-api/test-private-data
+/tests/c-api/test-pwd
/tests/c-api/tests
/tests/c-api/tests.c
/tests/c-api/test*.tmp
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 7e83a2a..1cbf82c 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -846,6 +846,8 @@ commandrvf (char **stdoutput, char **stderror, int flags,
close (so_fd[PIPE_WRITE]);
close (se_fd[PIPE_WRITE]);
+ chdir("/");
+
execvp (argv[0], (void *) argv);
perror (argv[0]);
_exit (EXIT_FAILURE);
diff --git a/generator/actions.ml b/generator/actions.ml
index 2e815fc..f78d851 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -3687,7 +3687,12 @@ C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>." };
[["mkdir"; "/command12"];
["upload"; "test-command"; "/command12/test-command"];
["chmod"; "0o755"; "/command12/test-command"];
- ["command"; "/command12/test-command"]])
+ ["command"; "/command12/test-command"]]);
+ InitScratchFS, Always, TestOutput (
+ [["mkdir"; "/pwd"];
+ ["upload"; "test-pwd"; "/pwd/test-pwd"];
+ ["chmod"; "0o755"; "/pwd/test-pwd"];
+ ["command"; "/pwd/test-pwd"]], "/");
];
shortdesc = "run a command from the guest filesystem";
longdesc = "\
diff --git a/tests/c-api/Makefile.am b/tests/c-api/Makefile.am
index 762c0de..1b88581 100644
--- a/tests/c-api/Makefile.am
+++ b/tests/c-api/Makefile.am
@@ -34,7 +34,8 @@ check_PROGRAMS = \
test-private-data \
test-user-cancel \
test-debug-to-file \
- test-environment
+ test-environment \
+ test-pwd
TESTS = \
tests \
@@ -80,6 +81,9 @@ tests_LDADD = $(top_builddir)/src/libguestfs.la
test_command_SOURCES = test-command.c
test_command_LDFLAGS = -all-static
+test_pwd_SOURCES = test-pwd.c
+test_pwd_LDFLAGS = -all-static
+
# Hand-written C API tests.
test_just_header_SOURCES = test-just-header.c
diff --git a/tests/c-api/test-pwd.c b/tests/c-api/test-pwd.c
new file mode 100644
index 0000000..60b978c
--- /dev/null
+++ b/tests/c-api/test-pwd.c
@@ -0,0 +1,35 @@
+/* libguestfs
+ * Copyright (C) 2012 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* This program, which must be statically linked, is used to test the
+ * guestfs_command and guestfs_command_lines functions.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main (int argc, char *argv[])
+{
+ char *cwd = get_current_dir_name();
+ printf("%s", cwd);
+
+ exit (EXIT_SUCCESS);
+}
--
1.7.11.7
11 years, 10 months
ANNOUNCE: libguestfs 1.20 - tools for accessing and modifying virtual machine disk images
by Richard W.M. Jones
I'm very pleased to announce the release of libguestfs 1.20.
Libguestfs is a library and a comprehensive set of tools for accessing
and modifying virtual machine (VM) disk images. For more information
see http://libguestfs.org
Libguestfs 1.20 represents 7 months of upstream work, dozens of major new
features and bug fixes. For full details read the release notes below.
You can download the libguestfs source from
http://libguestfs.org/download/1.20-stable
and packages will soon be available for Fedora 18 and Debian Wheezy.
For additional notes on Fedora 18, see:
https://www.redhat.com/archives/libguestfs/2012-December/msg00047.html
For additional notes on Debian Wheezy, see:
https://www.redhat.com/archives/libguestfs/2012-December/msg00046.html
----------------------------------------
You can also read the release notes online at:
http://libguestfs.org/guestfs-release-notes.1.html
RELEASE NOTES FOR LIBGUESTFS 1.20
New features
libvirt and sVirt (SELinux confinement)
You can optionally use libvirt to launch and manage the backend
appliance by:
* setting LIBGUESTFS_ATTACH_METHOD=libvirt[:URI]
* using ./configure --with-default-attach-method=libvirt[:URI]
* or calling the API method guestfs_set_attach_method
SVirt (SELinux confinement) is used to secure the libguestfs appliance,
if the libvirt backend is selected.
virtio-scsi, larger number of drives, hotplugging
Virtio-scsi is now used by default, if it is available. This greatly
increases the number of drives that can be added to a single libguestfs
handle (up to 255).
You can now hotplug drives (add and remove drives after launch).
Libguestfs can now handle > 25 disks, in all APIs, tools and tests.
You can label drives when adding them, then refer to them by label
(/dev/disk/guestfs/LABEL) instead of having to use device names
(/dev/sda).
new library features
POSIX Access Control Lists (ACLs) and Linux filesystem capabilities can
now be read and written through the API.
Windows Dynamic Disks are now supported. The metadata can only be read
(volumes cannot be modified or created). However the data/filesystems
in the volumes themselves can be mounted, read and written (Matthew
Booth).
Hivex (Windows Registry editing) is now directly supported through the
API, making reading or editing the Windows Registry much more
efficient.
Several libguestfs APIs were reimplemented so they no longer have any
limits on output. The reimplemented APIs are: guestfs_cat,
guestfs_find, guestfs_read_file, guestfs_read_lines, guestfs_write,
guestfs_write_append, guestfs_lstatlist, guestfs_lxattrlist,
guestfs_readlinklist, guestfs_ls.
virt tools
guestfish touch 'win:c:\new_file' now works as expected.
guestfish has a new --network option, which enables the user network in
libguestfs.
You can set GUESTFISH_PS1 to use fancy prompts in guestfish.
rsync, ssh, less and lrzip commands are now available in virt-rescue.
In addition, rsync can be used through the API for doing incremental
copies.
virt-sparsify uses qcow2 v3 for increased efficiency.
virt-sysprep enhancements:
* generate new UUIDs for PVs and VGs
* remove the local machine ID (Wanlong Gao)
* remove ABRT data (Wanlong Gao)
* remove puppet keys and log files (Wanlong Gao)
* remove process accounting files (Wanlong Gao)
* new --firstboot parameter allowing firstboot scripts for
customizing guests
* remove HOSTNAME field from ifcfg-eth* files (Wanlong Gao)
* miscellaneous improvements for SuSE (Olaf Hering)
* remove man pages cache (Wanlong Gao)
* remove crash data generated by kexec-tools (Wanlong Gao)
virt-make-fs can now create virtual floppy disks (VFDs).
guestmount has a --pid-file option, which can be used to avoid a race
condition between unmounting the filesystem and using the underlying
disk image.
language bindings
Full-featured Lua bindings have been added in this release (thanks to
Jerome Vuarand for many suggestions).
In Ruby, optional arguments hash is optional.
In Python, optional arguments now don't use special "sentinel" values,
so any integer can be passed as an optional argument.
Erlang bindings now come with examples and tests.
Erlang bindings now handle 64 bit integer parameters correctly.
The automated 'bindtests' now test for 64 bit cleanliness in parameter
passing. Several bugs in the bindings were found and fixed as a result.
Better handling of blocking and non-blocking functions should make
libguestfs calls more efficient.
inspection
Windows guests with unlimited-sized Registries are now supported. By
adding the hivex API to the libguestfs API, it is much more efficient
and easier to inspect and modify the Windows Registry in guests.
Better support for SuSE guests (Olaf Hering).
Return the architecture of installed applications (John Eckersberg).
Windows 8 is now supported.
Fedora 18 is now supported.
Inspection of ISOs/CDs/DVDs can now use the libosinfo database.
ports
Libguestfs without the appliance can be compiled on Mac OS X (Masami
HIRATA).
RHEL 5 is now explicitly supported through the 'oldlinux' branch in
upstream git.
PowerPC 64 bit is now supported. Also libguestfs has been examined for
endianness bugs and these have been fixed.
daemon
A man page for the daemon (guestfsd(8)) is included.
Security
guestfish history file
The $HOME/.guestfish history file is now created with 0600 permissions
(instead of 0644 before) so it is no longer world readable.
CVE-2012-2690
Old versions of both virt-edit and the guestfish edit command created a
new file containing the changes but did not set the permissions, etc of
the new file to match the old one. The result of this was that if you
edited a security sensitive file such as /etc/shadow then it would be
left world-readable after the edit.
This issue was assigned CVE-2012-2690, and is fixed in libguestfs ≥
1.16.
For further information, see
https://bugzilla.redhat.com/show_bug.cgi?id=788642
New APIs
acl-delete-def-file
acl-get-file
acl-set-file
canonical-device-name
cap-get-file
cap-set-file
create-flags
device-index
disk-has-backing-file
disk-format
disk-virtual-size
filesystem-available
fill-dir
fstrim
get-cachedir
get-libvirt-requested-credentials
get-libvirt-requested-credential-prompt
get-libvirt-requested-credential-challenge
get-libvirt-requested-credential-defresult
get-tmpdir
hivex-close
hivex-commit
hivex-node-add-child
hivex-node-children
hivex-node-delete-child
hivex-node-get-child
hivex-node-get-value
hivex-node-name
hivex-node-parent
hivex-node-set-value
hivex-node-values
hivex-open
hivex-root
hivex-value-key
hivex-value-type
hivex-value-utf8
hivex-value-value
inspect-list-applications2 (John Eckersberg)
list-ldm-volumes
list-ldm-partitions
ldmtool-create-all
ldmtool-diskgroup-disks
ldmtool-diskgroup-name
ldmtool-diskgroup-volumes
ldmtool-remove-all
ldmtool-scan
ldmtool-scan-devices
ldmtool-volume-hint
ldmtool-volume-partitions
ldmtool-volume-type
ls0
max-disks
mke2fs (Wanlong Gao)
mklost-and-found
mkswap [added label and uuid optional arguments]
mktemp (Wanlong Gao)
nr-devices
parse-environment
parse-environment-list
rm-f
rsync
rsync-in
rsync-out
set-cachedir
set-libvirt-supported-credentials
set-libvirt-requested-credential
set-tmpdir
shutdown [backported to 1.16 and 1.18]
tar-in [added compress flag]
tar-out [added compress, numericowner, excludes flags]
umount [added force and lazy optional arguments]
utsname
xfs-admin (Wanlong Gao)
xfs-growfs (Wanlong Gao)
xfs-info (Wanlong Gao)
xfs-repair (Wanlong Gao)
In the C API only:
guestfs_push_error_handler
guestfs_pop_error_handler
Internals
qemu ≥ 1.1 is required (≥ 1.2 preferred).
febootstrap ≥ 3.20 is required.
libvirt is optional, but if you want to use the new libvirt backend for
launching the appliance then libvirt ≥ 0.10.2 would be required.
Coverity has been run over the complete codebase, and many issues fixed
(thanks Ondrej Vasik, Kamil Dudka).
Functions which previously had no optargs can now be converted to ones
with optargs, making extending the API much more flexible. Source and
binary backwards compatibility is preserved for users of the API.
The way that libguestfs APIs and structures are represented in the
generator has changed to use an OCaml struct instead of a tuple. This
makes generator descriptions more flexible and easier to understand.
For details see commits 39d1a7db and eb185eef.
Separation of the library code into more files:
* Launch backends are now located in separate files eg.
src/launch-appliance.c, src/launch-libvirt.c.
* Generated action code is now split over several src/action*.c
files, for faster compilation.
* The huge src/guestfs.c file is now split into smaller logical
units.
POD (documentation) is now generated using a rewritten Perl program
instead of pod2* + shell scripts.
Man pages now contain stable dates (Hilko Bengen).
Skipped tests now exit with code 77, so they appear as SKIP: in make
check output.
The parallel mount-local test has been rewritten in C (RHBZ#838081).
Ruby 1.8.5 is now supported (though Ruby ≥ 1.9 is preferred).
Perl bindings can be disabled via ./configure --disable-perl (Wulf C.
Krueger). Note that Perl is still required in order to build
libguestfs.
Java bindings are now enabled/disabled using ./configure --with-java or
./configure --without-java (Wulf C. Krueger).
New configure options ./configure --enable-code-profiling and
./configure --enable-code-coverage.
Multiple fixes to use of 64 bit integers in language bindings.
The appliance backend now uses sgabios instead of vgabios (Dan
Berrange).
The ./run script now sets enough environment variables that you can run
OCaml, Python, Ruby, Java, GJS, Erlang, Lua programs.
./run --test flag for running tests with minimal output. It also prints
the time taken to run each test.
The ./run script now builds up paths cumulatively, meaning that you can
use ./run twice, or use the libguestfs and libvirt ./run scripts
together.
You can extract a list of external commands required by the daemon,
making building the appliance on certain distros easier (Olaf Hering).
The virt-rescue command is now tested during make check.
The generator now removes unused generated files. This helps when going
back and forth with git rebase, git bisect, etc.
Tests now run in a separate toplevel tmp/ directory in the source. This
allows the directory to be labelled for SELinux (sVirt), and also makes
it easier to clean up.
make syntax-check now works to a greater extent, and many problems in
the main code that were found by syntax-check have been fixed (thanks
Jim Meyering).
Emacs mode (-*- foo -*-) has been added to generated files.
Progress bar output is now sent to /dev/tty so it doesn't end up in the
regular output of the program. virt-resize and virt-sparsify now
suppress progress bars if stdout is not a tty.
There is now a ./configure --without-libvirt option. This is useful for
testing that the code still compiles without libvirt.
There is now an internal mini-library for running commands. This allows
us to redirect errors from external commands into events.
Code for handling temporary directories and the appliance cache was
completely overhauled.
Code for temporarily ignoring/disabling errors now looks like this:
guestfs_push_error_handler (g, NULL, NULL);
guestfs_mkdir (g, "/foo"); /* We don't care if this fails. */
guestfs_pop_error_handler (g);
The tests/extra directory has gone. The "extra tests" are now split
into separately runnable targets, such as make check-valgrind. Use make
help to get a summary of the targets.
The lpj option is passed to the appliance kernel when using TCG. This
should improve clock stability (thanks Marcelo Tosatti, Olaf Hering).
Bugs fixed
https://bugzilla.redhat.com/882417
libguestfs tools fail with odd error messages if TMPDIR is not an
absolute path
https://bugzilla.redhat.com/882299
Windows 8 guest disks can't be mounted: "The NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no
hibernation or fast restarting), or mount the volume read-only with
the 'ro' mount option."
https://bugzilla.redhat.com/881953
libguestfs: migration to /etc/hostname, /etc/vconsole.conf,
/etc/locale.conf
https://bugzilla.redhat.com/880801
virt-df with two -a options displays incorrect disk image name
https://bugzilla.redhat.com/879416
libguestfs-test-tool pauses when you use --help option
https://bugzilla.redhat.com/876579
mke2fs API does not apply block device naming translation to
journaldevice optarg
https://bugzilla.redhat.com/860235
SELinux policy ought to allow qemu to write to
unconfined_u:object_r:user_tmp_t:s0
https://bugzilla.redhat.com/859949
RFE: inspect-list-applications does not return the architecture of
RPM packages
https://bugzilla.redhat.com/859885
inspect-list-applications does not list all installed RPM packages
with same name and different versions
https://bugzilla.redhat.com/859876
guestfish printed paths are not canonicalized
https://bugzilla.redhat.com/859875
Progress bar output should go to tty(?) stderr(?)
https://bugzilla.redhat.com/858696
virt-sysprep reports Guestfs.Error("read_lines: fopen:
/etc/sysconfig/network: No such file or directory") on some Fedora
guests
https://bugzilla.redhat.com/858128
libguestfs fail to list devices added by add-drive-ro-with-if twice
https://bugzilla.redhat.com/858126
virt-inspector fail to work with some windows guests
https://bugzilla.redhat.com/853762
virt-sparsify should use a more robust method to detect the input
format
https://bugzilla.redhat.com/853393
libvirt doesn't label console, serial sockets
https://bugzilla.redhat.com/853159
virt-rescue in Fedora 18 is completely broken
https://bugzilla.redhat.com/852394
libguestfs inspection limits registries to 100 MiB
https://bugzilla.redhat.com/852194
virt-sparsify --compress fails if output is raw format
https://bugzilla.redhat.com/847881
RFE: allow extra arguments (like --exclude) to tar-out
https://bugzilla.redhat.com/847880
tar-out should allow (or force) --numeric-owner
https://bugzilla.redhat.com/845522
guestfish "copy-out / localdir" command fails with "No such file or
directory"
https://bugzilla.redhat.com/845488
Long filenames on NTFS cause tar-out, copy-out etc to fail with error
"Cannot open: File name too long"
https://bugzilla.redhat.com/842307
RFE: Need help designing and implementing selinux policy for
libguestfs/sVirt
https://bugzilla.redhat.com/840572
virt-make-fs / tar-in should support vfat properly
https://bugzilla.redhat.com/840115
guestfish touch problem - case_sensitive_path API expects the file to
exist
https://bugzilla.redhat.com/836710
Data loss when writing to qcow2-format disk files
https://bugzilla.redhat.com/834712
lvresize, lvresize-free fail unnecessarily if you don't change the
size of the LV: "New size (nn extents) matches existing size (nn
extents)"
https://bugzilla.redhat.com/824716
compress-device-out didn't support bzip2
https://bugzilla.redhat.com/824043
guestfish unrecognized mount option gives confusing error message
https://bugzilla.redhat.com/823887
Filenames containing Chinese characters can't be created on vfat
filesystems
https://bugzilla.redhat.com/823885
virt-make-fs cannot create vfat filesystem containing filesystems
with chinese characters
https://bugzilla.redhat.com/823883
virt-make-fs -t fat fails with an obscure error message
https://bugzilla.redhat.com/823821
Inspection fails when /etc/HOSTNAME is empty
https://bugzilla.redhat.com/801117
libguestfs cannot get icon for Windows 8
https://bugzilla.redhat.com/798979
Ubuntu install CDs from oneiric onwards are not recognized:
"multi-boot operating systems are not supported"
https://bugzilla.redhat.com/782167
libguestfs doesn't recognize Windows Dynamic disks in some
configurations, eg. spanned
https://bugzilla.redhat.com/713678
Not all febootstrap messages are redirected to log callbacks
https://bugzilla.redhat.com/627675
libguestfs inspector code cannot handle /dev/disk/by-id/* paths
https://bugzilla.redhat.com/602997
part-get-bootable gives wrong result with an unordered part layout
----------------------------------------
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
11 years, 10 months
Release notes appendix for libguestfs 1.20 on Debian Wheezy
by Richard W.M. Jones
I'm just about to release libguestfs 1.20. I want to cover some
things that are different or won't work as well in Debian Wheezy.
** Most important ** Debian Wheezy ships with febootstrap 3.17. This
is too old to run libguestfs 1.20 out of the box (febootstrap >= 3.20
required). However if you apply the attached patch to libguestfs,
then it will work with the older febootstrap.
virtio-scsi is not working properly in the older version of qemu that
Debian Wheezy ships (qemu 1.1 is shipped, qemu >= 1.2 is required).
For this reason I have added code to libguestfs which detects if you
have qemu < 1.2 and forces virtio-blk. Unfortunately this means you
don't get the benefits of virtio-scsi (see the main release notes).
Because of lack of virtio-scsi and too old libvirt (libvirt 0.9.12 is
shipped, libvirt >= 0.10.2 is required), the new libvirt attach-method
will not work in Debian. See the release notes for what you'll miss
out on. Of course the default (appliance) method works fine, and
libvirt is not required.
Even if newer libvirt and qemu where available in Debian, it seems
unlikely that sVirt protection would work. This is partly because of
the obvious fact that Debian doesn't use SELinux (by default). But
mainly because we have made several changes to the SELinux policy in
Fedora to support libguestfs with libvirt and sVirt. Also, although
in theory AppArmor could implement sVirt (there is code in libvirt to
do this) I have not even come close to testing this scenario.
The tune2fs test is broken (in libguestfs). The easiest thing is just
to skip it:
export SKIP_TEST_TUNE2FS=1
'vfat' filesystem on Debian is somehow different from the same kernel
filesystem on Fedora. I don't exactly know why but this breaks the
test-charset-fidelity test. You can skip this by doing:
export SKIP_TEST_CHARSET_FIDELITY=1
The IDE device either isn't emulated by Debian's KVM, or there is a
missing driver in the Debian kernel, or for some other reason it
doesn't work. I didn't look closely, but skipped the test by doing:
export SKIP_TEST_RHBZ690819_SH=1
Disk labels (a new feature) don't work with Debian udev. Again, I did
not investigate in depth. You can skip the test by doing:
export SKIP_TEST_DISK_LABELS_PL=1
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
11 years, 10 months
Re: [Libguestfs] Trying to package Oz for Ubuntu
by Richard W.M. Jones
[ CCing to Hilko who is the Debian maintainer, and the libguestfs
mailing list. ]
On Tue, Dec 11, 2012 at 04:18:20PM -0600, Steve Loranz wrote:
> Chris / Richard,
>
> I'm trying to get a package of Oz together for Ubuntu so that I can
> ultimately get an imagefactory package built for Ubuntu as well. I'm
> stuck on libguestfs at this point and was hoping one of you might be
> able to point me in the right direction.
>
> I'm working on Ubuntu 12.10 and the steps I'm taking are:
>
> 1) sudo apt-get install build-essential python-dev kvm libguestfs-tools python-libvirt python-pycurl python-parted python-guestfs python-libxml2 python-m2crypto genisoimage mtools openssh-client
>
> 2) check my versions of febootstrap and seabios
>
> ---
> >>> dpkg -s febootstrap seabios
> Package: febootstrap
> Status: install ok installed
> Priority: optional
> Section: admin
> Installed-Size: 1364
> Maintainer: Ubuntu Developers <ubuntu-devel-discuss(a)lists.ubuntu.com>
> Architecture: amd64
> Version: 3.17-1
> Depends: e2fslibs (>= 1.42), libc6 (>= 2.15), libcomerr2 (>= 1.01), aptitude, cpio
> Description: tool for building supermin appliances.
> febootstrap is a tool for building supermin appliances. These are
> tiny appliances [similar to virtual machines], usually around 100KB
> in size, which get fully instantiated on-the-fly in a fraction of a
> second when one of them is booted.
> Original-Maintainer: Debian Libvirt Maintainers <pkg-libvirt-maintainers(a)lists.alioth.debian.org>
> Homepage: http://people.redhat.com/~rjones/febootstrap/
>
> Package: seabios
> Status: install ok installed
> Priority: extra
> Section: misc
> Installed-Size: 353
> Maintainer: Ubuntu Developers <ubuntu-devel-discuss(a)lists.ubuntu.com>
> Architecture: all
> Version: 1.7.0-1
> Conflicts: qemu-system (<< 0.14.0)
> Description: Legacy BIOS implementation
> SeaBIOS is a legacy BIOS implementation, aimed at supporting not only
> emulated hosts such as QEMU, but also real hardware.
> .
> Note, however, that SeaBIOS does not handle early initialization of core
> chipsets, so don't even think of flashing it to your board (look at
> Coreboot for that).
> Original-Maintainer: Debian QEMU Team <pkg-qemu-devel(a)lists.alioth.debian.org>
> Homepage: http://www.seabios.org
> ---
>
> This seems compatible with the guidance for Ubuntu 12.04 on http://libguestfs.org/guestfs-faq.1.html#binaries so far.
>
> 3) sudo chmod 0644 /boot/vmlinuz*
>
> 4) git clone https://github.com/aeolus-incubator/templates.git
>
> 5) git clone https://github.com/clalancette/oz.git
>
> 6) ~/oz$ sudo python setup.py install
>
> 7) sudo oz-install -d3 templates/web_servers/Apache/fedora-16/apache_httpd_f16_bare.xml
>
> This is where I'm running into problems. Here is the output:
>
> ---
> libvirt bridge name is virbr0
> Libvirt type is kvm
> Original URL http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything... resolved to http://fedora.mirrors.tds.net/pub/fedora/releases/16/Everything/x86_64/os/
> Name: ApacheWebServer, UUID: f22c6a4a-b08d-47f0-ab5d-eeb104286ddd
> MAC: 52:54:00:bc:d8:de, distro: Fedora
> update: 16, arch: x86_64, diskimage: /var/lib/libvirt/images/ApacheWebServer.dsk
> nicmodel: virtio, clockoffset: utc
> mousetype: ps2, disk_bus: virtio, disk_dev: vda
> icicletmp: /var/lib/oz/icicletmp/ApacheWebServer, listen_port: 53452
> Original ISO path: /var/lib/oz/isos/Fedora16x86_64-url.iso
> Modified ISO cache: /var/lib/oz/isos/Fedora16x86_64-url-oz.iso
> Output ISO path: /var/lib/libvirt/images/ApacheWebServer-url-oz.iso
> ISO content path: /var/lib/oz/isocontent/ApacheWebServer-url
> Checking for guest conflicts with ApacheWebServer
> Generating install media
> Fetching the original media
> Attempting to get the lock for /var/lib/oz/isos/Fedora16x86_64-url.iso
> Got the lock, doing the download
> Original install media available, using cached version
> Copying ISO contents for modification
> Setting up guestfs handle for ApacheWebServer
> Adding ISO image /var/lib/oz/isos/Fedora16x86_64-url.iso
> Launching guestfs
> Cleaning up after install
> Traceback (most recent call last):
> File "/usr/local/bin/oz-install", line 143, in <module>
> guest.generate_install_media(force_download)
> File "/usr/local/lib/python2.7/dist-packages/oz/RedHat.py", line 739, in generate_install_media
> return self._iso_generate_install_media(fetchurl, force_download)
> File "/usr/local/lib/python2.7/dist-packages/oz/Guest.py", line 1581, in _iso_generate_install_media
> self._copy_iso()
> File "/usr/local/lib/python2.7/dist-packages/oz/Guest.py", line 1278, in _copy_iso
> gfs.launch()
> File "/usr/lib/python2.7/dist-packages/guestfs.py", line 244, in launch
> return libguestfsmod.launch (self._o)
> RuntimeError: cannot find any suitable libguestfs supermin, fixed or old-style appliance on LIBGUESTFS_PATH (search path: /usr/lib/x86_64-linux-gnu/guestfs)
> ---
>
> It appears that update-guestfs-appliance is being run as part of the
> libguestfs-tools install and I select yes when it prompts to create
> a supermin [appliance] but I'm still getting this exception.
>
> What am I missing here?
You need to run 'libguestfs-test-tool' and paste the complete,
unedited output into your reply.
I suspect the problem may be that update-guestfs-appliance is in fact
not being run for some reason.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
11 years, 10 months
Remove 3 unused fields from the filesystem struct
by Matthew Booth
These 3 patches remove unused fields from the filesystem struct, and the
inspection code which populates them. The second 2 are fairly trivial NFCs, but
the first has the potential for side effects as it entirely removes a couple of
matches from the filesystem detection code. A filesystem which was previously
matched as X and ignored might conceivably now be matched as Y instead, whereas
previously that test would never have happened. This may be a good thing or a
bad thing...
11 years, 10 months
[PATCH] Add support for Windows dynamic disks (libldm / ldmtool).
by Richard W.M. Jones
This is just an initial version of the patch, not to be
applied. It implements just the diskgroup functions, ie.
corresponding to these ldmtool commands:
* ldmtool scan
* ldmtool show diskgroup <guid>
I have chosen yajl as the JSON parsing library (don't worry,
this is optional). You will also, of course, need ldmtool
which is not packaged in anything except Fedora.
Rich.
11 years, 10 months
[PATCH v3] tests: Fix qemu-wrapper.sh generation
by Cole Robinson
---
v3:
s/top_builddir/abs_top_builddir/
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2eebefa..1c91859 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -352,11 +352,11 @@ check-with-upstream-qemu:
check-with-upstream-qemu-1: $(top_builddir)/qemu-wrapper.sh
$(QEMUBINARY) --version
- $(MAKE) LIBGUESTFS_QEMU=$(top_builddir)/qemu-wrapper.sh check
+ $(MAKE) LIBGUESTFS_QEMU=$(abs_top_builddir)/qemu-wrapper.sh check
$(top_builddir)/qemu-wrapper.sh: Makefile
rm -f $@ $@-t
- echo exec "$(QEMUBINARY)" -L "$(QEMUDIR)/pc-bios" "$$@" > $@-t
+ echo -e "#!/bin/sh\nexec" "$(QEMUBINARY)" -L "$(QEMUDIR)/pc-bios" \"\$$@\" > $@-t
chmod +x,-w $@-t
mv $@-t $@
--
1.8.0.1
11 years, 10 months
[PATCH v2] tests: Fix qemu-wrapper.sh generation
by Cole Robinson
---
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2eebefa..560ebda 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -352,11 +352,11 @@ check-with-upstream-qemu:
check-with-upstream-qemu-1: $(top_builddir)/qemu-wrapper.sh
$(QEMUBINARY) --version
- $(MAKE) LIBGUESTFS_QEMU=$(top_builddir)/qemu-wrapper.sh check
+ $(MAKE) LIBGUESTFS_QEMU=$(abs_builddir)/qemu-wrapper.sh check
$(top_builddir)/qemu-wrapper.sh: Makefile
rm -f $@ $@-t
- echo exec "$(QEMUBINARY)" -L "$(QEMUDIR)/pc-bios" "$$@" > $@-t
+ echo -e "#!/bin/sh\nexec" "$(QEMUBINARY)" -L "$(QEMUDIR)/pc-bios" \"\$$@\" > $@-t
chmod +x,-w $@-t
mv $@-t $@
--
1.8.0
11 years, 11 months
[PATCH] tests: Fix qemu-wrapper.sh generation
by Cole Robinson
---
There's some other issues with check-with-upstream-qemu, like qemu-wrapper
isn't regenerated if we specify a new QEMUDIR.
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 2eebefa..4f88311 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -356,7 +356,7 @@ check-with-upstream-qemu-1: $(top_builddir)/qemu-wrapper.sh
$(top_builddir)/qemu-wrapper.sh: Makefile
rm -f $@ $@-t
- echo exec "$(QEMUBINARY)" -L "$(QEMUDIR)/pc-bios" "$$@" > $@-t
+ echo -e "#!/bin/sh\nexec" "$(QEMUBINARY)" -L "$(QEMUDIR)/pc-bios" \"\$$@\" > $@-t
chmod +x,-w $@-t
mv $@-t $@
--
1.8.0
11 years, 11 months