| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
| |
The format parameter is taken from libvirt if available, else
the user should supply the '--format' parameter (eg. for local
disk files).
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This fixes virt-df --csv when used with libvirt domains that contain
quotes, spaces, commas and other lesser-used characters.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ...
[########################################------------------------------------]
|
| |
|
|
|
|
|
| |
launch() expects guestfsd to start, which it never does in virt-rescue, so it
always returns an error about the appliance shutting down unexpectedly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Note to self: The 'tempfile' function does *not* default to
removing files with the program exits!
|
| |
|
|
|
|
| |
(Suggested by Justin Clift).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The documentation was previously very intimidating. Bring some
common, simple examples up to the top of the page in a separate
section.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This commit adds the extra options '--append', '--memsize' and '--selinux'.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
This option lists out block devices separately:
$ virt-list-partitions -lht /tmp/WindowsResized.img
/dev/sda1 ntfs 100.0M
/dev/sda2 ntfs 11.9G
/dev/sda device 12.0G
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes the 'Use%' field in the output so it matches what
coreutils' 'df' command would print.
Firstly we change the calculation to use the space available to root,
not the space available to non-root. This means it matches what 'df'
when run as root in the guest would show.
Secondly we display this rounded up to the next whole percent (ie. using
ceil), which is also what 'df' does.
Thirdly we change the regression test so it tests this.
Note that even with these changes you are not guaranteed to get precisely
the same figures from inside and outside the guest, as it depends on
how quiescent the guest is and how recently the superblock was synced.
Thanks: Rita Wu
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes the semi-independent hivex library into a
separate upstream project. The git repo for hivex is now:
http://git.annexia.org/?p=hivex.git;a=summary
Downloads of hivex are available here:
http://libguestfs.org/download/
All questions, patches, bugs etc should be sent to the libguestfs
mailing list and bug tracker.
|