summaryrefslogtreecommitdiffstats
path: root/tools/virt-resize
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite virt-resize in OCaml.Richard W.M. Jones2011-04-091-1530/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* resize: Fix typo in man page (thanks avesh@IRC).Richard W.M. Jones2011-01-071-1/+1
|
* docs: Fix small inaccuracies in virt-resize(1).Richard W.M. Jones2010-11-271-6/+4
|
* New tool: virt-filesystemsRichard W.M. Jones2010-11-231-13/+11
| | | | | | | | 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.
* resize: Fix canonical device function (RHBZ#655554).Richard W.M. Jones2010-11-231-1/+1
|
* 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-resize: Document guest boot stops at "GRUB" (RHBZ#640961).Richard W.M. Jones2010-10-181-0/+20
|
* 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-181-0/+7
|
* 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).
* 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 ... [########################################------------------------------------]
* 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.
* resize: Add --LV-expand option for expanding Linux LVs.Richard Jones2010-04-121-2/+122
|
* resize: Fix missing newline from end of print.Richard Jones2010-04-121-1/+1
|
* resize: Fix regular expression to exactly match ^ext[234]$Richard Jones2010-04-121-1/+1
|
* virt-resize: Mention alternate tools like gparted in the documentation.Richard Jones2010-04-121-0/+17
|
* Documentation updates.Richard Jones2010-04-111-1/+1
| | | | | | | Fix copyright years. Fix URLs to point to new PRC site. Make sure guestfish(1) and guestfs(3) manpages reference the current list of tools.
* virt-resize: Enhance virt-resize so it can expand partition content.Richard Jones2010-04-101-48/+273
| | | | | | | | | Enhance virt-resize so it can expand "first level" partition content, including ext/2/3/4/ntfs filesystems and PVs. Also extensively update the documentation. This has been tested on a variety of Linux and Windows guests.
* Bugfixes for virt-resize.Richard Jones2010-04-101-19/+69
| | | | | | | | | - copy more than 64 boot loader sectors across, since real boot loaders (eg. for Windows) can be much larger than this - copy bootable flag and ID byte to new partitions - start the first partition on the new disk at the same sector offset as on the old disk - sync the disks before existing
* chmod +x virt-resize binary.Richard Jones2010-03-301-0/+0
|
* New tools: virt-resize and virt-list-partitions.Richard Jones2010-03-231-0/+983
Virt-resize is the main contribution here, a program which can be used to expand and shrink partitions in disk images. Virt-list-partitions is used as an ancillary tool for planning resize operations.