Commit Graph

11232 Commits

Author SHA1 Message Date
Pino Toscano
02890096d5 builder: templates: set "unassigned" hostname
By default the installer will set the hostname to what the DHCP returns,
exposing details of the machine where make-template.ml runs.

Instead, force "unassigned-hostname.unassigned-domain" as hostname, so
plays nicely with the hostname setting code in virt-customize.
2019-09-26 13:32:50 +02:00
Richard W.M. Jones
aee0f3b011 website: Update index file. 2019-09-20 10:34:45 +01:00
Richard W.M. Jones
7050f4a6a6 erlang: Avoid deprecation warnings.
According to the Erlang website:

  The old legacy erl_interface library (functions with prefix erl_) is
  deprecated as of OTP 22, and will be removed in OTP 23. This does
  not apply to the ei library. Reasonably new gcc compilers will issue
  deprecation warnings. In order to disable these warnings, define the
  macro EI_NO_DEPR_WARN.

That's a shame and probably means we will have to drop the Erlang
bindings soon unless someone ports them to this new API (stable APIs
FTW people!).  In the meantime add the flag to prevent warn-errors
about deprecation.
2019-09-20 10:34:45 +01:00
Pino Toscano
29dc045bc6 v2v: -o rhv-upload: use same tmpdir for Python scripts
Make use of the temporary directory of the rhv-upload mode also for the
Python scripts that the mode creates, instead of creating new
directories.
2019-09-20 11:14:07 +02:00
Pino Toscano
b659d044f7 v2v: add optional tmpdir parameter for Python_script
Add an optional parameter for Python_script.create, to specific the
temporary directory to use instead of creating a new one.
2019-09-20 11:11:38 +02:00
Pino Toscano
977fac2012 v2v: linux: do not install qemu-guest-agent if already installed
In case qemu-guest-agent is already installed in the guest, then do not
attempt to install it again.

Reported by Martin Kletzander.
2019-09-20 11:11:38 +02:00
Pino Toscano
1311842a64 v2v: linux: install linux tools after unconfigurations
Install the new tools after removing the old hypervisor tools.

It should not change the result of the conversion.
2019-09-20 11:11:38 +02:00
Pino Toscano
537ba8357e v2v: -o rhv-upload: add -oo rhv-disk-uuid option
This way it is possible to override the UUIDs of the uploaded disks,
instead of letting RHV generate them.

This can be useful to force certain UUIDs, and to specify the disks in
--no-copy mode (which now can be used).
2019-09-20 11:11:38 +02:00
Pino Toscano
0a9d7efb40 v2v: -o rhv-upload: check for a valid image transfer right away
Check for the INITIALIZING state of the image transfer right away,
without waiting 5 seconds even before the first time: this way, if the
transfer is already in the right state then there is no need to wait.
2019-09-20 11:11:38 +02:00
Pino Toscano
0f3686e9ed v2v: -o rhv-upload: cancel disk transfer on open failure
Make sure to cancel the trasfer in RHV in case of failure during the
open/creation of the disk in RHV, so it is automatically removed.
2019-09-20 11:11:38 +02:00
Martin Kletzander
da71714a9a build: Move po subdir after everything else except po-docs
Otherwise it complains about missing files that it has no rules for, for example
`builder/index-parser.c`.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2019-09-20 10:01:16 +01:00
Pino Toscano
27690f55ff v2v: -o rhv-upload: adapt phony ovirtsdk4 module to recent changes
Add the missing objects, methods, variables, and relations among the
various objects.

Followup/fixes commit c49aa4fe01, and
commit 8118f28b6f.
2019-09-19 12:27:23 +02:00
Richard W.M. Jones
bbf4aeaf2b builder: templates: Add centos-7.7. 2019-09-18 10:52:12 +01:00
Richard W.M. Jones
cece35e114 builder: templates: Add rhel-7.7 kickstart and virt-install command. 2019-09-18 10:52:12 +01:00
Pino Toscano
8118f28b6f v2v: -o rhv-upload: cancel disk transfer on failure
Make sure to cancel the trasfer in RHV in case of failure during the
copying of a disk: this way, the disk can be actually removed by RHV
itself.
2019-09-17 15:04:36 +02:00
Pino Toscano
145ae3db04 v2v: -o rhv-upload: remove uploaded disks on failure
In case the whole conversion fails, run a new Python script to cleanup
all the uploaded (and finalized) disks.
2019-09-17 15:04:36 +02:00
Pino Toscano
7b93ad6a32 v2v: -o rhv-upload: collect disks UUIDs right after copy
Instead of waiting for the completion of the nbdkit transfers to get the
UUIDs of the disks, use the new #disk_copied hook to do that after each
disk is copied.

This has almost no behaviour on rhv-upload, except for the --no-copy
mode:
- previously it used to hit the 5 minute timeout while waiting for the
  finalization of the first disk
- now it asserts on the different number of collected UUIDs vs the
  actual targets; at the moment there is nothing else that can be done,
  as this assumption is needed e.g. when creating the OVF file
2019-09-17 15:04:36 +02:00
Pino Toscano
74ee936505 v2v: add output#disk_copied hook
Add a simple method in the Output class to do work right after a disk
was successfully copied.
2019-09-17 15:04:36 +02:00
Pino Toscano
2b39c27b7f v2v: -o rhv-upload: tell whether a SD actually exists
If there is no DC with the specified storage domain attached to it, it
can mean that the SD does not exist.
2019-09-17 15:04:36 +02:00
Pino Toscano
c49aa4fe01 v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
Improve the way the precheck script checks for the specified resources:
- look directly for a data center with the specified storage domain
- get the storage domain object from the storage domains attached to the
  data center found
- similarly, look for the specified cluster among the ones attached to
  the data center found
When everything is found, return the UUID of the storage domain, and of
the cluster back to virt-v2v, which will store them.

Similarly, rework the createvm script to directly get the requested
cluster, instead of looking for it once again.  Also, since the UUID of
the storage domain is available in virt-v2v already, use it directly
instead of using a placeholder.

This should fix a number of issues:
- unexisting/unattached storage domains are rejected outright
- the cluster is rejected if not part of the same data center of the
  selected storage domain
- renaming the specified storage domain during the data copying will not
  cause the conversion to fail (which will still use the specified
  storage domain, no matter the new name)

Based on the hints by Daniel Erez in RHBZ#1612653.
2019-09-17 15:04:21 +02:00
Pino Toscano
cc6e2a7f9e v2v: -o rhv-upload: change precheck script to return a JSON
This way it is possible to communicate data from the precheck script
back to virt-v2v.

For now there are no results, so the resulting JSON is discarded.
2019-09-17 14:04:47 +02:00
Pino Toscano
6499fdc199 v2v: -o rhv-upload: split vmcheck out of precheck
Split the VM existance check out of the precheck script to a new vmcheck
script, and invoke that in #prepare_targets.  Invoke the precheck script
in #precheck, as now it can be run with only values of command line
options.

This does not change which checks are performed; however, an invalid
cluster name will make virt-v2v fail way earlier (even before connecting
to the source).
2019-09-17 14:03:13 +02:00
Pino Toscano
dea9636c59 Remove remaining virt-p2v bits
Remove (almost) all the remaining bits related to virt-p2v.
2019-09-10 17:52:16 +02:00
Pino Toscano
2c02adb8ba Remove virt-p2v
This removes only the tool itself, and all the bits strictly needed to
not break the build.

This is now available as separate tool in its own repository:
https://github.com/libguestfs/virt-p2v
2019-09-10 17:52:16 +02:00
Eric Blake
730642676b drives: Typo fix
Favor 'atomically' over 'atomicly'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2019-09-10 16:40:17 +01:00
Daniel Erez
eeabb3fdc7 v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
After invoking transfer_service.finalize, check operation status by
examining DiskStatus.  This is done instead of failing after a
predefined timeout regardless the status.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1680361
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Tested-by: Ilanit Stein <istein@redhat.com>
2019-09-09 17:04:18 +01:00
Chris Lamb
d58c4e79d8 Make the build reproducible
Whilst working on the Reproducible Builds effort [0] we noticed
that libnbd could not be built reproducibly.

This is due to it shipping a pod generation wrapper that
does not use/respect SOURCE_DATE_EPOCH [1] and additionally
varies the output depending on the build user's current
timezone.

(This was originally filed in Debian as #939546 [2].)

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/docs/source-date-epoch/
 [2] https://bugs.debian.org/939546

Signed-off-by: Chris Lamb <lamby@debian.org>
2019-09-06 09:42:35 +01:00
Richard W.M. Jones
a0f9553d21 html: Link within all libguestfs projects. 2019-09-05 15:11:40 +01:00
Richard W.M. Jones
74ce7332db ocaml: Change calls to caml_named_value() to cope with const value* return.
In OCaml >= 4.09 the return value pointer of caml_named_value is
declared const.

Based on Pino Toscano's original patch to ocaml-augeas.
2019-09-05 09:00:14 +01:00
Nir Soffer
fcfdbc9420 v2v: Set DISKTYPE=2 in RHV and VDSM meta files (RHBZ#1746699).
Added in virt-p2v commit:

  commit e83b6f50af34ce650063ecc520bfabab400e8e73
  Author: Matthew Booth <mbooth@redhat.com>
  Date:   Fri Mar 26 09:40:20 2010 +0000

    Add export to RHEV

    Allow guests to be written to a RHEV NFS export storage domain.

    Add 'rhev' output method and -osd command-line option.
    Example command line:

     virt-v2v -f virt-v2v.conf -ic 'esx://yellow.rhev.marston/' \
              -o rhev -osd blue:/export/export RHEL3-32

    This will connect to an ESX server and write the guest 'RHEL3-32' to
    blue:/export/export, which is a pre-initialised RHEV export storage domain.
2019-09-02 21:20:27 +01:00
Richard W.M. Jones
bf5ee2fb21 Version 1.41.4. v1.41.4 2019-09-02 19:45:12 +01:00
Richard W.M. Jones
bbe4490795 rust: Don't add Cargo.lock to EXTRA_DIST.
It's a file generated by cargo.  If cargo is not installed then this
breaks ‘make dist’.
2019-09-02 19:28:30 +01:00
Richard W.M. Jones
ad58324c70 Version 1.41.3. v1.41.3 2019-09-02 12:56:12 +01:00
Richard W.M. Jones
cce016dfe3 docs: Remove p2v/ directory from generated docs files.
make[2]: *** No rule to make target '../p2v/about-authors.c', needed by 'internal-documentation.pod'.  Stop.

Since we're going to remove the whole p2v subdirectory shortly anyway,
it was simplest to ignore the whole directory.
2019-09-02 12:34:07 +01:00
Richard W.M. Jones
e8ab5b451a Version 1.41.2. v1.41.2 2019-09-02 12:23:28 +01:00
Richard W.M. Jones
0d0c3eb1dd docs: Remove generated file common/mllibvirt/libvirt_c.c.
Avoids this error when building from git:

make[2]: *** No rule to make target '../common/mllibvirt/libvirt_c.c', needed by 'internal-documentation.pod'.  Stop.

This file doesn't have any generated docs or gettext annotations in it
so adding it to these files is useless anyway.
2019-09-02 12:22:25 +01:00
Richard W.M. Jones
2a5ea2892e Version 1.41.1. v1.41.1 2019-09-02 10:12:38 +01:00
Richard W.M. Jones
3f8609434f rust: Add more source files to EXTRA_DIST.
Fixes commit 3f7ff1b068.
2019-09-02 10:01:05 +01:00
Richard W.M. Jones
ffd0b5484d Revert "rust: Add missing file to EXTRA_DIST."
This reverts commit 9a6d162852.

(This file was later removed in
commit 3f7ff1b0689408695d21b4c50384fa24b47e5e8f.)
2019-09-02 10:01:05 +01:00
Richard W.M. Jones
15d1611889 python: Ignore -Wcast-align warnings in Python 3.8 header files.
Disable this warning/error in the Python 3.8 header files:

In file included from /usr/include/python3.8/abstract.h:837,
                 from /usr/include/python3.8/Python.h:147,
                 from actions.h:31,
                 from actions-6.c:34:
/usr/include/python3.8/cpython/abstract.h: In function '_PyVectorcall_Function':
/usr/include/python3.8/cpython/abstract.h:91:11: error: cast increases required alignment of target type [-Werror=cast-align]
   91 |     ptr = (vectorcallfunc*)(((char *)callable) + offset);
      |           ^
2019-09-02 09:00:18 +01:00
Richard W.M. Jones
451e6a7b97 python: Include <Python.h> in one place.
Previously to work around some problems in Python 2 header files we
had to include <Python.h> before any other config file.

For Python 3 which is all we really care about now this is no longer
needed.  We can move the include from three files into the local
"actions.h" file, bringing all the Python definitions and workarounds
into a single place.
2019-09-02 09:00:18 +01:00
Pino Toscano
2581d3c25e build: disable deprecated GTK stuff
We are not using deprecated GTK APIs/stuff, so make sure to not
accidentally use them, and easily catch more deprecations in the future.
2019-09-02 09:00:18 +01:00
Pino Toscano
ff7d94faf8 Copy GtkAttachOptions from GTK >= 3.4
GtkAttachOptions is part of GtkTable, which is used only with GTK < 3.4;
however, these enum values are used also in the GtkGrid version of the
code, so they are needed also when disabling deprecated stuff.

As easy solution to make the current code working without deprecated
stuff of GTK, copy the GtkAttachOptions enum when using GtkGrid (i.e.
with GTK >= 3.4).
2019-09-02 09:00:18 +01:00
Richard W.M. Jones
0731767a20 ocaml: Compile compat bytes.mli file. 2019-08-20 18:10:41 +01:00
Richard W.M. Jones
031016444a m4: ocaml: Remove unused definitions of OCAML_BYTES_COMPAT_*
These were last used in commit 024efc0f2f
and commit 8d09d716aa (both in Jul 2017).
2019-08-20 18:08:43 +01:00
Richard W.M. Jones
4b9efadce2 v2v: Fix missing backslash character in list of tests.
Fixes commit c0d95dcde8.
2019-08-20 17:43:10 +01:00
Richard W.M. Jones
2fbf9a3f94 Update gnulib.
Contains fix for a bug where it would always compile the
replacement accept4 function.

https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00029.html

Thanks: Eric Blake
2019-08-20 17:32:19 +01:00
Richard W.M. Jones
11923627cd builder: templates: Add Debian 10 (buster). 2019-08-20 16:59:56 +01:00
Richard W.M. Jones
2cd905f093 Update gnulib. 2019-08-20 16:11:49 +01:00
Richard W.M. Jones
c873e04b26 Update docs/C_SOURCE_FILES. 2019-08-20 16:11:49 +01:00