Commit Graph

5820 Commits

Author SHA1 Message Date
Richard W.M. Jones
f532ca96dc todo: Some items to do in virt-builder. 2013-10-05 11:54:01 +01:00
Richard W.M. Jones
39ee0d13db builder: docs: Minor copy-edits of the man page. 2013-10-04 14:04:52 +01:00
Richard W.M. Jones
be8ccedaf1 Update release notes. 2013-10-04 13:44:39 +01:00
Richard W.M. Jones
05e8410e0e Update API support. 2013-10-04 13:44:23 +01:00
Richard W.M. Jones
d6f87fe6be Version 1.23.25. 1.23.25 2013-10-04 12:01:18 +01:00
Richard W.M. Jones
8f5dd4ed02 builder: docs: Add sections on architecture, security, UML. 2013-10-04 11:43:31 +01:00
Richard W.M. Jones
64bef381f6 uml: Fix virt-builder test.
Note comment in the test about networks.
2013-10-04 08:48:26 +01:00
Richard W.M. Jones
fe7f88a35d builder: Fix --format/--output-format arguments to virt-resize subcommand.
The 'virt-builder --format' option translates to the
'virt-resize --output-format' option, because it specifies the output
format.

On the contrary, the 'virt-resize --format' option (the input format)
is always 'raw'.
2013-10-04 08:42:20 +01:00
Richard W.M. Jones
dd410e1165 builder: Add -v option to test so we get all debugging output. 2013-10-04 08:31:53 +01:00
Richard W.M. Jones
a914889b1d tests/nbd: Avoid warning when tests are skipped.
Since END{} clause is always called,  might not be defined if
we exit early.  Move the whole clause to the top.
2013-10-04 08:26:00 +01:00
Richard W.M. Jones
e9f35e26c5 builder: Add test *.xz files to CLEANFILES. 2013-10-04 08:25:14 +01:00
Richard W.M. Jones
0373f4ce68 Version 1.23.24. 1.23.24 2013-10-03 22:07:28 +01:00
Richard W.M. Jones
967668f7a8 website: Make the rule install builder files to website. 2013-10-03 22:02:47 +01:00
Richard W.M. Jones
a80f0f40b1 website: Add HTMLSUPPORTFILES to rule. 2013-10-03 22:02:47 +01:00
Richard W.M. Jones
a0d73b7e21 builder: Add Debian 7 template + scripts used to create it. 2013-10-03 22:02:47 +01:00
Richard W.M. Jones
c975d9e53b builder: Implement --hostname (set hostname of guest).
This also makes a minor rearrangement so that the random seed, root
password, hostname setting all happen before package installation.
This keeps these configuration changes together and means that the
packages that are installed can act differently based on hostname
(which is conceivable).
2013-10-03 22:02:47 +01:00
Richard W.M. Jones
08b7c90228 sysprep: Refactor hostname code into a common library. 2013-10-03 22:02:47 +01:00
Richard W.M. Jones
7e824a1015 builder: Add tests. 2013-10-03 22:02:44 +01:00
Richard W.M. Jones
9ba6717e94 New tool: virt-builder: For quickly building virtual machine images.
On baremetal you can build and customize a new guest in under 2
minutes.  For example:

$ virt-builder fedora-19 \
    --root-password password:test \
    --install minicom \
    --firstboot-command 'yum -y update' \
    --firstboot-command 'useradd -m -p "" rjones ; chage -d 0 rjones'
[     0.0] Downloading: file:///home/rjones/d/libguestfs/builder/website/fedora-19.xz
[     1.0] Uncompressing: file:///home/rjones/d/libguestfs/builder/website/fedora-19.xz
[    24.0] Running virt-resize to expand the disk to 4.2G
[    77.0] Opening the new disk
[    81.0] Installing packages: minicom
[    94.0] Installing firstboot command: [001] yum -y update
[    94.0] Installing firstboot command: [002] useradd -m -p "" rjones ; chage -d 0 rjones
[    94.0] Finishing off
2013-10-03 22:02:16 +01:00
Richard W.M. Jones
6203c50479 sysprep: Refactor setting random seed code into a common library.
This is just code motion.
2013-10-03 21:42:05 +01:00
Richard W.M. Jones
da1d0da429 firstboot: Invoke firstboot.sh script with 'start' parameter.
.. else the systemd script does not run.
2013-10-03 21:42:05 +01:00
Richard W.M. Jones
147b4ee87e sysprep: Refactor firstboot code into a common library. 2013-10-03 21:42:05 +01:00
Richard W.M. Jones
ff9bc90e63 resize: Don't add mllib/* sources to 'SOURCES'.
This was a mistake in commit 2a6ce79320.
2013-10-03 21:42:05 +01:00
Richard W.M. Jones
e8a092ae87 sysprep: Refactor password handling code into a common library.
Also the crypt binding is moved to mllib because this is a dependency
of the password library.

This is just code motion.
2013-10-03 21:42:04 +01:00
Richard W.M. Jones
748ab33969 mllib: Rename parse_size to parse_resize.
This is just code motion, but it reduces a source of confusion.
2013-10-03 21:42:04 +01:00
Richard W.M. Jones
98d56bb102 mllib: error function has ~prog parameter, instead of assuming virt-resize.
$ virt-sparsify a a
  virt-resize: error: you cannot use the same disk image for input and
  output
  If reporting bugs, run virt-resize with the '-d' option and include the
  complete output.

Note (a) it assumes the program is called "virt-resize" which it
isn't, and (b) it assumes the program has a debug option -d which it
doesn't.

This commit changes the error message and adds a -v option to
virt-resize.
2013-10-03 21:42:04 +01:00
Richard W.M. Jones
e1d7fb406b resize, sparsify: Small argument parser refactoring.
Factor out a common string.
2013-10-03 21:42:04 +01:00
Richard W.M. Jones
21e5fc811e daemon: Don't set LD_PRELOAD for guestfsd children.
Commit c598e14052 exports
LD_PRELOAD=/lib64/libSegFault.so so that guestfsd and processes that
it runs will produce descriptive stack traces.

However if we chroot into /sysroot (ie. CHROOT_IN/CHROOT_OUT) and if
the libSegFault.so library does not exist inside the chroot (as is the
case on Debian guests) then we cannot run any processes.  In any case
we *don't* want to necessarily run this library from the guest.

The proper way to fix this is to confine all chrooting to a
subprocess, but that's a big change to guestfsd which we'll have to do
one day.  For now, unset LD_PRELOAD once guestfsd starts up.
2013-10-03 21:42:04 +01:00
Richard W.M. Jones
8abd0a83b3 daemon: Fix xfs_info parser because of new format.
The old parser had several problems: firstly it called the error path
sometimes without calling reply_with_error causing a protocol hang.
More seriously it had hard-coded line numbers, and since Fedora 21 the
output of xfs_info has changed, moving lines around.

Change the parser to be more robust against added fields by using the
first name on the line as the section name, thus 'bsize=' is
interpreted differently depending on whether it appears in the "data"
section or the "naming" section.

Ensure also that we don't call the error path without calling
reply_with_error, which is a side-effect of the above change.
2013-10-03 18:17:39 +01:00
Cole Robinson
216cb004ae launch: libvirt: Set attribute present=yes to enable kvmclock. 2013-10-03 15:06:40 +01:00
Richard W.M. Jones
0fbd645cb9 Version 1.23.23. 1.23.23 2013-09-27 17:15:39 +01:00
Richard W.M. Jones
a2a7ba5051 Update BUGS file. 2013-09-26 22:11:01 +01:00
Richard W.M. Jones
dc0052381e Update PO files. 2013-09-26 22:01:41 +01:00
Richard W.M. Jones
93dbeb6b6c tools: Generate a special POTFILES-pl and dump symlink hack in tools directory. 2013-09-26 22:01:41 +01:00
Richard W.M. Jones
e2895b19bb appliance: Create /dev/loop-control and similar devices.
When 'mount -o loop' and similar commands are used, the loop module is
loaded automatically by the kernel when /dev/loop-control is accessed.

/dev/loop-control is created semi-statically by an unholy and
overcomplex combination of kmod static-nodes and systemd-tmpfiles
(instead of using, say, just udev or even just a simple series of
mknod commands).
2013-09-26 10:51:56 +01:00
Richard W.M. Jones
d0ef2ff9b6 appliance: If --enable-valgrind-daemon then increase minimum memory to 768 MB.
tests/c-api would fail from time to time if --enable-valgrind-daemon
was configured.  There was no obvious memory leak.  It looks as if the
overhead of valgrind was sufficient to break long-running tests such
as this one.
2013-09-25 16:00:38 +01:00
Richard W.M. Jones
2f4f7726e8 launch: libvirt: Use host-passthrough instead of host-model.
<cpu model="host-passthrough"> really passes -cpu host to qemu, which
is what we want since we don't care about live migration or ABI
stability.

This should avoid http://bugzilla.redhat.com/870071 .

Note this "taints" the libvirt domain.  We don't particularly care
about that, and the reason for the tainting doesn't seem to make much
sense anyway.

This updates commit 6f76fdb41e.
2013-09-25 12:50:13 +01:00
Richard W.M. Jones
ae2dd1a9e7 sparsify: Fix incorrect reference to documentation from tool. 2013-09-24 14:18:54 +01:00
Richard W.M. Jones
48b0d15749 mllib: Ensure that mllib is included in POTFILES-ml.
This updates commit 2a6ce79320.
2013-09-24 14:18:54 +01:00
Richard W.M. Jones
09a4f42861 uri: Fix two compiler warnings.
We have to include the right header so that guestfs___free_string_list
is declared.  Unfortunately that means ensuring -I src is passed to
the compiler in every tool subdirectory.

Also fix (bogus) compiler warning about incorrect type of the
parameter to caml_copy_string_array.
2013-09-24 13:41:35 +01:00
Richard W.M. Jones
2a6ce79320 tools: Move shared OCaml code to mllib/ directory.
Previously a lot of shared code lived in the resize/ directory for no
particular reason.

This is just code motion.
2013-09-24 13:41:35 +01:00
Richard W.M. Jones
dbbdaebe22 resize: Allow the input file to be a URI.
This lets you use nbd as a source for resizing, eg:

  virt-resize nbd://example.com outfile
2013-09-23 15:22:24 +01:00
Richard W.M. Jones
4cdb5bcc5e sysprep: Fix option quoting in manual page.
This fixes commit b65c1c667b.
2013-09-23 13:49:21 +01:00
Richard W.M. Jones
5971fb2a70 virt-df: parallel: Send debugging messages to stderr.
Not stdout (ordinary program output) since that gets eaten by
the tests.

This fixes commit 67b9469754.
2013-09-12 09:16:31 +01:00
Richard W.M. Jones
54f1492615 arm: Drop kernel_irqchip=off hack.
Was only required because of the previous use of vexpress-a9.  With
vexpress-a15 should no longer be needed.
2013-09-11 18:44:11 +01:00
Richard W.M. Jones
f4b3f84409 arm: Switch to using Versatile Express A15 machine.
This is the machine which qemu actually emulates these days.
2013-09-11 14:52:37 +01:00
Richard W.M. Jones
577330d5e5 Remove incorrect comment.
qemu does in fact fix up the device tree with the correct memory size
supplied by -m <ramsize> so the comment was incorrect.

This updates commit 8d273a2715.
2013-09-11 14:42:45 +01:00
Richard W.M. Jones
8d273a2715 arm: Pass mem= parameter on Linux command line.
It is thought that qemu-system-arm -m <ramsize> could conflict with
the actual memory that Linux thinks is available (from the device tree).

Thanks: Marc Zyngier
2013-09-11 14:37:51 +01:00
Richard W.M. Jones
27cfd77df9 arm: Don't bother supplying guest architecture.
libvirt seems to do the right thing without this.
2013-09-11 11:57:40 +01:00
Richard W.M. Jones
c3f8b441fd arm: Add notes about machine types.
Thanks: Marc Zyngier from ARM, Andre Przywara from Linaro for
patiently explaining this to me.
2013-09-11 11:53:18 +01:00