Remove remaining virt-p2v bits

Remove (almost) all the remaining bits related to virt-p2v.
This commit is contained in:
Pino Toscano
2019-07-10 18:45:44 +02:00
parent 2c02adb8ba
commit dea9636c59
20 changed files with 6 additions and 1420 deletions

View File

@@ -12,8 +12,6 @@ cat/ls.c
cat/tail.c
common/edit/file-edit.c
common/edit/file-edit.h
common/miniexpect/miniexpect.c
common/miniexpect/miniexpect.h
common/mlaugeas/augeas-c.c
common/mlgettext/dummy.c
common/mllibvirt/libvirt_c_epilogue.c

View File

@@ -76,7 +76,7 @@ I<Required>.
=item qemu-img E<ge> 1.3.0
I<Required>. Virt-p2v and virt-v2v requires qemu-img E<ge> 2.2.0.
I<Required>. Virt-v2v requires qemu-img E<ge> 2.2.0.
=item kernel E<ge> 2.6.34
@@ -272,10 +272,6 @@ Optional. Used only for testing.
Optional. qemu-nbd is used for testing.
L<virt-p2v(1)> requires either qemu-nbd or nbdkit, but these only need
to be present on the virt-p2v ISO, they do not need to be installed at
compile time.
=item uml_mkcow
Optional. For the L<UML backend|guestfs(3)/BACKEND>.
@@ -293,27 +289,6 @@ Optional. Used by virt-builder for checking digital signatures.
Optional. If available, virt-builder will use this library
for fast, parallel uncompression of templates.
=item Gtk E<ge> 2.24, or 3
Optional.
Used by the virt-p2v graphical user interface.
Either Gtk 2 or Gtk 3 can be used. If you want to select a specific
version of Gtk, use S<C<./configure --with-gtk=2>> or
S<C<./configure --with-gtk=3>>.
=item D-Bus
Optional.
If the D-Bus low level C API is available, virt-p2v can send a D-Bus
message to logind to inhibit power saving (sleep, suspend, etc) during
P2V conversions.
If this API is not available at build time, then very long conversions
might be interrupted if the physical machine goes to sleep.
=item zip
=item unzip
@@ -688,11 +663,6 @@ indicate this is I<not> a distro build.
Compile libguestfs without libvirt support, even if libvirt
development libraries are installed.
=item B<--with-gtk=2>
This option forces virt-p2v to be built against Gtk 2, which is
currently the most widely tested configuration.
=item B<--with-qemu=">bin1 bin2 ...B<">
Provide an alternate qemu binary (or list of binaries). This can be
@@ -843,29 +813,6 @@ The sources and spec files for RHEL versions of libguestfs are
available on L<https://git.centos.org/project/rpms>, and see also
L<https://wiki.centos.org/Sources>.
=head1 BUILDING i686 32 BIT VIRT-P2V
I<(This section only applies on the x86-64 architecture.)>
Building a 32 bit virt-p2v (i686) binary improves compatibility with
older hardware. See L<virt-p2v-make-disk(1)> for details. Although
virt-p2v is a simple Gtk application, it is not especially easy to
build just virt-p2v as a 32 bit application on a 64 bit host. Usually
the simplest way is to use a 32 bit chroot or even a 32 bit virtual
machine to build libguestfs.
On Fedora you can use the L<mock(1)> tool. For example:
fedpkg mockbuild --root fedora-23-i386
This will result in a F<virt-v2v-*.i686.rpm> file which can be
unpacked to extract the 32 bit virt-p2v binary.
The binary may be compressed to either F<p2v/virt-p2v.i686.xz>, or
F<$libdir/virt-p2v/virt-p2v.i686.xz> or
F<$VIRT_P2V_DATA_DIR/virt-p2v.i686.xz> as appropriate. This enables
the L<virt-p2v-make-disk(1)> I<--arch> option.
=head1 SEE ALSO
L<guestfs(3)>,

View File

@@ -94,12 +94,6 @@ The communication protocol used between the library and the daemon
running inside the appliance has to encode errnos as strings, which is
handled by this library.
=item F<common/miniexpect>
A copy of the miniexpect library from
L<http://git.annexia.org/?p=miniexpect.git;a=summary>. This is used
in virt-p2v.
=item F<common/mlaugeas>
Bindings for the Augeas library. These come from the ocaml-augeas
@@ -267,11 +261,6 @@ M4 macros used by autoconf. See L</THE BUILD SYSTEM>.
L<virt-make-fs(1)> command and documentation.
=item F<p2v>
L<virt-p2v(1)> command, documentation and scripts for building the
virt-p2v ISO or disk image.
=item F<po>
Translations of simple gettext strings.
@@ -986,78 +975,6 @@ Every other file in this directory is a support module / library of
some sort. Some code is written in C, especially where we want to use
an external C library such as libxml2.
=head2 VIRT-P2V
Virt-p2v is a front end on virt-v2v. ie. All it does is act as a GUI
front end, and it calls out to virt-v2v to perform the actual
conversion. Therefore most of the C code in the F<p2v/> subdirectory
is Gtk (GUI) code, or supporting code for talking to the remote
conversion server. There is no special support for physical machines
in virt-v2v. They are converted in the same way as foreign VMs.
=head3 Running virt-p2v
You can run the F<p2v/virt-p2v> binary directly, but it will try to
convert your machines real F</dev/sda> which is unlikely to work
well. However virt-p2v also has a test mode in which you can supply a
test disk:
make -C p2v run-virt-p2v-directly
This is a wrapper around the L<virt-p2v(1)> I<--test-disk> option.
You can control the "physical machine" disk by setting
C<PHYSICAL_MACHINE> to point to a disk image.
A more realistic test is to run virt-p2v inside a VM on the local
machine. To do that, do:
make -C p2v run-virt-p2v-in-a-vm
This also runs qemu with the "physical machine" disk (which you can
set by setting C<PHYSICAL_MACHINE>), a virtual CD, and a variety of
network cards for testing. You can change the qemu binary and add
extra qemu options by setting C<QEMU> and/or C<QEMU_OPTIONS> on the
make commandline.
A third way to run virt-p2v simulates fairly accurately the program
being downloaded over PXE and then doing an automatic conversion of
the source physical machine (the non-GUI path -- see next section
below):
make -C p2v run-virt-p2v-non-gui-conversion
=head3 Understanding the virt-p2v code
I<See also:> L<virt-p2v(1)/HOW VIRT-P2V WORKS>
There are two paths through the code, GUI or non-GUI (parsing the
kernel command line):
main.c ──────┬─────▶ gui.c ──────┬─────▶ conversion.c
│ │
│ │
└────▶ kernel.c ────┘
but both paths call back to the F<conversion.c> function
C<start_conversion> to run the remote virt-v2v.
The main task of F<gui.c>/F<kernel.c> is to populate the virt-v2v
configuration (F<config.c>).
During conversion, we need to establish ssh connections, and that is
done using two libraries:
conversion.c ──────▶ ssh.c ──────▶ miniexpect.c
where F<ssh.c> is responsible for managing ssh connections overall,
and F<miniexpect.c> implements "expect-like" functionality for talking
interactively to the remote virt-v2v conversion server.
(Note that miniexpect is a separate library with its own upstream, so
if you patch miniexpect.c, then please make sure the changes get
reflected in miniexpects upstream too:
F<http://git.annexia.org/?p=miniexpect.git;a=summary>)
=head1 MAINTAINER TASKS
=head2 MAINTAINER MAKEFILE TARGETS