3199 Commits

Author SHA1 Message Date
Richard W.M. Jones
ced99cf69e Version 1.13.25. 1.13.25 2011-10-26 14:09:39 +01:00
Richard W.M. Jones
d64fca7b84 virt-resize: Be much more conservative about moving first partition.
Commit 2910413850 caused Windows 7
resizes to break with the 0xc0000225 boot error.

Change the --align-first auto (default) option so that it is more
conservative about when it moves the first partition.  In particular
it doesn't move it if it's already aligned (as it is for Win7), nor if
there is more than one partition (also Win7).

Tested with: Windows XP, 2003, 7, Ubuntu 10.10 and RHEL 5.
2011-10-26 13:56:18 +01:00
Richard W.M. Jones
178a6d78a8 Flush stdout for progress bars used by guestfish, virt-resize. 2011-10-26 13:55:38 +01:00
Richard W.M. Jones
119e67a92e virt-resize: Handle extended and logical partitions (RHBZ#642821). 2011-10-26 10:07:26 +01:00
Richard W.M. Jones
f4b3351692 resize: Get the partition table type of the source disk earlier.
Also we only permit MBR (DOS) and GPT partition tables.  In theory
previously we allowed other partition table types, but it is unlikely
that it would have worked in reality.
2011-10-26 10:07:26 +01:00
Richard W.M. Jones
f223dfa29a New APIs: copy-{file,device}-to-{file,device}.
The four new APIs:
guestfs_copy_device_to_device,
guestfs_copy_device_to_file,
guestfs_copy_file_to_device, and
guestfs_copy_file_to_file
let you copy from a source to a destination, between files and
devices, optionally allowing source and destination offsets and size
to be specified.
2011-10-26 10:07:21 +01:00
Richard W.M. Jones
663b99950d ocaml: Make sure virt-resize, virt-sparsify are rebuilt if Guestfs API changes.
Add a dependency so these tools are rebuilt from scratch if the
Guestfs API changes.  This prevents the error:
"[...] make inconsistent assumptions over interface Guestfs".

This commit includes the generated changes to .depend files.
2011-10-25 14:16:47 +01:00
Richard W.M. Jones
51672634fd virt-filesystems: Add MBR partition type byte to the output.
This adds an extra column containing this information, looking
like this:

Name       Type        VFS   Label  MBR  Size  Parent
/dev/sda1  filesystem  ntfs  -      -    6.0G  -
/dev/sda1  partition   -     -      07   6.0G  /dev/sda
/dev/sda   device      -     -      -    6.0G  -

In particular you can use this to tell if a partition is an extended
partition, because the field will contain '05' or '0f'.
2011-10-25 14:02:46 +01:00
Richard W.M. Jones
47412f137f New API: part-to-partnum
This converts a partition device name (eg. /dev/sda1) to a partition
number (eg. 1).  This is useful in conjunction with the parted APIs
that mostly take a disk device + partnum.
2011-10-25 12:46:05 +01:00
Richard W.M. Jones
1e891d9007 virt-cat: Handle Windows paths and drive letters (RHBZ#693359). 2011-10-25 10:55:20 +01:00
Richard W.M. Jones
639232f2b0 Version 1.13.24. 1.13.24 2011-10-24 17:36:07 +01:00
Richard W.M. Jones
3814680423 Add test for qemu broken -machine option (RHBZ#748266).
Also add this option, if necessary, when testing for virtio-serial
support.

When the workaround is enabled, we specify machine type 'pc'.
2011-10-24 15:47:57 +01:00
Richard W.M. Jones
35900223df Revert "out-of-tree build: daemon"
This reverts commit 025dba7f80.

If build and source directories are the same, you get this error:

make[3]: Leaving directory `/home/rjones/d/libguestfs/generator'
make[2]: Circular guestfs_protocol.c <- guestfs_protocol.c dependency dropped.
make[2]: Circular guestfs_protocol.h <- guestfs_protocol.h dependency dropped.
rm -f guestfs_protocol.h
ln  guestfs_protocol.h
ln: accessing `guestfs_protocol.h': No such file or directory
2011-10-24 15:47:57 +01:00
Richard W.M. Jones
21a4cf7ef5 virt-win-reg: Document syntax for deleting keys and values (RHBZ#737944).
NB: This requires hivex >= 1.3.2 before this syntax becomes true.
2011-10-22 15:55:48 +01:00
Richard W.M. Jones
e192035bbd virt-make-fs: Refresh man page. 2011-10-22 07:29:39 +01:00
Richard W.M. Jones
c214cdc54e Fix ./configure --disable-erlang. 2011-10-21 17:31:10 +01:00
Hilko Bengen
e7ea6d06ab out-of-tree build: fixed bindtests and inspector 2011-10-21 16:42:06 +01:00
Hilko Bengen
aa67ea2b9b out-of-tree build: fix HAVE_OCAML=false case 2011-10-21 16:41:22 +01:00
Hilko Bengen
025dba7f80 out-of-tree build: daemon 2011-10-21 16:41:22 +01:00
Richard W.M. Jones
31bf0cf313 add-drive-opts: Correctly handle unreadable and unwritable files (RHBZ#747287). 2011-10-21 16:31:19 +01:00
Richard W.M. Jones
0c06d740b7 virt-make-fs: Set MBR partition type byte correctly (RHBZ#746295). 2011-10-21 16:02:34 +01:00
Richard W.M. Jones
527079aa0d lib: Common code for formatting the qemu -drive parameter.
This is just code refactoring.
2011-10-21 12:49:18 +01:00
Richard W.M. Jones
f5172902bc Allow compilation without hivex (RHBZ#723474). 2011-10-21 12:29:12 +01:00
Richard W.M. Jones
9a6e5369b2 po-docs: Force make update-po on first build from git. 2011-10-21 12:15:36 +01:00
Richard W.M. Jones
b148df4df9 Version 1.13.23. 1.13.23 2011-10-20 23:16:52 +01:00
Richard W.M. Jones
fef0ff3d86 appliance: udev-174 moves udevd to /lib/udev/udevd (instead of /sbin/udevd) 2011-10-20 23:16:52 +01:00
Richard W.M. Jones
2910413850 resize: Add --align-first auto|never|always option.
The first partition can now be aligned.  We fix the bootloader
correctly for Windows by adjusting the "Hidden Sectors" field.
2011-10-20 23:16:44 +01:00
Richard W.M. Jones
37cdd39ada resize: Add --alignment flag to allow partition alignment to be picked. 2011-10-20 16:49:15 +01:00
Richard W.M. Jones
5d8e4102b4 resize: Refactor the code for creating target partitions.
The old code mixed the business of planning the layout of the target
partitions with the creation of the target partitions.  The
replacement code separates these into two tasks: firstly we create a
new 'partitions' list with the target layout, secondly this directly
drives the creation of the partitions.

As part of this change I have *removed* the old code that was supposed
to handle extended/logical MBR partitions.  It simply didn't work, and
didn't have any hope of working, and there is a separate bug open to
fix it.
2011-10-20 16:48:30 +01:00
Richard W.M. Jones
9f19895604 resize: Remove p_size field from partitions structure.
This field simply contained a duplicate copy of p_part.part_size.

There is no functional change in this commit.
2011-10-20 14:53:13 +01:00
Richard W.M. Jones
040b6cb061 Update RELEASE-NOTES. 2011-10-20 10:58:21 +01:00
Richard W.M. Jones
41260de67f Version 1.13.22. 1.13.22 2011-10-19 17:37:25 +01:00
Richard W.M. Jones
f354f9b4fd Pushed and pulled latest translations from Transifex.
Fixed one bug in the nl PO file:

msgid "security: cached appliance %s is not owned by UID %d"
msgstr "beveiliging: UID %d is geen eigenaar van toepassing %s in cache"

should be:

msgid "security: cached appliance %s is not owned by UID %d"
msgstr "beveiliging: UID %2$d is geen eigenaar van toepassing %1$s in cache"
2011-10-19 17:32:14 +01:00
Richard W.M. Jones
c46bedf925 inspection: Return root devices sorted. 2011-10-19 16:27:38 +01:00
Matthew Booth
6aa3ece129 inspect: Handle cciss devices in /etc/fstab 2011-10-19 16:27:38 +01:00
Matthew Booth
f5c9f0e9ee inspect: Don't assume number of captures in match functions
It is possible for the pcre library to return a variable number of captures for
a single regular expression. e.g.:

  ^/dev/(cciss/c\d+d\d+)(?:p(\d+))?$

This will return either 1 or 2 captures depending on whether the device has a
partition suffix. The current match wrappers don't allow for this, and require
that a predictable number of matches are returned.

This change updates match, match1, match2, and match3 to ignore the specific
number of matches returned. Instead, any returned captures are assigned to the
given arguments, and any remaining arguments are set to NULL.
2011-10-19 16:27:38 +01:00
Matthew Booth
a1df33eac2 inspect: Add drive naming hints
We currently use a heuristic to guess how drive names we find
referenced in the guest map to drive names in the appliance. If this
heuristic fails it can cause inspection to fail.

This change adds a new 'name' option to add_drive_opts, which allows
the user to explicitly pass the name of a drive to libguestfs if it is
known. This change also updates the fstab-parsing inspection code to
use this information if it is available.
2011-10-19 16:27:38 +01:00
Matthew Booth
1f615fddaf NFC: Remove unnecessary goto 2011-10-19 16:27:38 +01:00
Matthew Booth
f1041e912b launch: Store drive information in guestfs_h
This is a NFC on its own, but provides a place-holder for drive metadata which
can be used after launch.

Fixes by RWMJ:

 - Fix the tests: this requires a new internal function 'debug-drives'
   that dumps out the g->drives information so it can be checked in
   two of the tests.  Previously these tests used 'debug-cmdline'.

 - Test file existence / use_cache_off in the add_drive_opts function,
   not when launching qemu in the child process.

 - Call free along error paths.

 - Add comments.
2011-10-19 16:26:42 +01:00
Matthew Booth
472f02d08b inspect: Fix fstab device mapping for >26 disks
The regular expression matching disk name assumed that there was only a single
letter suffix. This change handles a naming scheme for any number of disks.
2011-10-19 16:26:42 +01:00
Richard W.M. Jones
138e118d62 launch: Ensure g->cmdline is allocated before assigning g->cmdline[0]. 2011-10-19 16:26:39 +01:00
Richard W.M. Jones
2f6ec8b4da valgrind: guestfish -i: free strings before exit.
This isn't really necessary, but it keeps valgrind happy.
2011-10-19 14:05:21 +01:00
Richard W.M. Jones
6d7d645cdd Ubuntu 11.10: Create /run and /run/lock if not already.
In real machines these directories are a ramdisk.
2011-10-18 15:22:04 +01:00
Richard W.M. Jones
b288a1b971 virt-sysprep: Fix link in documentation. 2011-10-17 15:26:43 +01:00
Richard W.M. Jones
cf4cc11433 Skip guestmount and virt-sysprep tests if no /dev/fuse. 2011-10-17 09:59:43 +01:00
Richard W.M. Jones
8cf06ddcdd virt-sysprep: Fix test to use guestmount and virt-inspector binaries that have been built. 2011-10-15 17:51:16 +01:00
Richard W.M. Jones
af0c123be8 appliance: Fedora cryptsetup-luks renamed to cryptsetup.
Therefore we need both names to be listed in the file.
2011-10-14 22:08:20 +01:00
Richard W.M. Jones
db499d98e7 roadmap: Fix Bugzilla URL. 2011-10-14 22:08:14 +01:00
Richard W.M. Jones
bd1cc12731 More TODO items. 2011-10-14 18:22:46 +01:00
Richard W.M. Jones
8b2ebe07c2 Update RELEASE-NOTES file. 2011-10-14 18:14:59 +01:00