DOKK / manpages / debian 12 / virt-v2v / virt-v2v-hacking.1.en
virt-v2v-hacking(1) Virtualization Support virt-v2v-hacking(1)

virt-v2v-hacking -

First a little history. Virt-v2v has been through at least two complete rewrites, so this is probably about the third version (but we don't intend to rewrite it again). The previous version was written in Perl and can be found here: https://git.fedorahosted.org/git/virt-v2v.git

The current version started out as almost a line-for-line rewrite of the Perl code in OCaml + C, and it still has a fairly similar structure. Therefore if there are details of this code that you don't understand (especially in the details of guest conversion), checking the Perl code may help.

The files to start with when reading this code are:

  • types.mli
  • v2v.ml

types.mli defines all the structures used and passed around when communicating between different bits of the program. v2v.ml controls how the program runs in stages.

After studying those files, you may want to branch out into the input modules (input_*), the output modules (output_*) or the conversion modules (convert_*). The input and output modules define -i and -o options (see the manual). The conversion modules define what guest types we can handle and the detailed steps involved in converting them.

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.

virt-p2v(1), virt-v2v(1).

Richard W.M. Jones

Copyright (C) 2009-2020 Red Hat Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

To get a list of bugs against libguestfs, 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 libguestfs.
  • Where you got libguestfs (eg. which Linux distro, compiled from source, etc)
  • Describe the bug accurately and give a way to reproduce it.
  • Run libguestfs-test-tool(1) and paste the complete, unedited output into the bug report.
2023-01-13 virt-v2v-2.2.0