p2v-building(1)
π p2v-building(1) π
okay bestie, welcome to the Virtualization Support girlies club π this is p2v-building(1) and it's literally the glow-up guide for building virt-p2v from source. no cap.
β¨ NAME β¨
p2v-building β the how-to on building virt-p2v from source π οΈπ
πΈ DESCRIPTION πΈ
this whole manual page is just: how do i build virt-p2v from source. that's it. that's the vibe. π¦
the main steps are giving very much checklist energy:
- install the requirements π
- build β either from the git repository or from a tarball π¦
- run the tests π§ͺ
- run the tools straight from the source directory, or install them πββοΈ
π REQUIREMENTS π
π Full list of requirements π
qemu-imgβ₯ 2.2.0 β Required, periodt.- Gcc or Clang β Required, bestie. we use
__attribute__((cleanup)), which is a GCC extension that Clang also supports π - Perl β Required. various build steps and tests are written in Perl. ngl tho, Perl is not needed at runtime. it's a build-time girly only π
- Perl
Pod::Manβ Required. part of Perl core π«Ά - Perl
Pod::Simpleβ Required. also part of Perl core π«Ά autoconfβ Required if you're compiling from git. Optional if you're compiling from a tarball β¨automakeβ Required if you're compiling from git. Optional if you're compiling from a tarball β¨- Perl-compatible Regular Expressions (PCRE2) library β Required π₯
libxml2β Required πxzβ Required βnbdkitβ Optional. okay sovirt-p2v(1)does require nbdkit, but it only needs to be present on the virt-p2v ISO β it does not need to be installed at compile time π- Glib β₯ 2.56 β Required π
- Gtk β₯ 3.22 β Required π
- D-Bus β Optional. here's the tea: if the D-Bus low level C API is available,
virt-p2vcan send a D-Bus message to logind to inhibit power saving (sleep, suspend, etc) during P2V conversions πβ¨ and if this API is not available at build time, then very long conversions might get interrupted if the physical machine goes to sleep π so like, keep that in mind. valgrindβ Optional. for testing memory problems π§bash-completionβ Optional. for tab-completion of commands in bash β¨οΈ
π οΈ BUILDING FROM GIT π οΈ
you will need to install additional dependencies autoconf and automake when building from git. not optional, bestie, sorry π¬
git clone https://github.com/libguestfs/virt-p2v
cd virt-p2v
autoreconf -i
./configure
make
slay. that's the whole thing π
π¦ BUILDING FROM TARBALLS π¦
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. and the fingerprint is F777 4FB1 AD07 4A7E 8C87 67EA 9173 8F73 E1B7 68A0 β verify it, queen π
download and unpack the tarball. then:
cd virt-p2v-1.xx.yy
./configure
make
π§ͺ RUNNING THE TESTS π§ͺ
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. fr fr. π ββοΈ
to run the tests, do:
make check
there are many more tests you can run, if you're feeling extra. see p2v-hacking(1) for details π
π« INSTALLING π«
DO NOT usemake 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./runscript instead π
distro packagers can use:
make DESTDIR=[temp-build-dir] install
(bestie, [temp-build-dir] is a placeholder β swap in your actual temp build dir π«Ά)
πββοΈ THE ./run SCRIPT πββοΈ
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. iconic behaviour tbh β¨
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 runs virt-p2v-make-disk from the build directory β not the globally installed virt-p2v-make-disk, if there even is one. main character energy, honestly π
βοΈ SELECTED ./configure SETTINGS βοΈ
there are many ./configure options, like so many. use:
./configure --help
to list them all. this section only covers some of the more important ones π
--enable-werrorβ this turns compiler warnings into errors (ie.-Werror). use this for development, especially when submitting patches. it should generally not be used for production or distro builds π¨--with-extra="distroname=version,..."β this option appends a text to the version of the virt-p2v tools. it's a free text field, but a good idea is to encode a comma-separated list of facts such as the distro name and version, and anything else that may help with debugging problems raised by users π--with-extra="local"β same option, different flavour! for custom and/or local builds, this can be set tolocalto indicate this is not a distro build π
π USING CLANG (LLVM) INSTEAD OF GCC π
export CC=clang
./configure
make
boom. clang girlies rise π¦
π BUILDING i686 32 BIT VIRT-P2V π
(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. do what you gotta do π
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 π₯
π SEE ALSO π
p2v-hacking(1), p2v-release-notes(1), http://libguestfs.org/. go read 'em bestie π
π AUTHORS π
Richard W.M. Jones (rjones at redhat dot com) β the icon himself π
Β©οΈ COPYRIGHT Β©οΈ
Copyright (C) 2009-2019 Red Hat Inc.
π LICENSE π
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/>.
π BUGS π
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:
- the version of virt-p2v.
- where you got virt-p2v (eg. which Linux distro, compiled from source, etc)
- describe the bug accurately and give a way to reproduce it. πβ¨
and that's the whole page, bestie!! π this was p2v-building(1) from virt-p2v-1.42.4, dated 2026-04-08 β go build something cute ππ§ββοΈπΈ
π¦ where this page comes from
- ubuntu stonking: virt-p2v 1.42.4-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms