summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* build: Set TMPDIR for local testing.Richard W.M. Jones2011-08-171-0/+1
| | | | | | | | | This avoids conflicts with the globally installed libguestfs appliance, or lets us build in multiple local directories at the same time without conflicts. Cherry picked from commit f7d18c84dde596699ffc5100fec2cf7b0d582450 and backported to stable-1.10 branch.
* virt-tar test: Stable ordering of test output.Richard W.M. Jones2011-08-071-1/+1
| | | | | | The files could be listed in any order, resulting in the test failing for no reason. Sort the output of tar. (cherry picked from commit 995b3fecb9af7a8bd52b238bad2a631a1193c83a)
* doc: Use I<-...> for cross-references to command line options.Richard W.M. Jones2011-05-184-24/+24
| | | | | This is now used consistently across all the documentation. (cherry picked from commit c49fc3831d12788c27b90d12f06a1cd69a88e3be)
* Remove ad-hoc run*locally scripts, replace with './run'Richard W.M. Jones2011-04-182-57/+0
| | | | | | Remove all the run*locally scripts and replace with a single top level ./run shell script. (cherry picked from commit 5790f5bfafb12cc2ed9365461bf66e0fdfde7150)
* Rewrite virt-resize in OCaml.Richard W.M. Jones2011-04-093-1571/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fairly straightforward translation of Perl virt-resize into OCaml. It is bug-for-bug and feature-for-feature identical to the Perl version, except as noted below. The motivation is to have a more solid, high-level, statically safe compiled language to go forwards with fixing some of the harder bugs in virt-resize. In particular contracts between different parts of the program are now handled by statically typed structures checked at compile time, instead of the very ad-hoc unchecked hash tables used by the Perl version. OCaml and the ocaml-pcre library (Perl-Compatible Regular Expressions bindings for OCaml) are required. Extra features in this version: - 32 bit hosts are now supported. - We try hard to handle the case where the target disk is not "clean" (ie. all zeroes). It usually works for this case, whereas the previous version would usually fail. However it is still recommended that the system administrator creates a fresh blank disk for the target before running the program. - User messages are a bit more verbose and helpful. You can turn these off with the -q (--quiet) option. There is one lost feature: - Ability to specify >= T (terabytes) sizes in command line size expressions has been removed. This probably didn't work in the Perl version. Other differences: - The first partition on the target is no longer aligned; instead we place it at the same sector as on the source. I suspect that aligning it was causing the bootloader failures. - Because it's easier, we do more sanity checking on the source disk. This might lead to more failures, but they'd be failures you'd want to know about. - The order in which operations are performed has been changed to make it more logical. The user should not notice any functional difference, but debug messages will be quite a bit different. - virt-resize is a compiled binary, not a script.
* edit: Allow Windows-style drive letters and paths to be used.Richard W.M. Jones2011-04-051-0/+101
|
* edit: Move 'exit 0' to end of file.Richard W.M. Jones2011-04-051-2/+4
| | | | This is just code motion.
* edit: Let $root == $roots[0].Richard W.M. Jones2011-04-051-1/+2
| | | | This is just code motion.
* cat, edit: Reference guestfish equivalent commands in the manual pages.Richard W.M. Jones2011-04-051-4/+46
|
* tests: Don't fail when compiled without support for NTFS.Richard W.M. Jones2011-03-291-11/+43
|
* New event API - Perl bindings (RHBZ#664558).Richard W.M. Jones2011-03-151-6/+12
| | | | | | | | The methods $h->set_progress_callback and $h->clear_progress_callback have been removed, and replaced with a complete mechanism for setting and deleting general-purpose events. This also updates virt-resize to use the new API.
* virt-make-fs: Round disk size to integer, fix for qemu-img 0.14.Richard W.M. Jones2011-03-041-0/+2
| | | | | | | qemu-img used to allow you to specify a fractional image size in bytes (or at least, it used to ignore the part after the decimal place). In qemu-img 0.14 it no longer does this so we round down the size to a whole number of bytes.
* virt-make-fs: In debug mode, print qemu-img command line.Richard W.M. Jones2011-03-041-0/+3
|
* virt-make-fs: Fix typo in man page.Richard W.M. Jones2011-01-301-1/+1
|
* resize: Fix typo in man page (thanks avesh@IRC).Richard W.M. Jones2011-01-071-1/+1
|
* New tools: virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out.Richard W.M. Jones2011-01-033-1/+12
| | | | | Relatively trivial wrappers around the equivalent guestfish commands. Change also includes new man pages.
* win-reg: Add Windows Tips to documentation.Richard W.M. Jones2010-12-101-0/+90
|
* win-reg: Move documentation after options, combine shell quote sections.Richard W.M. Jones2010-12-101-75/+73
|
* docs: Fix small inaccuracies in virt-resize(1).Richard W.M. Jones2010-11-271-6/+4
|
* rescue: Rewrite virt-rescue in C.Richard W.M. Jones2010-11-262-298/+0
|
* df: Rewrite virt-df in C.Richard W.M. Jones2010-11-253-746/+3
| | | | | | | | | | | | I have diffed the output from the original virt-df with this new version, and they agree very closely. Some differences: - Old virt-df have a divide-by-zero error in cases where the number of used inodes was 0. New virt-df fixes this. - New virt-df uses gnulib human_readable library which displays numbers to 3 significant figures for -h output (old version used an ad hoc function).
* build: Centralize all POD manipulation in 'podwrapper.sh' script.Richard W.M. Jones2010-11-241-11/+6
|
* New tool: virt-filesystemsRichard W.M. Jones2010-11-233-13/+19
| | | | | | | | This tool replaces virt-list-filesystems and virt-list-partitions with a new tool written in C with a more uniform command line structure and output. This existing Perl tools are deprecated but remain indefinitely.
* ls: Rewrite virt-ls in C.Richard W.M. Jones2010-11-233-285/+0
|
* resize: Fix canonical device function (RHBZ#655554).Richard W.M. Jones2010-11-231-1/+1
|
* rescue: Fix typo in documentation of --network option.Richard W.M. Jones2010-11-161-1/+1
|
* images: Make a better phony Fedora image.Richard W.M. Jones2010-11-162-1/+3
| | | | | This now includes a product string, major and minor version, hostname and even some applications.
* Rewrite virt-cat in C.Richard W.M. Jones2010-11-113-234/+3
| | | | | | | | | | | | | | | | | With changes in the core API since 1.5, virt-cat was little more than a Perl wrapper which did some command line argument processing. Thus it could easily be rewritten in C. This version also shares core command line argument processing with guestfish and guestmount, so the options have changed slightly (old-style command line *is* supported). virt-cat -a disk.img file [file ...] virt-cat -d domname file [file ...] Several other guestfish options are supported including encryption, and with the new style multiple files can be downloaded. See the man page for details.
* Generate a dummy 'Fedora' fedora.img in images directory for use by tests.Richard W.M. Jones2010-11-117-106/+12
| | | | | | | | We were generating this dummy 'Fedora' image already in the tools directory. It contains just enough Fedora-like files to fool our inspection code and thus to test the tools. This is general enough that we can use it everywhere.
* virt-win-reg: Current is the control set Windows chooses at boot.Richard W.M. Jones2010-11-031-1/+1
|
* list-filesystems: Use core list-filesystems API (RHBZ#642933).Richard W.M. Jones2010-10-281-42/+12
| | | | | | Change virt-list-filesystems to use the core inspection API instead of the deprecated Sys::Guestfs::Lib::get_partitions function.
* tools: Use C API for inspection (RHBZ#642930).Richard W.M. Jones2010-10-285-101/+87
| | | | | | | | | | | | | Update the following tools to use the C API for inspection: - virt-cat - virt-edit - virt-ls - virt-tar - virt-win-reg None of the tools in the tools/ directory now use the deprecated Perl inspection APIs.
* edit: Clean up tmp file handling in virt-edit.Richard W.M. Jones2010-10-281-3/+6
| | | | | | | This was probably not a security issue, but this change makes the code cleaner by not opening the tmp file twice. Also be more careful about error checking in close syscall.
* virt-ls: Small fix to documentation.Richard W.M. Jones2010-10-281-2/+2
|
* df: Add --uuid option to print guest UUIDs instead of names (RHBZ#646821).Richard W.M. Jones2010-10-271-5/+31
|
* rescue: Add --network option.Richard W.M. Jones2010-10-271-1/+11
| | | | This enables networking in the rescue shell.
* resize: Specify format of input, output disk (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-221-3/+42
| | | | | | | | | | | | | This adds two new options: --format specifies the format of the input disk, and --output-format specified the format of the output disk. Requiring the format of the output disk seems a bit strange at first: after all, this is the disk that the virt-resize user has to create. However it is needed because we sometimes reopen this disk, after copying data over the first sector, and in theory a raw-format guest could write a qcow2 header here and have it copied to the output disk, which we would subsequently reopen.
* virt-make-fs: Specify format of disk (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-221-1/+1
|
* df: Specify format of disks (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-221-6/+47
| | | | | | The format parameter is taken from libvirt if available, else the user should supply the '--format' parameter (eg. for local disk files).
* tools: Specify format of disks (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-228-10/+157
| | | | | | | | | | Sys::Guestfs::Lib is changed in two ways: firstly we take the format string from libvirt and pass it to add_drive_opts. Secondly we allow an extra format => parameter to open_guest which allows the format to be specified for disk images. All the tools are changed to add an extra --format parameter allowing the format to be specified for direct disk images.
* virt-resize: Document guest boot stops at "GRUB" (RHBZ#640961).Richard W.M. Jones2010-10-181-0/+20
|
* df: Correctly quote libvirt domain and filesystem in --csv mode (RHBZ#639986).Richard W.M. Jones2010-10-181-1/+31
| | | | | This fixes virt-df --csv when used with libvirt domains that contain quotes, spaces, commas and other lesser-used characters.
* virt-resize: Document qcow2 output format (RHBZ#642826).Richard W.M. Jones2010-10-181-0/+25
|
* virt-resize: List truncate(1) in SEE ALSO section.Richard W.M. Jones2010-10-181-0/+1
|
* tools: Add section describing quoting libvirt domain names to docs (RHBZ#643624)Richard W.M. Jones2010-10-1811-0/+77
|
* test-virt-resize: Skip this test on 32 bit hosts.Richard W.M. Jones2010-10-021-0/+7
|
* Add test for virt-resize.Richard W.M. Jones2010-09-272-0/+32
| | | | | | | | | | | | | | This tests a number of things which have caused problems for us: - resizing PVs and LV content - handling GPT format disks - using qcow2 as a target disk format - shrinking disk images Note that the disk content is empty (not a real VM), but this is adequate since all we want to test are the operations and calculations done by virt-resize. We are not interested here in whether e2fsprogs and LVM actually works.
* resize: Fix handling of GPT and qcow2 (RHBZ#633766, RHBZ#633096).Richard W.M. Jones2010-09-271-70/+79
| | | | | | | | | | | | | | | | | | Previously we copied the bootloader data directly from the source disk image to the target disk image using host file operations (before launching libguestfs). This has two problems: firstly it has no chance of working with qcow2, and secondly it didn't behave properly with GPT. This changes the code so that everything is done through libguestfs. Block device sizes are now calculated properly for qcow2 (RHBZ#633096) because this is done using the libguestfs blockdev_getsize64 call. The partition table is still created by parted, but to workaround a bug in parted this is done before copying the bootloader. Finally the bootloader copy is done using the new APIs pread-device and pwrite-device. Shrinking now works, at least for simple cases (RHBZ#633766).
* df: Add --one-per-guest option for using one appliance per guest.Richard W.M. Jones2010-09-201-44/+98
|
* resize: Add progress bar to virt-resize.Richard Jones2010-09-011-6/+23
| | | | | | | | | | | | | | With this commit you will see a plain progress bar during the lengthy copy operations, similar to below: Summary of changes: /dev/sda1: partition will be left alone /dev/sda2: partition will be resized from 7.5G to 9.5G /dev/sda2: content will be expanded using the 'pvresize' method Copying /dev/sda1 ... [############################################################################] Copying /dev/sda2 ... [########################################------------------------------------]