summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* 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 ... [########################################------------------------------------]
* rescue: Fix typo in comment.Richard Jones2010-08-261-1/+1
|
* Ignore launch() error in virt-rescue. (RHBZ#618556)Matthew Booth2010-08-261-1/+6
| | | | | launch() expects guestfsd to start, which it never does in virt-rescue, so it always returns an error about the appliance shutting down unexpectedly.
* df: Minimize the number of times we launch the libguestfs appliance.Richard Jones2010-07-161-40/+177
| | | | | | | | | | | | | | | This commit greatly improves the performance of the 'virt-df' command by batching as many disks as possible onto a single appliance. In many situations this means the appliance is launched only once, versus one launch per domain as before. However doing it this way is a lot more complex: (1) Because of limits in Linux and virtio-blk, we can only attach 26 disks maximum at a time to the appliance. (2) We have to use LVM filters (lvm-set-filter) to confine LVM to the disks of a single guest.
* tar: Remove redundant use statement.Richard Jones2010-07-111-1/+0
|
* edit: Clean up temporary files.Richard Jones2010-07-111-2/+2
| | | | | Note to self: The 'tempfile' function does *not* default to removing files with the program exits!
* edit: Add -b (backup) option and make uploading more robust.Richard Jones2010-07-111-1/+36
|
* edit: Add -e 'expr' option to non-interactively apply expression to the file.Richard Jones2010-07-111-15/+125
| | | | (Suggested by Justin Clift).
* virt-df: Disallow -h and --csv options together (RHBZ#600977).Richard Jones2010-06-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit, if you used the -h and --csv options together you would get these warnings from virt-df: $ virt-df -h --csv Guest Virtual Machine,Filesystem,Size,Used,Available,Use% Argument "13.5G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "4.7G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "8.1G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. "/dev/vg_trick/RHEL55x64","/dev/VolGroup00/LogVol00",13,4,8,34.8% Argument "98.7M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "18.8M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "74.9M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. "/dev/vg_trick/RHEL55x64","/dev/vda1",98,18,74,19.0% We could fix this so that the human-readable numbers get written into the CSV file. However would probably be wrong for most uses of the CSV format (databases and spreadsheets) since they would not be able to interpret these human-readable numbers, or worse could misinterpret, eg. thinking that "1M" and "1G" are both 1. Therefore this commit disallows this combination of options.
* resize: Refresh the examples in the documentation.Richard Jones2010-05-251-1/+16
| | | | | | The documentation was previously very intimidating. Bring some common, simple examples up to the top of the page in a separate section.
* New API: write for creating files with fixed content (RHBZ#501889).Richard Jones2010-05-201-6/+6
| | | | | | | | | | | | | The guestfs_write call can be used to create small files with arbitrary 8 bit content, including \0 bytes. This replaces and deprecates write-file, which cannot be modified to use BufferIn because of an unfortunate choice in the ABI: the size parameter to write-file, if zero, means that the daemon tries to calculate the length of the buffer using strlen. However this fails if we pass a zero-length buffer using BufferIn because then the daemon tries to do strlen on a (really) zero length buffer, not even containing a terminating \0 character, thus segfaulting.
* virt-df: Display domains in sorted order.Richard Jones2010-05-141-1/+1
|
* Improved error if virt-inspector cannot find OSes in image (RHBZ#591142).Richard Jones2010-05-135-5/+0
|
* po: Include strings from Perl programs in the PO files (RHBZ#559963).Richard Jones2010-05-123-4/+15
| | | | | | | | | xgettext will only recognize '*.pl' as being a Perl file (otherwise it treats it as a C file and does not correctly find any strings in it). This commit also fixes two actual bugs that xgettext found in the strings in our Perl programs.
* Reduce imported functions in virt-df to ones which are actually used.Richard Jones2010-05-121-3/+1
|
* virt-rescue: Add extra options.Richard Jones2010-05-081-1/+44
| | | | This commit adds the extra options '--append', '--memsize' and '--selinux'.
* virt-rescue: Refresh documentation.Richard Jones2010-05-081-12/+45
|
* tools: Fix documentation for CurrentControlSet (thanks Yuval Kashtan).Richard Jones2010-04-301-2/+17
|
* resize: Add --LV-expand option for expanding Linux LVs.Richard Jones2010-04-121-2/+122
|