Commit Graph

7144 Commits

Author SHA1 Message Date
Richard W.M. Jones
bced8f5289 FAQ: Note that update-guestfs-appliance is not needed with libguestfs >= 1.26. 2014-09-17 16:33:55 +01:00
Richard W.M. Jones
58a285b5b3 Version 1.27.48. 1.27.48 2014-09-17 15:51:30 +01:00
Richard W.M. Jones
0fabe1a2ed daemon: parted: Fix error message when part-get-name is called on non-GPT (RHBZ#1142416).
The error message was bogus, fix it.

This fixes commit 0316d24770.

Found by: Lingfei Kong
2014-09-17 15:36:15 +01:00
Richard W.M. Jones
5fcc584c34 daemon: parted: Don't crash if part-get-name called on non-partitioned device (RHBZ#1142158).
If do_part_get_parttype returns NULL, then return from the function
instead of dereferencing the NULL pointer and crashing.  Note that
do_part_get_parttype has already called reply_with_error in this case.

This fixes commit 0316d24770.

Found by: Lingfei Kong
2014-09-17 15:34:03 +01:00
Richard W.M. Jones
0710510732 v2v: Reconfigure /etc/modprobe.conf (RHBZ#1141145).
More code that was omitted during the translation of old virt-v2v.
2014-09-17 15:13:33 +01:00
Richard W.M. Jones
f982ce2703 v2v: Rebuild initrd last.
Old virt-v2v rebuilt the initrd late.  Currently we rebuild the initrd
right after choosing a kernel, but it's best to update the initrd
at the end since mkinitrd may depend on other configuration files
that we are changing (especially see next commit).
2014-09-17 15:13:21 +01:00
Richard W.M. Jones
5fed8dfae1 v2v: -o rhev: Don't quote 'root' in error message. 2014-09-17 13:59:39 +01:00
Richard W.M. Jones
dd58cde929 v2v: -o rhev: Chown the image files and metadata after the upload. 2014-09-17 13:59:26 +01:00
Richard W.M. Jones
d5001304e4 v2v: Fix OVF VmType field, which should be 0 or 1 (RHBZ#1142008).
Thanks: Shahar Havivi.
2014-09-17 13:07:17 +01:00
Richard W.M. Jones
05f665166c v2v: Fix capitalization of ovf:volume-type (RHBZ#1142008).
Thanks: Shahar Havivi.
2014-09-17 13:07:17 +01:00
Richard W.M. Jones
fe36b2ce95 v2v: -o rhev/vdsm: Fix ovf:size and ovf:actual_size fields (RHBZ#1142008).
These are integers in gigabytes (2^30).

Thanks: Shahar Havivi.
2014-09-17 13:07:17 +01:00
Richard W.M. Jones
7739a6d357 v2v: If virtio is enabled, map device names to vd* (RHBZ#1142004).
The old virt-v2v code had:

    my $prefix;
    if ($virtio) {
        $prefix = 'vd';
    } elsif ($libata) {
        $prefix = 'sd';
    } else {
        $prefix = 'hd'
    }

The translated code dropped the test for virtio by accident, which
meant that device names would be mapped to sd* or hd* even if the
virtio-blk driver was enabled for the guest.

Thanks: Tingting Zheng
2014-09-17 12:13:42 +01:00
Richard W.M. Jones
4178bdc9b4 sysprep: Clarify the documentation for 'flag-reconfiguration'.
It was quite obscure what this actually did.  Make it clear
in the documentation.
2014-09-17 11:52:34 +01:00
Richard W.M. Jones
f722571c73 sysprep: Clarify when --mount-options is used and what it does (RHBZ#1142186). 2014-09-16 16:46:34 +01:00
Richard W.M. Jones
9aeaace779 Version 1.27.47. 1.27.47 2014-09-16 16:43:28 +01:00
Richard W.M. Jones
01b25d7fc6 v2v: Add xvda -> sda etc mappings (RHBZ#1142004).
For Xen guests, a device can be presented twice as (eg) xvda and sda,
and therefore we should map any otherwise unmapped xvdX.

For non-Xen guests, this should have no effect.
2014-09-16 16:20:15 +01:00
Richard W.M. Jones
d86016da8e v2v: Fix for 'grubby: bad argument --set-kernel: unknown option' (RHBZ#1141145).
I made a mistake while translating the Perl conversion code and
transcribed --set-default as --set-kernel.  grubby has no --set-kernel
option so it failed.

Thanks: Tingting Zheng
2014-09-16 15:49:34 +01:00
Richard W.M. Jones
a7147ce9ff run: Add p2v to the PATH. 2014-09-16 08:38:05 +01:00
Richard W.M. Jones
8856fadadb v2v: Prevent conversion of "blocked" and "paused" domains also.
Previously only "running" domains were blocked from conversion.
However "blocked" is essentially the same as running (on Xen it just
means the domain is running but waiting on an I/O resource).  And
"paused" domains probably shouldn't be converted either since their
disks are only crash-consistent.
2014-09-16 08:38:04 +01:00
Richard W.M. Jones
77b371b18b v2v: Clarify the missing input format error message (RHBZ#1141723). 2014-09-15 11:31:55 +01:00
Richard W.M. Jones
21c6c70378 Version 1.27.46. 1.27.46 2014-09-15 11:03:35 +01:00
Richard W.M. Jones
1dd485e500 v2v: Allow pool UUID to be used in -os parameter (RHBZ#1141631).
Thanks: Zhou Junqin.
2014-09-15 10:17:01 +01:00
Richard W.M. Jones
47251a3599 v2v: Allow domain UUID to be used in place of libvirt guest name (RHBZ#1141680).
Thanks: Zhou Junqin.
2014-09-15 10:15:54 +01:00
Richard W.M. Jones
a417287e0a v2v: domainxml: Rework libvirt error handling.
Don't rely on libvirt's implicit print-to-stderr.  Instead make sure
that libvirt error messages are raised in the exception message.

Also allow error strings to be translated.
2014-09-15 10:13:09 +01:00
Richard W.M. Jones
be1385d2cb Revert "v2v: -i libvirtxml: Give an error if local disks are not readable (RHBZ#1140946)."
This commit breaks remote disks.  See:
https://bugzilla.redhat.com/show_bug.cgi?id=1141654

This reverts commit 73c1f1cf7e.
2014-09-15 09:46:30 +01:00
Hilko Bengen
7039d0e7f6 Generate *.cmx targets only if a native OCaml compiler exists 2014-09-14 21:21:25 +02:00
Richard W.M. Jones
50d5d4b723 v2v: Add stringMap.mli (interface).
Hopefully this should fix the incorrect build problem.  See discussion
here:

https://www.redhat.com/archives/libguestfs/2014-September/msg00071.html

The interface was generated using 'ocamlc -i'.
2014-09-14 19:03:28 +01:00
Richard W.M. Jones
a18c2aca14 Revert "Use ocamldep -all option."
This reverts commit a3881445ef.

See discussion on the mailing list:

https://www.redhat.com/archives/libguestfs/2014-September/msg00069.html
2014-09-14 18:46:49 +01:00
Richard W.M. Jones
48604913db Version 1.27.45. 1.27.45 2014-09-14 14:02:12 +01:00
Richard W.M. Jones
4515413217 daemon: Run udev_settle after pwrite-device finishes (RHBZ#1141451).
When you call close on any block device, udev kicks off a rule which
runs blkid to reexamine the device.  We need to wait for this rule to
finish running since it holds the device open and can cause other
operations to fail, notably mkfs.

(cherry picked from commit a9c8123c72)
2014-09-14 12:57:53 +01:00
Richard W.M. Jones
974c4cd015 appliance: Add comment with udev debugging option. 2014-09-14 12:26:37 +01:00
Richard W.M. Jones
88dea54803 v2v: -o rhev/vdsm: In --no-copy case, use estimate for ovf:actual_size (RHBZ#1140156). 2014-09-14 12:19:56 +01:00
Richard W.M. Jones
3e2f89a74f v2v: Fix variable name usage_mb -> usage_gb.
It's actually storing usage in gigabytes, not megabytes.
2014-09-14 12:19:56 +01:00
Richard W.M. Jones
5a620137bf v2v: Estimate the amount of space required on the target.
Estimate the amount of space required on the target by each source
disk after conversion.  The estimate is approximately a ceiling on
this, and actual use should be considerably lower.

Provide an extra output method (#check_target_free_space) which output
modules may use to check that there is sufficient free space to
proceed, before conversion starts.  None of the output modules
actually implement this at the moment.
2014-09-14 12:19:56 +01:00
Richard W.M. Jones
f084fec381 v2v: Introduce Types.mpstats struct storing mountpoint statistics.
This is just code refactoring.
2014-09-13 14:54:39 +01:00
Richard W.M. Jones
b7bdb63d89 tools: Check for dangling --format parameters (RHBZ#1140894).
In most C tools, virt-sysprep and virt-customize, you have to put the
--format parameter before the corresponding -a parameter.  ie.  The
following is correct:

  guestfish --format qcow2 -a disk1 -a disk2

But the following is incorrect.  The --format parameter is dangling
and prior to this commit would have been silently ignored:

  guestfish -a disk1 -a disk2 --format qcow2

After this change, dangling --format parameters now lead to an error:

  guestfish: --format parameter must appear before -a parameter

In virt-customize, also check that --attach-format parameter appears
before --attach parameter.

Thanks: Lingfei Kong
2014-09-13 10:49:58 +01:00
Richard W.M. Jones
7845bcc20f Version 1.27.44. 1.27.44 2014-09-12 22:44:07 +01:00
Richard W.M. Jones
764cbd5f69 sysprep: Use 'error' function consistently throughout the program. 2014-09-12 22:29:49 +01:00
Richard W.M. Jones
f1390d3d7a sysprep: Ensure error handler surrounds all the code so we catch and print all errors. 2014-09-12 22:20:17 +01:00
Richard W.M. Jones
7bd7dabbd7 v2v: esx: Clarify that username can be specified in vpx:// URI (RHBZ#1141113).
If there is an authentication error when getting the session cookie,
emphasize in the error message that the username can be specified in
the URI.

Unfortunately libvirt asks for the username previously, but we cannot
access that.
2014-09-12 22:06:06 +01:00
Richard W.M. Jones
7836aa523b v2v: Add -o null mode.
In theory this discards the output.  Unfortunately in practice we have
to write the output to a temporary file and delete it (because of
limitations in qemu-img convert).
2014-09-12 20:30:34 +01:00
Richard W.M. Jones
73c1f1cf7e v2v: -i libvirtxml: Give an error if local disks are not readable (RHBZ#1140946). 2014-09-12 19:37:03 +01:00
Richard W.M. Jones
3729bc1fe1 sysprep: Check --{keep,remove}-user-accounts parameters are not used when operation is disabled (RHBZ#1141157).
You will see an error like this:

$ virt-sysprep --remove-user-accounts foo,bar -a /dev/null
virt-sysprep: error: user-accounts: --remove-user-accounts parameter was
used, but the "user-account" operation is not enabled
2014-09-12 16:41:24 +01:00
Richard W.M. Jones
5066fde8f2 sysprep: Add an optional method for checking if unused arguments were passed to disabled operations. 2014-09-12 16:41:24 +01:00
Richard W.M. Jones
0513a91d2e sysprep: Replace --user-accounts option with --{remove,keep}-user-accounts.
The --user-accounts option, with its double-negative '-' prefix on
user names, is confusing.  Replace it with '--remove-user-accounts'
and '--keep-user-accounts' options.

This updates commit 128d474095.
2014-09-12 16:41:24 +01:00
Richard W.M. Jones
e1ed66e2b1 v2v: If non-Xen and Xen initrds match a kernel, take shortest name (RHBZ#1141145).
Thanks: Tingting Zheng.
2014-09-12 15:51:12 +01:00
Richard W.M. Jones
44907763a6 v2v: Fix --help documentation of -o glance option.
Thanks: Junqin Zhou
2014-09-12 12:41:26 +01:00
Richard W.M. Jones
8f1ce3a72f Version 1.27.43. 1.27.43 2014-09-11 19:38:10 +01:00
Richard W.M. Jones
b67da2524f v2v: Split off -o vdsm mode from -o rhev (RHBZ#1140156).
-o rhev: This is "traditional" output to a RHEV-M Export Storage Domain.
It requires no cooperation from RHEV itself, and in all other respects
works the same way as old virt-v2v did.

-o vdsm: This is the new mode which requires VDSM cooperation.  VDSM
manages the conversion, creating the directories, suggesting UUIDs,
and cleaning up on failure.  This allows direct import into a Data
Domain.

The --rhev* command arguments now only apply to -o vdsm, and therefore
have been renamed to --vdsm*

The --vmtype command line argument may be used with -o rhev or -o vdsm.
2014-09-11 19:38:00 +01:00
Richard W.M. Jones
4c25f48bba v2v: Move some utility functions into Lib_ovf module.
This is just code refactoring and has no functional effect.
2014-09-11 16:23:00 +01:00