p2v-building(1) | Virtualization Support | p2v-building(1) |
p2v-building - How to build virt-p2v from source
This manual page describes how to build virt-p2v from source.
The main steps are:
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.
Either Gtk 2 or Gtk 3 can be used. If you want to select a specific version of Gtk, use "./configure --with-gtk=2" or "./configure --with-gtk=3".
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.
You will need to install additional dependencies "autoconf", and "automake" when building from git.
git clone https://github.com/libguestfs/virt-p2v cd virt-p2v ./autogen.sh make
Tarballs are downloaded from http://download.libguestfs.org/. Stable tarballs are signed with the GnuPG key for "rich@annexia.org", see https://pgp.mit.edu/pks/lookup?op=vindex&search=0x91738F73E1B768A0. The fingerprint is "F777 4FB1 AD07 4A7E 8C87 67EA 9173 8F73 E1B7 68A0".
Download and unpack the tarball.
cd virt-p2v-1.xx.yy ./configure make
DO NOT run the tests as root! Virt-p2v can be built and tested as non-root. Running the tests as root could even be dangerous, don't do it.
To run the tests, do:
make check
There are many more tests you can run. See p2v-hacking(1) for details.
DO NOT use "make install"! You'll end up with conflicting versions of virt-p2v installed, and this causes constant headaches for users. See the next section for how to use the ./run script instead.
Distro packagers can use:
make DESTDIR=[temp-build-dir] install
You can test virt-p2v(1) and the other tools without needing to install them by using the ./run script in the top directory. This script works by setting several environment variables.
For example:
./run virt-p2v-make-disk [usual virt-p2v-make-disk args ...]
The ./run script adds every virt-p2v binary to the $PATH, so the above example run virt-p2v-make-disk from the build directory (not the globally installed virt-p2v-make-disk if there is one).
There are many "./configure" options. Use:
./configure --help
to list them all. This section covers some of the more important ones.
For custom and/or local builds, this can be set to "local" to indicate this is not a distro build.
export CC=clang ./configure make
(This section only applies on the x86-64 architecture.)
Building a 32 bit virt-p2v (i686) binary improves compatibility with older hardware. See 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 virt-p2v.
On Fedora you can use the mock(1) tool. For example:
fedpkg mockbuild --root fedora-23-i386
This will result in a virt-v2v-*.i686.rpm file which can be unpacked to extract the 32 bit virt-p2v binary.
The binary may be compressed to either virt-p2v.i686.xz, or $libdir/virt-p2v/virt-p2v.i686.xz or $VIRT_P2V_DATA_DIR/virt-p2v.i686.xz as appropriate. This enables the virt-p2v-make-disk(1) --arch option.
p2v-hacking(1), p2v-release-notes(1), http://libguestfs.org/.
Richard W.M. Jones ("rjones at redhat dot com")
Copyright (C) 2009-2019 Red Hat Inc.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
To get a list of bugs against libguestfs (which include virt-p2v), use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
When reporting a bug, please supply:
2020-05-07 | virt-p2v-1.42.0 |