Commit Graph

9948 Commits

Author SHA1 Message Date
Richard W.M. Jones
6213bd0448 Version 1.36.0. v1.36.0 2017-02-28 09:18:05 +00:00
Richard W.M. Jones
97fb893878 docs: Finalize release notes for libguestfs 1.36 release. 2017-02-27 23:10:25 +00:00
Richard W.M. Jones
d2b56f08f0 lib: Require libmagic.
If libmagic isn't installed then the guestfs_file_architecture API
doesn't work.  This means that inspection will always return
<arch>unknown</arch> for every guest.  This subtly breaks a few
features.  In particular it was reported that the
virt-builder/virt-customize --install option did not work because the
"unknown" architecture of the guest was not compatible with the host.

libmagic is a small, widely available C library, so the easiest fix is
just to make it mandatory.

Reported by: Solarix on IRC
2017-02-27 12:16:07 +00:00
Richard W.M. Jones
f6ece2c01a v2v: -o qemu: Refactor generation of the qemu shell script.
This change refactors how the qemu shell script is generated, making
it a bit less likely that we'll get the quoting wrong.  Parameters are
now added to a list, unquoted, and all quoting is done when printing
out the list.

Checked by running virt-v2v -o qemu before and after the change and
manually comparing the output (which is not identical, but still
correct).
2017-02-26 13:31:12 +00:00
Richard W.M. Jones
5982b9f7de v2v: -o rhv: Remove unused exported function.
In fact mount_and_check_storage_domain is not used by -o vdsm, and
hasn't been used since commit 889e555168.
2017-02-25 20:32:30 +00:00
Richard W.M. Jones
073a5cd976 v2v: Various whitespace or other very minor cleanups. 2017-02-25 20:20:05 +00:00
Richard W.M. Jones
eb4357b767 v2v: Move libvirt XML output code into a new module.
Just code motion.

Analogous to commit 512e5fd858.
2017-02-25 20:20:05 +00:00
Richard W.M. Jones
012577e0a4 v2v: Fix comment so it refers to new parse_libvirt_xml.ml file.
Fixes commit 512e5fd858.
2017-02-25 19:59:54 +00:00
Richard W.M. Jones
50f544d971 tests: regressions: Move another test to use $TEST_FUNCTIONS.
Omitted from commit a1b3d8d04b.
2017-02-25 17:12:29 +00:00
Richard W.M. Jones
512e5fd858 v2v: Move libvirt XML parsing code into a new module.
Just code motion.
2017-02-25 12:57:49 +00:00
Richard W.M. Jones
2a29cf90fa v2v: -i libvirtxml: Modify get_drive_slot calls.
Just a small refactoring to make the function safer to use.
2017-02-25 12:39:14 +00:00
Richard W.M. Jones
124e7bfd15 v2v: -i libvirt: Move comments.
Just whitespace changes.
2017-02-25 12:29:35 +00:00
Richard W.M. Jones
d4d526c109 v2v: Fix incorrect skips in tests.
Fixes commit a1b3d8d04b.
2017-02-24 20:59:17 +00:00
Richard W.M. Jones
b105f81783 mllib: Move VIRT_TOOLS_DATA_DIR calculation to common code.
Share the computation of $VIRT_TOOLS_DATA_DIR in a single place.
Use of 'lazy' ensures it is computed at most once.
2017-02-24 20:43:41 +00:00
Richard W.M. Jones
6070f70e54 docs: release notes: add-domain now supports libvirt secrets.
Thanks: Pino Toscano
2017-02-24 17:37:55 +00:00
Richard W.M. Jones
a117382828 docs: Update release notes for libguestfs 1.36 release. 2017-02-24 16:58:57 +00:00
Richard W.M. Jones
e53ee5befa docs: Test release on aarch64, ppc64 and ppc64le.
Before a stable release, we will now test on aarch64, ppc64
and ppc64le.
2017-02-24 16:09:53 +00:00
Pino Toscano
f27d19485c v2v: document Convert_linux as more generic
Make the documentation in Convert_linux more generic than just
Enterprise distros using RPM.  Also, rename the name of the module from
"enterprise-linux" to simply "linux".
2017-02-24 16:59:06 +01:00
Pino Toscano
b927172f85 v2v: document Debian/Ubuntu support 2017-02-24 15:52:28 +01:00
Richard W.M. Jones
814786334e Version 1.35.28. v1.35.28 2017-02-24 13:08:50 +00:00
Richard W.M. Jones
ba1e9f8bfc docs: Begin updating release notes for libguestfs 1.36. 2017-02-24 13:08:37 +00:00
Pino Toscano
8066b34b60 inspect: read more fields for RPM packages
In particular, read the URL, and both the summary and the description.
2017-02-24 14:01:31 +01:00
Pino Toscano
ca997dce6c inspect: read more fields for Debian packages
In particular, read the URL, the source name, and both the summary and
the description.  For the long description, add a small system to read
continuation lines.

Adapt the expected result of virt-inspector for Debian and Ubuntu phony
guests, so test-virt-inspector.sh still passes.
2017-02-24 14:01:31 +01:00
Pino Toscano
a920c94870 inspect: add source and summary to internal add_application
This way source and summary can be specified for any package read from
the guest.
2017-02-24 14:01:31 +01:00
Richard W.M. Jones
8e6f6305c2 po-docs: Fix mistranslated message in Ukrainian file.
A message was translated without the trailing \n.  As it was in a
verbatim section of POD, I actually reverted the whole translation.

The error was:

  ./uk.po:53533: 'msgid' and 'msgstr' entries do not both end with '\n'
  msgfmt: found 1 fatal error

In fact po4a (or whatever calls msgfmt) seems to ignore the error and
continues which is another problem.

Fixes commit 794b6a1acf.
2017-02-24 12:54:06 +00:00
Richard W.M. Jones
1e2555c1b8 po-docs: Add cs to lingas_not_translated.
Commit 794b6a1acf added cs.po, but
because this wasn't also added to lingas_not_translated the file was
not included in EXTRA_DIST or processed properly.

Fixes commit 794b6a1acf.
2017-02-24 12:53:42 +00:00
Richard W.M. Jones
7d0ed596c2 po-docs: ja: Fix internal link L</...> which was translated.
Compiling po-docs/ja/guestfish.pod failed with:

  Pod input around line 277: L<> starts or ends with whitespace
  Pod input around line 362: L<> starts or ends with whitespace

I reverted the part of the L</...> link which had been translated.

The fix isn't quite correct -- headings *can* be translated, and the
corresponding internal links should be translated too.  However
pod2man has problems dealing with such links and in any case the
partial translation was not correct, so revert to the English version
of the link.

Updates commit 794b6a1acf.
2017-02-24 12:36:45 +00:00
Richard W.M. Jones
57d17ca301 mllib: visit: Initialize CAMLlocal-allocated value.
Somewhere between OCaml 4.01 and OCaml 4.04, <caml/memory.h> changed
the way that CAMLlocalX() values on the stack are initialized.  In
OCaml 4.01:

  #define CAMLlocal1(x) \
    value x = 0; \
    CAMLxparam1 (x)

but in OCaml 4.04:

  #define CAMLlocal1(x) \
    value x = Val_unit; \
    CAMLxparam1 (x)

The code in mllib/visit-c.c assumed that the value would be
initialized to Val_unit, and used a check (exn != Val_unit) to see if
the value had been updated.  This failed badly (with a segfault) on
OCaml 4.01 in Debian 8.

Resolve this by always initializing CAMLlocalX() values before use.
2017-02-24 04:59:57 -05:00
Richard W.M. Jones
8b950deb26 v2v: Add a utility function for testing if the backend is libvirt.
This also fixes one of the places where we checked this so it now
recognizes both "libvirt" and "libvirt:...".
2017-02-24 09:05:30 +00:00
Richard W.M. Jones
ad9e9c98b5 v2v: Rename Domainxml -> Libvirt_utils.
The name 'Domainxml' made no sense.
2017-02-24 09:05:30 +00:00
Richard W.M. Jones
94f44b9983 v2v: ova: Move libvirt version test to input_ova.ml.
Updates commit 90521da5d4.
2017-02-24 09:05:30 +00:00
Richard W.M. Jones
df2006b275 v2v: -i libvirt: Fix test for "json:" backing file support.
Thanks: Tomáš Golembiovský for pointing out the error and
showing how to fix it.
2017-02-23 15:42:15 +00:00
Tomáš Golembiovský
560a3682c6 v2v: tests: restore disabled OVA test
We are redy to restore the disabled test. The relevant libvirt fixes
should be available in 3.1.0.

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
2017-02-23 15:42:15 +00:00
Tomáš Golembiovský
90521da5d4 v2v: ova: check libvirt version before OVA import
Libvirt < 3.1.0 lacks enough support for json: pseudo-URLs. Notably it
does not allow use of "raw" driver that we need.

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
2017-02-23 15:42:15 +00:00
Tomáš Golembiovský
2dbf6bd7b7 v2v: ova: fix generated JSON for libvirt support
We have to be explicit about the drivers in backing file JSON in order
for libvirt to work.

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
2017-02-23 15:07:54 +00:00
Richard W.M. Jones
794b6a1acf Update translations from Zanata. 2017-02-23 15:07:46 +00:00
Richard W.M. Jones
45e046dac9 tests: Disable some tests so they don't break when ./configure --without-libvirt 2017-02-23 13:59:38 +00:00
Richard W.M. Jones
a7bd499244 tests: regressions: Ignore SIGPIPE in test.
The test tests/regressions/rhbz914931.c works by causing the daemon to
segfault while writing to it.

For reasons unknown, when configured --without-libvirt, this causes
the test to fail receiving SIGPIPE (exit code 141).  We can prevent
this by installing a signal handler to ignore SIGPIPE, so the signal
is converted to EPIPE which the code handles properly.
2017-02-23 13:59:22 +00:00
Richard W.M. Jones
c72be578c1 debian: Old qemu-img does not support -f raw -o preallocation=off
The old version of qemu-img available in Debian 8 doesn't support the
preallocation option for raw format.  However this doesn't matter
because the default is preallocation=off (ie. sparse) for old and new
versions of qemu-img so we can just omit this parameter.

Fixes commit 53317e3f07
and commit fa83b47876
and commit 74ded0dbc1.
2017-02-23 13:52:25 +00:00
Richard W.M. Jones
bf7aab615b v2v: Fix incorrect test skip.
The test should be skipped *if* uml, not unless uml.

Fixes commit a1b3d8d04b.
2017-02-23 12:52:13 +00:00
Richard W.M. Jones
e53418558a v2v: windows: Only warn on RHEV-APT if requested, install VMDP unconditionally.
Slightly change the logic for installing RHEV-APT and VMDP:

- Only warn on failure to install RHEV-APT if the output hypervisor
  requested it.  Otherwise the warning is pointless because RHEV-APT
  can't be used anyway.

- Make the warning clearer and actionable.

- Try to install VMDP unconditionally (rather than only if RHEV-APT
  failed).  It is always useful for SuSE hosts.  However don't warn if
  it's not available.
2017-02-23 09:25:49 +00:00
Richard W.M. Jones
83488cb6f3 v2v: windows: Simplify installing pnp_wait.exe.
Updates commit 09eb831e8d.
2017-02-23 09:18:28 +00:00
Richard W.M. Jones
cf85da5b7e v2v: Add fake test-data/fake-virt-tools/pnp_wait.exe for testing.
Analogous to commit f5c9357c8e.
2017-02-23 09:10:15 +00:00
Richard W.M. Jones
7a4234088b Version 1.35.27. v1.35.27 2017-02-22 22:15:53 +00:00
Richard W.M. Jones
990241f023 v2v: windows: Only try to install rhev-apt if the target is RHV (RHBZ#1161019).
Thanks: Tingting Zheng
2017-02-22 22:15:21 +00:00
Richard W.M. Jones
f5c9357c8e v2v: Add fake test-data/fake-virt-tools/vmdp.exe for testing. 2017-02-22 21:16:07 +00:00
Richard W.M. Jones
c280df7a4d v2v: windows: Simplify installing rhev-apt.exe or vmdp.exe.
This just simplifies the code and should make no functional
difference.

Updates commit c466d4cb92.
2017-02-22 21:16:07 +00:00
Richard W.M. Jones
4b465468b1 v2v: Pass output object into the conversion module.
Previously the Convert_linux conversion module depended on one feature
of the output module (#keep_serial_console).  This was extracted in an
ad-hoc way from the output module and passed as an extra parameter to
the conversion module.

Instead of doing it this way, just pass the output module into the
conversion module, so it can call output#keep_serial_console itself.

This is just a simplification of the existing code, but otherwise adds
no new features.
2017-02-22 21:16:01 +00:00
Pino Toscano
00bac2e5da inspect: ignore /dev/cdN devices in /etc/fstab
Non-Linux Unix guests may have static devices for CDs, so make sure to
skip them when reading /etc/fstab.  This is the same as done for
/dev/fdN devices, i.e. floppy devices.
2017-02-22 18:57:33 +01:00
Richard W.M. Jones
24d2150047 v2v: vCenter: Remove proxy environment variables (RHBZ#1354507).
Currently imports from vCenter sometimes obey proxy environment
variables (eg. $http_proxy) and sometimes don't.  The initial libvirt
connection to fetch metadata never uses the proxy, but because the
subsequent conversion and copying uses libcurl, it will pick up on
proxy environment variables.

This makes no sense, and in any case vCenter is really slow as it is
without putting another device into the data path.  Therefore ensure
that libcurl does not see any proxy environment variables by unsetting
them.
2017-02-22 15:28:40 +00:00