libguestfs preview for RHEL 7.4
by Richard W.M. Jones
With the release of RHEL 7.3 happening today, fixing 88 reported bugs
in libguestfs and virt-v2v, and countless other ones, it's time to
look ahead to RHEL 7.4.
Again we intend to rebase libguestfs, virt-v2v and virt-p2v:
https://bugzilla.redhat.com/show_bug.cgi?id=1359086
1359086 NEW Rebase libguestfs in RHEL 7.4
To help with testing I have set up a preview repository here:
http://people.redhat.com/~rjones/libguestfs-RHEL-7.4-preview/
As always:
(1) THE PACKAGES ARE NOT SUPPORTED! Do not contact Red Hat Support
about these packages. However you are welcome to file bugs or send
comments to <libguestfs(a)redhat.com>. The link for filing bugs is:
https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%...
(2) These packages should work on top of RHEL 7.3 or CentOS 7.3.
(3) To install the packages you should create a yum repo file like the
one below, and then use yum commands as normal:
$ cat /etc/yum.repos.d/libguestfs-RHEL-7.4-preview.repo
[libguestfs-RHEL-7.4-preview]
name=libguestfs RHEL 7.4 preview
baseurl=http://people.redhat.com/~rjones/libguestfs-RHEL-7.4-preview/
enabled=1
gpgcheck=0
Notable changes in packaging:
- The 'virt-v2v' package now only includes virt-v2v, not virt-p2v.
- To build your own virt-p2v bootable USB key, install 'virt-p2v-maker'.
- virt-v2v installs Windows virtio drivers using a new technique
which tries to make the minimal possible changes to the Windows
registry. This may create exciting new bugs, so I'm particularly
interested in further testing in this area.
- There is currently a bogus dependency on 'kernel-rt' which
shouldn't be there ... under investigation.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
7 years, 5 months
ANNOUNCE: libguestfs 1.36 released
by Richard W.M. Jones
I'm please to announce libguestfs 1.36, a library and a set of tools
for accessing and modifying virtual machine disk images.
This release represents about 7 months of work by many contributors.
I'd like to call out in particular substantial code contributions
from: Pino Toscano, Tomáš Golembiovský, Cédric Bosdonnat, Roman Kagan,
Dawid Zamirski and Matteo Cafasso. Also our testing team: Tingting
Zheng, Xiang Hua Chen, Ming Xie, Junquin Zhou and Xiaodai Wang.
Amongst the new features are substantial enhancements to virt-v2v
including support for Debian and Ubuntu guest conversions, and
conversions from AWS; a new "virt-tail" command for following log
files in guests; even more support for encrypted guests; robustness
when handling Windows guests with corrupted registries; ExFAT support;
GCC 7 support; and considerable internal code refactoring to make
things more maintainable.
Of course dozens of other features have been added, and many bugs
fixed. See the release notes below for full details.
You can get libguestfs 1.36 from here:
Main website: http://libguestfs.org/
Source: http://libguestfs.org/download/1.36-stable/
Fedora: https://koji.fedoraproject.org/koji/packageinfo?packageID=8391
Debian/experimental: https://packages.debian.org/libguestfs0
Note for distro packagers: libmagic (part of the 'file' command line
tool) is now a required build dependency. It was previously optional.
Rich.
----------------------------------------------------------------------
Release notes for libguestfs 1.36
These are also available online at:
http://libguestfs.org/guestfs-release-notes.1.html
New features
New tools
Virt-tail is a new tool for following (tailing) log files within a
guest, similar to the regular "tail -f" command.
New features in existing tools
Virt-customize, virt-get-kernel, virt-sparsify and virt-sysprep can now
handle encrypted guests (Pino Toscano).
Virt-builder and virt-customize now support --append-line, which is
useful for adding lines to the end of configuration files.
Virt-resize can now shrink and expand swap partitions (Pino Toscano).
Virt-resize can now output to non-local disks (Pino Toscano).
Virt-sysprep has a new operation called "backup-files" for removing
editor backups, and "passwd-backups" for removing /etc/passwd- and
similar.
Virt-dib can now create checksums using the new --checksum option (Pino
Toscano).
Virt-dib can now create tgz files. In addition, extended attributes
and SELinux labels are preserved in the output tar file (Pino Toscano).
Virt-dib can now create squashfs files (Pino Toscano).
Bash tab-completion is now available in every command line tool that is
shipped.
virt-v2v and virt-p2v
Conversions of Debian (6+) and Ubuntu (10.04+) guests are now supported
(Tomáš Golembiovský, Pino Toscano).
Conversions from SUSE Xen hypervisor have now been tested (Cédric
Bosdonnat).
Windows conversions may now install a program "pnp_wait.exe" which
prevents conflicts between the Windows Plug-and-Play Manager and our
own scripts that install virtio device drivers. Enabling this requires
the "pnp_wait.exe" program to be built separately (Roman Kagan).
OVA files exported from AWS can now be converted (Shahar Havivi).
When converting OVA files, in some circumstances virt-v2v can now read
disk images directly from the OVA input file instead of needing to
unpack the OVA file to a temporary directory. This can save large
amounts of disk space, and is quicker (Tomáš Golembiovský).
Virt-p2v can now be built on RHEL 5 (2007-era) Linux and RHEL 6, which
means that 32 bit and hardware with ancient fakeraid disks can be
virtualized. Binaries of virt-p2v based on these old versions of RHEL
can be found at http://oirase.annexia.org/virt-p2v/
Virt-p2v can now use nbdkit (an NBD server) as an alternative to qemu-
nbd. In addition, virt-p2v can use "socket activation" which is a more
robust method for opening the NBD listening socket. Socket activation
works with qemu-nbd or nbdkit, but requires the most up to date
versions.
To prevent timeouts during P2V conversions, virt-p2v inhibits power
saving on the physical machine, and also sends ping packets over the
ssh control and data connections.
Virt-v2v no longer removes the "Processor" and "Intelppm" nodes from
the Windows Registry.
Xen and vCenter conversions can now be done using the libvirt backend,
provided libvirt ≥ 2.1.0 is used.
/dev/srX (SCSI CD-ROM) devices are ignored (Tomáš Golembiovský).
When converting SUSE Linux guests, use /etc/modprobe.conf.local if it
exists.
Removing VMware tools from Linux guests should now work reliably (Pino
Toscano).
When converting OVA files, virt-v2v now checks the disk image hash
contained in the manifest file, whereas previously it was ignored
because of a mistake in the code. In addition, SHA256 hashes are now
supported (Tomáš Golembiovský).
When converting OVA files that contain compressed disk images, we now
trust the "ovf:compression" attribute from the metadata instead of
using content sniffing on the disk image (Tomáš Golembiovský).
A new flag --vdsm-compat has been added to -o vdsm mode, allowing more
efficient qcow2 images to be generated.
Since the RHEV product [commercially supported version of oVirt] has
now been renamed to RHV, "RHEV" was changed to "RHV" throughout the
tooling. In particular, -o rhev becomes -o rhv, although the old name
can be used for backwards compatibility.
The "RHEV-APT" utility is only installed when the output hypervisor is
oVirt or RHV.
A problem with virt-v2v running out of memory when doing an SELinux
relabel of the guest filesystem should now be resolved.
Language bindings
Setting "EXTRA_JAVAC_FLAGS" before ./configure allows you to add
arbitrary flags to "javac" when compiling the Java bindings.
Use of any libguestfs API which returned a single struct, from Perl or
Java bindings, would have leaked memory. This has now been fixed (Pino
Toscano).
Inspection
Inspection of Windows guests with mildly corrupted Windows Registry
hives should now work instead of failing with an error. This feature
requires hivex ≥ 1.3.14 (Dawid Zamirski).
For Debian guests, we can now read the URL, source name, summary and
full description of installed packages. For RPM-based guests we can
read the URL, summary and description (Pino Toscano).
Inspection of guest operating systems that use a separate /usr
partition should now work more reliably (Pino Toscano).
When parsing guest /etc/fstab, paths are reduced to a canonical form
(eg. "///usr//local//" → "/usr/local").
Inspection of btrfs subvolumes now works where the /etc/fstab options
field contains commas.
/dev/cdN devices in guest /etc/fstab are ignored (Pino Toscano).
Architectures and platforms
Stable releases are now tested on aarch64, ppc64 and ppc64le
architectures.
The RISC-V architecture is now handled as a guest, and libguestfs will
now at least compile on RISC-V (but probably not work as there is no
usable qemu at the time of writing).
Detection of S/390 and S/390x binaries and guests is now supported.
Other
ExFAT filesystems are now supported (Miles Wolbe).
Security
See also guestfs-security(1).
There were no CVEs reported in this development cycle. However some
security-related hardening was carried out as described below.
Temporary filenames are now always generated using randomness from
/dev/urandom (previously the C function random(3) was used in one
case).
The $TERM environment variable is now validated before passing it
through to the appliance kernel command line.
API
New APIs
"guestfs_aug_transform"
Exposes the Augeas "aug_transform" API (Pino Toscano).
"guestfs_find_inode"
Find files by inode number (Matteo Cafasso).
"guestfs_inspect_get_windows_software_hive"
"guestfs_inspect_get_windows_system_hive"
Return the path to the Windows "HKLM\SYSTEM" and "HKLM\SOFTWARE"
hives computed during inspection.
"guestfs_mksquashfs"
Create a squashfs filesystem from a path (Pino Toscano).
Other API changes
"guestfs_add_domain"
This call now handles libvirt file-based volumes correctly, where
previously these would have been ignored. Also handled are disks
which require libvirt authentication secrets to open (Pino
Toscano).
"guestfs_canonical_device_name"
This call will no longer incorrectly modify Linux software RAID
device names (like /dev/mdX).
"guestfs_file_architecture"
Previously the "file_architecture" API could return either of the
strings "i386" or "i486" for 32 bit x86 binaries. It now only
returns "i386" (as documented).
This API can now return the following new values: "riscv32",
"riscv64", "riscv128", "s390", "s390x".
"guestfs_hivex_open"
This now has an optional "GUESTFS_HIVEX_OPEN_UNSAFE" flag which
allows certain corrupted Windows Registry hives to be opened. This
feature requires hivex ≥ 1.3.14 (Dawid Zamirski).
"guestfs_list_partitions"
This call now returns Linux software RAID partitions.
"guestfs_part_to_dev"
This call now correctly handles partition names which include
"p<N>" (Pino Toscano).
"guestfs_set_label"
This call can now change the labels of swap partitions (Pino
Toscano).
Build changes
libmagic, the library part of the "file" command, is now required at
build time (previously optional).
GCC 7 is now supported.
"Silent rules" are now used for OCaml programs, Java bindings. To show
the full command line executed, add "V=1" on the make command line
(Pino Toscano).
Slow testing ("make check-slow") now covers: firstboot scripts in Linux
guests; v2v conversion of a selection of real Linux guests; the virt-
customize --hostname and --timezone settings; the --root-password
parameter; that the serial console works in virt-builder guests.
Large generated C source files, eg. the list of commands found in
fish/cmds.c (and many more), have been split into smaller files to
speed parallel compilation.
"make maintainer-check-extra-dist" now checks that all generated files
are included in the tarball.
The tests no longer assume that "." is in Perl's @INC, as it is going
to be removed soon (Pino Toscano).
Debian hosts using UsrMerge are now supported (Pino Toscano).
Header files and C structs can now have internal documentation using
the special "/** ... */" comments.
"@VAR@" subtitutions in "./run" are now fully quoted. This is
necessary so that (eg) "./configure PYTHON=/some/path" works robustly
if "/some/path" contains characters that need to be quoted (Hilko
Bengen).
gperf ≥ 3.1 is now supported.
Kraxel's old edk2 builds can no longer be used for UEFI support. UEFI
code is now fully free software, so use the versions bundled with your
Linux distro instead.
Virt-p2v can now be compiled on RHEL 5 (2007-era) Linux with Gtk 2.10.
Internals
The generator and mllib "Common_utils" modules are now shared from the
same source file.
A considerable amount of common code has been moved into the common
directory in the source and is now compiled only once. The mini-
libraries located under here are: common/edit, common/errnostring,
common/miniexpect, common/options, common/parallel, common/progress,
common/protocol, common/utils, common/visit, common/windows.
The directory containing the main library code has moved from src →
lib.
All tests written in shell script now use a common file of utility
functions (tests/test-functions.sh). There are several new utility
functions, mainly for skipping tests. Also these test scripts can now
use autoconf-like path variables like $abs_top_srcdir.
UEFI paths are now stored in the generator (generator/uefi.ml).
The way the generator handles actions and procedure numbers was changed
quite substantially. See generator/actions_*.ml and
generator/proc_nr.ml.
The gnulib "getprogname" module is now used everywhere when
needing/printing the program name (Pino Toscano).
perl/Guestfs.c is not translatable (Nikos Skalkotos).
Virt-builder templates moved from builder/website to builder/templates
and there is now a single unified program which can build any template.
All Windows registry utilities used by virt-customize and virt-v2v have
been moved to a common module called "Registry" under mllib.
All POSIX bindings have been moved to a new module called "Unix_utils"
under mllib.
Inspection, virt-customize and virt-v2v no longer recompute the Windows
"%systemroot%", "CurrentControlSet" or paths to the "HKLM\SYSTEM" and
"HKLM\SOFTWARE" hives in multiple places. Instead these are all
computed once (during inspection) and passed to the other tools through
various "guestfs_inspect_get_windows_*" APIs.
"/dev/pts" is now available inside the appliance, so any tools we run
which require a pty will now work (Pino Toscano).
Most OCaml warnings have been fixed.
There is now a single common function for creating temporary files
("guestfs_int_make_temp_path") (Matteo Cafasso).
The $TERM environment variable is now validated before passing it
through to the appliance kernel command line.
Useless USB and memballoon devices are no longer created in the
appliance (Laine Stump).
On aarch64 we now use virtio-pci for the appliance. This is somewhat
faster than virtio-mmio.
Use of srandom(3) and random(3) has been minimized. In particular,
temporary filenames are no longer created based on randomness returned
by random(3), but /dev/urandom is used instead.
Bugs fixed
https://bugzilla.redhat.com/1425306
typo error in virt-tail man page
https://bugzilla.redhat.com/1418283
virt-v2v: appliance runs out of memory running setfiles command
https://bugzilla.redhat.com/1417549
/usr/bin/x86_64-linux-gnu-ld.bfd.real:
../common/progress/.libs/libprogress.a(libprogress_la-progress.o):
undefined reference to symbol 'UP@(a)NCURSES_TINFO_5.0.19991023'
https://bugzilla.redhat.com/1417444
*** No rule to make target '../perl/lib/Sys/Guestfs.c', needed by
'libguestfs.pot'
https://bugzilla.redhat.com/1416941
compile of 1.34.3 fails with gperf 3.1
https://bugzilla.redhat.com/1414682
guestfs_canonical_device_name incorrectly returns /dev/sd0 for MD
devices (/dev/md0)
https://bugzilla.redhat.com/1414510
guestfs_list_filesystems does not recognize ddf partitions
https://bugzilla.redhat.com/1409023
[Debian] ldmtool not installed in the appliance
https://bugzilla.redhat.com/1404287
qemu-kvm cannot boot RHEL 7 kernel with TCG, hangs at "Probing EDD
(edd=off to disable)..."
https://bugzilla.redhat.com/1404182
RFE: virt-resize should support a URL as the outdisk
https://bugzilla.redhat.com/1401474
Importing VMs from VMware is failing with error "Inspection field
'i_arch' was 'unknown'"
https://bugzilla.redhat.com/1401320
RFE: Increate virt-sysprep coverage a bit
https://bugzilla.redhat.com/1400205
Add --vdsm-compat=1.1 flag for VDSM
https://bugzilla.redhat.com/1398070
typo error in man page
https://bugzilla.redhat.com/1392798
secrets from libvirt domains are not read
https://bugzilla.redhat.com/1390876
"--machine-readable" info should be updated in virt-v2v manual page
https://bugzilla.redhat.com/1379289
RFE: virt-p2v should support mnemonic operations
https://bugzilla.redhat.com/1378022
There is virt-v2v warning about <listen type='none'> during
converting a guest which has listen type='none' in XML
https://bugzilla.redhat.com/1377081
virt-p2v manual should update the new dialog information
https://bugzilla.redhat.com/1375157
virt-v2v: -i ova: Permission denied when using libvirt and running
as root
https://bugzilla.redhat.com/1374651
Can't install qxl driver for display device in win7 guest after
converting to glance by virt-v2v
https://bugzilla.redhat.com/1374405
There is HTTP 404 error info when convert guest to glance by
virt-v2v
https://bugzilla.redhat.com/1374232
selinux relabel fails on RHEL 6.2 guests with "libguestfs error:
selinux_relabel: : Success"
https://bugzilla.redhat.com/1372668
Process status is not normal in windows guest after converted from
kvm to rhev by virt-v2v
https://bugzilla.redhat.com/1372269
Builder does not set hostname properly for Debian 8 (Jessie)
https://bugzilla.redhat.com/1371843
Improve OVA import compatibility
https://bugzilla.redhat.com/1370424
virt-manager coredump when vm with gluster image exists
https://bugzilla.redhat.com/1367839
Cannot import VMs from Xen and VMware when using RHEL7.3 host.
https://bugzilla.redhat.com/1367738
Missing bash completion scripts for: virt-diff guestunmount virt-
copy-in virt-copy-out virt-customize virt-get-kernel
virt-p2v-make-disk virt-p2v-make-kickstart virt-tar-in virt-tar-out
virt-v2v-copy-to-local virt-win-reg
https://bugzilla.redhat.com/1367615
OVMF file which is built for rhel7.3 can't be used for virt-v2v
uefi conversion
https://bugzilla.redhat.com/1366456
Converting rhel7 host installed on RAID:warning: fstrim: fstrim:
/sysroot/: the discard operation is not supported
https://bugzilla.redhat.com/1366049
RFE: libvirt backend: support handling disks stored as volume name
in a pool
https://bugzilla.redhat.com/1365005
Guest name is incorrect if convert guest from disk image by
virt-v2v
https://bugzilla.redhat.com/1362649
RFE: virt-sysprep does not utilize libguestfs encryption support
https://bugzilla.redhat.com/1354507
virt-v2v conversions from vCenter do not consistently obey the
proxy environment variables
https://bugzilla.redhat.com/1168144
warning: fstrim: fstrim: /sysroot/: FITRIM ioctl failed: Operation
not supported (ignored) when convert win2003 guest from xen server
https://bugzilla.redhat.com/1161019
RFE: Only install RHEV-APT if virt-v2v -o rhev/-o vdsm option is
used
https://bugzilla.redhat.com/1152369
virt-v2v failed to convert RHEL 6.7 UEFI guest: no
grub1/grub-legacy or grub2 configuration file was found
https://bugzilla.redhat.com/1141631
[RFE] virt-v2v should support convert a guest to a dir-pool with
using pool's uuid
https://bugzilla.redhat.com/1134878
libvirt reports json "backing file" is missing
https://bugzilla.redhat.com/1019388
firstboot scripts (virt-builder, virt-sysprep) don't work for
Debian 6 & 7 guests
https://bugzilla.redhat.com/737600
virt-v2v windows xp - machine dies BSOD - processr,sys - workaround
provided
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
7 years, 6 months
[PATCH] sysprep: Remove DHCP_HOSTNAME= from ifcfg-* files (RHBZ#1427529).
by Richard W.M. Jones
---
sysprep/sysprep_operation_net_hostname.ml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sysprep/sysprep_operation_net_hostname.ml b/sysprep/sysprep_operation_net_hostname.ml
index 3824d42..7284d63 100644
--- a/sysprep/sysprep_operation_net_hostname.ml
+++ b/sysprep/sysprep_operation_net_hostname.ml
@@ -30,10 +30,12 @@ let net_hostname_perform (g : Guestfs.guestfs) root side_effects =
let filenames = g#glob_expand "/etc/sysconfig/network-scripts/ifcfg-*" in
Array.iter (
fun filename ->
- (* Replace HOSTNAME=... entry. *)
+ (* Remove HOSTNAME=... and DHCP_HOSTNAME=... entries. *)
let lines = Array.to_list (g#read_lines filename) in
let lines = List.filter (
- fun line -> not (String.is_prefix line "HOSTNAME=")
+ fun line ->
+ not (String.is_prefix line "HOSTNAME=") &&
+ not (String.is_prefix line "DHCP_HOSTNAME=")
) lines in
let file = String.concat "\n" lines ^ "\n" in
g#write filename file;
@@ -46,7 +48,7 @@ let op = {
defaults with
name = "net-hostname";
enabled_by_default = true;
- heading = s_"Remove HOSTNAME in network interface configuration";
+ heading = s_"Remove HOSTNAME and DHCP_HOSTNAME in network interface configuration";
pod_description = Some (s_"\
For Fedora and Red Hat Enterprise Linux,
this is removed from C<ifcfg-*> files.");
--
2.9.3
7 years, 6 months
[PATCH] lib: Require libmagic.
by Richard W.M. Jones
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
---
docs/guestfs-building.pod | 2 +-
lib/filearch.c | 20 --------------------
m4/guestfs_libraries.m4 | 7 ++++---
3 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod
index eba5ec8..53a4d94 100644
--- a/docs/guestfs-building.pod
+++ b/docs/guestfs-building.pod
@@ -177,7 +177,7 @@ Various core features will be disabled if hivex is not available.
=item libmagic
-Optional. This is the library used by the L<file(1)> command.
+I<Required>. This is the library used by the L<file(1)> command.
=item libvirt E<ge> 0.10.2
diff --git a/lib/filearch.c b/lib/filearch.c
index 2c75425..e1d3dae 100644
--- a/lib/filearch.c
+++ b/lib/filearch.c
@@ -27,9 +27,7 @@
#include <sys/wait.h>
#include <libintl.h>
-#ifdef HAVE_LIBMAGIC
#include <magic.h>
-#endif
#include "ignore-value.h"
@@ -37,8 +35,6 @@
#include "guestfs-internal.h"
#include "guestfs-internal-actions.h"
-#if defined(HAVE_LIBMAGIC)
-
# ifdef HAVE_ATTRIBUTE_CLEANUP
# define CLEANUP_MAGIC_T_FREE __attribute__((cleanup(cleanup_magic_t_free)))
@@ -364,19 +360,3 @@ guestfs_impl_file_architecture (guestfs_h *g, const char *path)
return ret; /* caller frees */
}
-
-#else /* no libmagic at compile time */
-
-/* XXX Should be an optgroup. */
-
-#define NOT_IMPL(r) \
- error (g, _("file-architecture API not available since this version of libguestfs was compiled without the libmagic library")); \
- return r
-
-char *
-guestfs_impl_file_architecture (guestfs_h *g, const char *path)
-{
- NOT_IMPL(NULL);
-}
-
-#endif /* no libmagic at compile time */
diff --git a/m4/guestfs_libraries.m4 b/m4/guestfs_libraries.m4
index ac71b39..0882d27 100644
--- a/m4/guestfs_libraries.m4
+++ b/m4/guestfs_libraries.m4
@@ -230,13 +230,14 @@ PKG_CHECK_MODULES([PCRE], [libpcre])
dnl Check for Augeas >= 1.0.0 (required).
PKG_CHECK_MODULES([AUGEAS],[augeas >= 1.0.0])
-dnl libmagic (highly recommended)
+dnl libmagic (required)
AC_CHECK_LIB([magic],[magic_file],[
AC_CHECK_HEADER([magic.h],[
AC_SUBST([MAGIC_LIBS], ["-lmagic"])
- AC_DEFINE([HAVE_LIBMAGIC],[1],[libmagic found at compile time.])
], [])
-],[AC_MSG_WARN([libmagic not found, some core features will be disabled])])
+],[])
+AS_IF([test -z "$MAGIC_LIBS"],
+ [AC_MSG_ERROR([libmagic (part of the "file" command) is required])])
dnl libvirt (highly recommended)
AC_ARG_WITH([libvirt],[
--
2.9.3
7 years, 6 months
[PATCH 1/2] v2v: document Debian/Ubuntu support
by Pino Toscano
---
v2v/virt-v2v.pod | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
index 4c7204b..ba91851 100644
--- a/v2v/virt-v2v.pod
+++ b/v2v/virt-v2v.pod
@@ -227,6 +227,10 @@ And hence L<virsh(1)>, L<virt-manager(1)>, and similar tools.
=item OpenSUSE 10 and up
+=item Debian 6 and up
+
+=item Ubuntu 10.04, 12.04, 14.04, 16.04, and up
+
=item Windows XP to Windows 8.1 / Windows Server 2012 R2
We use Windows internal version numbers, see
@@ -758,6 +762,10 @@ below.
OpenSUSE 10 kernel >= 2.6.25.5-1.1
+ Debian 6+ All versions support virtio
+
+ Ubuntu 10.04+ All versions support virtio
+
Windows Drivers are installed from the directory pointed to by
"VIRTIO_WIN" environment variable
(/usr/share/virtio-win by default) if present
@@ -792,6 +800,18 @@ RHEL 6, so you will need to update to any version E<ge> 6.3 before
performing the conversion. See also
L<https://bugzilla.redhat.com/show_bug.cgi?id=1374232>
+=head1 DEBIAN AND UBUNTU
+
+=head2 "warning: could not determine a way to update the configuration of Grub2"
+
+Currently, virt-v2v has no way to set the default kernel in Debian
+and Ubuntu guests using GRUB 2 as bootloader. This means that
+virt-v2v will not change the default kernel used for booting, even
+in case it is not the best kernel available on the guest.
+A recommended procedure is, before using virt-v2v, to check that the
+boot kernel is the best kernel available in the guest (for example
+by making sure the guest is up-to-date).
+
=head1 WINDOWS
=head2 Windows E<ge> 8 Fast Startup is incompatible with virt-v2v
--
2.9.3
7 years, 6 months
[PATCH v2 1/3] inspect: add source and summary to internal add_application
by Pino Toscano
This way source and summary can be specified for any package read from
the guest.
---
lib/inspect-apps.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/lib/inspect-apps.c b/lib/inspect-apps.c
index 1216c52..eabe565 100644
--- a/lib/inspect-apps.c
+++ b/lib/inspect-apps.c
@@ -51,7 +51,7 @@ static struct guestfs_application2_list *list_applications_deb (guestfs_h *g, st
static struct guestfs_application2_list *list_applications_pacman (guestfs_h *g, struct inspect_fs *fs);
static struct guestfs_application2_list *list_applications_apk (guestfs_h *g, struct inspect_fs *fs);
static struct guestfs_application2_list *list_applications_windows (guestfs_h *g, struct inspect_fs *fs);
-static void add_application (guestfs_h *g, struct guestfs_application2_list *, const char *name, const char *display_name, int32_t epoch, const char *version, const char *release, const char *arch, const char *install_path, const char *publisher, const char *url, const char *description);
+static void add_application (guestfs_h *g, struct guestfs_application2_list *, const char *name, const char *display_name, int32_t epoch, const char *version, const char *release, const char *arch, const char *install_path, const char *publisher, const char *url, const char *source, const char *summary, const char *description);
static void sort_applications (struct guestfs_application2_list *);
/* The deprecated guestfs_inspect_list_applications call, which is now
@@ -369,7 +369,7 @@ read_package (guestfs_h *g,
/* Add the application and what we know. */
if (version && release)
add_application (g, data->apps, entry->name, "", epoch, version, release,
- arch ? arch : "", "", "", "", "");
+ arch ? arch : "", "", "", "", "", "", "");
return 0;
}
@@ -504,7 +504,7 @@ list_applications_deb (guestfs_h *g, struct inspect_fs *fs)
else if (STREQ (line, "")) {
if (installed_flag && name && version && (epoch >= 0))
add_application (g, apps, name, "", epoch, version, release ? : "",
- arch ? : "", "", "", "", "");
+ arch ? : "", "", "", "", "", "", "");
free (name);
free (version);
free (release);
@@ -634,7 +634,7 @@ list_applications_pacman (guestfs_h *g, struct inspect_fs *fs)
if ((epoch >= 0) && (ver[0] != '\0') && (rel[0] != '\0'))
add_application (g, apps, name, "", epoch, ver, rel, arch, "", "",
- url ? : "", desc ? : "");
+ url ? : "", "", "", desc ? : "");
after_add_application:
key = NULL;
@@ -708,7 +708,8 @@ list_applications_apk (guestfs_h *g, struct inspect_fs *fs)
case '\0':
if (name && version && (epoch >= 0))
add_application (g, apps, name, "", epoch, version, release ? : "",
- arch ? : "", "", "", url ? : "", description ? : "");
+ arch ? : "", "", "", url ? : "", "", "",
+ description ? : "");
free (name);
free (version);
free (release);
@@ -880,6 +881,7 @@ list_applications_windows_from_path (guestfs_h *g,
install_path ? : "",
publisher ? : "",
url ? : "",
+ "", "",
comments ? : "");
}
}
@@ -892,6 +894,7 @@ add_application (guestfs_h *g, struct guestfs_application2_list *apps,
const char *version, const char *release, const char *arch,
const char *install_path,
const char *publisher, const char *url,
+ const char *source, const char *summary,
const char *description)
{
apps->len++;
@@ -911,8 +914,8 @@ add_application (guestfs_h *g, struct guestfs_application2_list *apps,
/* XXX The next two are not yet implemented for any package
* format, but we could easily support them for rpm and deb.
*/
- apps->val[apps->len-1].app2_source_package = safe_strdup (g, "");
- apps->val[apps->len-1].app2_summary = safe_strdup (g, "");
+ apps->val[apps->len-1].app2_source_package = safe_strdup (g, source);
+ apps->val[apps->len-1].app2_summary = safe_strdup (g, summary);
apps->val[apps->len-1].app2_description = safe_strdup (g, description);
/* XXX Reserved for future use. */
apps->val[apps->len-1].app2_spare1 = safe_strdup (g, "");
--
2.9.3
7 years, 6 months
[PATCH] inspector: validate resulting XML files
by Pino Toscano
Run xmllint to validate the XML output files of virt-inspector, so the
schema is checked against actual output of virt-inspector.
---
inspector/test-virt-inspector.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/inspector/test-virt-inspector.sh b/inspector/test-virt-inspector.sh
index 2f55cdc..33d749c 100755
--- a/inspector/test-virt-inspector.sh
+++ b/inspector/test-virt-inspector.sh
@@ -30,6 +30,8 @@ for f in ../test-data/phony-guests/{debian,fedora,ubuntu,archlinux,coreos,window
if [ -s "$f" ]; then
b=$(basename "$f" .xml)
$VG virt-inspector --format=raw -a "$f" > "actual-$b.xml"
+ # Check the generated output validate the schema.
+ xmllint --noout --relaxng $srcdir/virt-inspector.rng "actual-$b.xml"
# This 'diff' command will fail (because of -e option) if there
# are any differences.
diff -ur $diff_ignore "expected-$b.xml" "actual-$b.xml"
--
2.9.3
7 years, 6 months
[PATCH 1/3] inspect: add source and summary to internal add_application
by Pino Toscano
This way source and summary can be specified for any package read from
the guest.
---
lib/inspect-apps.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/lib/inspect-apps.c b/lib/inspect-apps.c
index 1216c52..eabe565 100644
--- a/lib/inspect-apps.c
+++ b/lib/inspect-apps.c
@@ -51,7 +51,7 @@ static struct guestfs_application2_list *list_applications_deb (guestfs_h *g, st
static struct guestfs_application2_list *list_applications_pacman (guestfs_h *g, struct inspect_fs *fs);
static struct guestfs_application2_list *list_applications_apk (guestfs_h *g, struct inspect_fs *fs);
static struct guestfs_application2_list *list_applications_windows (guestfs_h *g, struct inspect_fs *fs);
-static void add_application (guestfs_h *g, struct guestfs_application2_list *, const char *name, const char *display_name, int32_t epoch, const char *version, const char *release, const char *arch, const char *install_path, const char *publisher, const char *url, const char *description);
+static void add_application (guestfs_h *g, struct guestfs_application2_list *, const char *name, const char *display_name, int32_t epoch, const char *version, const char *release, const char *arch, const char *install_path, const char *publisher, const char *url, const char *source, const char *summary, const char *description);
static void sort_applications (struct guestfs_application2_list *);
/* The deprecated guestfs_inspect_list_applications call, which is now
@@ -369,7 +369,7 @@ read_package (guestfs_h *g,
/* Add the application and what we know. */
if (version && release)
add_application (g, data->apps, entry->name, "", epoch, version, release,
- arch ? arch : "", "", "", "", "");
+ arch ? arch : "", "", "", "", "", "", "");
return 0;
}
@@ -504,7 +504,7 @@ list_applications_deb (guestfs_h *g, struct inspect_fs *fs)
else if (STREQ (line, "")) {
if (installed_flag && name && version && (epoch >= 0))
add_application (g, apps, name, "", epoch, version, release ? : "",
- arch ? : "", "", "", "", "");
+ arch ? : "", "", "", "", "", "", "");
free (name);
free (version);
free (release);
@@ -634,7 +634,7 @@ list_applications_pacman (guestfs_h *g, struct inspect_fs *fs)
if ((epoch >= 0) && (ver[0] != '\0') && (rel[0] != '\0'))
add_application (g, apps, name, "", epoch, ver, rel, arch, "", "",
- url ? : "", desc ? : "");
+ url ? : "", "", "", desc ? : "");
after_add_application:
key = NULL;
@@ -708,7 +708,8 @@ list_applications_apk (guestfs_h *g, struct inspect_fs *fs)
case '\0':
if (name && version && (epoch >= 0))
add_application (g, apps, name, "", epoch, version, release ? : "",
- arch ? : "", "", "", url ? : "", description ? : "");
+ arch ? : "", "", "", url ? : "", "", "",
+ description ? : "");
free (name);
free (version);
free (release);
@@ -880,6 +881,7 @@ list_applications_windows_from_path (guestfs_h *g,
install_path ? : "",
publisher ? : "",
url ? : "",
+ "", "",
comments ? : "");
}
}
@@ -892,6 +894,7 @@ add_application (guestfs_h *g, struct guestfs_application2_list *apps,
const char *version, const char *release, const char *arch,
const char *install_path,
const char *publisher, const char *url,
+ const char *source, const char *summary,
const char *description)
{
apps->len++;
@@ -911,8 +914,8 @@ add_application (guestfs_h *g, struct guestfs_application2_list *apps,
/* XXX The next two are not yet implemented for any package
* format, but we could easily support them for rpm and deb.
*/
- apps->val[apps->len-1].app2_source_package = safe_strdup (g, "");
- apps->val[apps->len-1].app2_summary = safe_strdup (g, "");
+ apps->val[apps->len-1].app2_source_package = safe_strdup (g, source);
+ apps->val[apps->len-1].app2_summary = safe_strdup (g, summary);
apps->val[apps->len-1].app2_description = safe_strdup (g, description);
/* XXX Reserved for future use. */
apps->val[apps->len-1].app2_spare1 = safe_strdup (g, "");
--
2.9.3
7 years, 6 months
virt-v2v and import of Debian OVAs
by Emmanuel Kasper
Hi
Is virt-v2v able to import a debian guest from an OVA archive ?
According to the "true" in convert_linux.ml, I would have said yes
let matching = function
| { i_type = "linux";
i_distro = ("fedora"
| "rhel" | "centos" | "scientificlinux" |
"redhat-based"
| "oraclelinux"
| "sles" | "suse-based" | "opensuse") } -> true
| { i_type = "linux";
i_distro = ("debian" | "ubuntu" | "linuxmint") } -> true
| _ -> false
But an OVA import fails with:
virt-v2v --machine-readable -i ova
turnkey-wordpress-14.1-jessie-amd64.ova -o qemu -of qcow2 -os v2v/
[ 0.0] Opening the source -i ova turnkey-wordpress-14.1-jessie-amd64.ova
[ 1.2] Creating an overlay to protect the source from being modified
[ 1.2] Initializing the target -o qemu -os v2v/
[ 1.2] Opening the overlay
[ 3.5] Inspecting the overlay
[ 4.8] Checking for sufficient free disk space in the guest
[ 4.8] Estimating space required on target for each disk
[ 4.8] Converting 8.4 to run on KVM
virt-v2v: error: virt-v2v is unable to convert this guest type
(linux/debian)
Using:
virt-v2v --version
virt-v2v 1.34.3
I am using an OVA from the following location
https://www.turnkeylinux.org/download?file=turnkey-wordpress-14.1-jessie-...
Am I missing something ?
Emmanuel
7 years, 6 months