virt-v2v-inspector(1)

๐Ÿ’– virt-v2v-inspector(1) ๐Ÿ’–

okay so bestie, welcome to the glow-up of virt-v2v-inspector โ€” it's a manual page, it's a vibe, it's giving "let me do the math before we commit". Sit down, hydrate, and let's get into it ๐Ÿซถ


โœจ NAME โœจ

virt-v2v-inspector โ€” the tool that estimates how much disk space you're gonna need before you run a virt-v2v conversion ๐Ÿ”ฎ

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

virt-v2v-inspector [-i* options]
                   [virt-customize options]
                   guest
                   [-O output.xml]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

Okay so virt-v2v-inspector is the literal bestie companion tool to virt-v2v(1) ๐Ÿ’… You run it before conversion and it tells you how many output disks you're gonna end up with and how much disk space the whole virt-v2v conversion is gonna need. The classic use case? Preallocating target disks on management systems that are extra and demand that kind of thing (hi, Kubevirt ๐Ÿ‘‹).

Heads up: this manpage only documents the estimation feature โ€” not all the -i* options, because those are literally the same as virt-v2v's. You should read virt-v2v(1) first, no cap ๐Ÿ“–

๐ŸŽ€ Selecting the input guest ๐ŸŽ€

You can run virt-v2v-inspector with the exact same -i* options as virt-v2v. (Just don't use any -o* options, mwah ๐Ÿ’‹.) That's how you pick the guest you wanna estimate.

Like, say you want to estimate the space needed for a guest sitting in a stored local disk called filename.img โ€” you'd literally just do:

virt-v2v-inspector -i disk filename.img

๐Ÿ‘‘ Output ๐Ÿ‘‘

The output from this tool is an XML document. Iconic. Here's the tea:

  • Fields annotated with an "estimated='true'" attribute are, you guessed it, estimated. Virt-v2v cannot always know exactly the final size of some things (like the exact real size of the output disk) because there might be small perturbations between runs. But the estimates are usually very close to the final values, fr fr.
  • Numbers representing sizes are always given in bytes ๐Ÿ“
  • By default the output goes to stdout. That's perfect when you're using the program interactively. But if you wanna use this tool from another program, bestie, please send the output to a specific file using -O output.xml ๐Ÿ’พ
<?xml version='1.0' encoding='utf-8'?>
<v2v-inspection>
  <program>virt-v2v-inspector</program>
  <package>virt-v2v</package>
  <version>2.1.9</version>

The <program>, <package> and <version> elements refer to the current version of virt-v2v-inspector and are useful for debugging. Make sure you use the same version of virt-v2v-inspector and virt-v2v โ€” matching versions only, it's the rule ๐Ÿ’ฏ

  <disks>
    <disk index='0'>
      <virtual-size>6442450944</virtual-size>
      <allocated estimated='true'>1400897536</allocated>
    </disk>
    <disk index='1'>
      <virtual-size>6442450944</virtual-size>
      <allocated estimated='true'>45131520</allocated>
    </disk>
  </disks>

The <disks> element lists info about each guest disk. The example virtual machine above has two disks. <virtual-size> describes the size of the disk as seen from inside the guest, while <allocated> is an estimate of how much storage will be needed on the host after conversion. This is assuming you use -oa sparse โ€” see the notes below ๐Ÿ‘‡

  <operatingsystem>
    <name>linux</name>
    <distro>fedora</distro>
    <osinfo>fedora32</osinfo>
    <arch>x86_64</arch>
    [...]
  </operatingsystem>

The <operatingsystem> element lists info about the guest operating system gleaned during conversion, in a manner similar to the virt-inspector(1) tool from guestfs-tools ๐Ÿ”

๐Ÿ’œ Output allocation mode and output format ๐Ÿ’œ

Virt-v2v supports selecting the output allocation mode (the -oa option) and output format (the -of option, eg. -of qcow2). But since it's genuinely difficult to predict the effect of these options on the actual space occupied by the final image, this tool does not account for them. Sorry bestie ๐Ÿ˜ญ

As a rule of thumb:

virt-v2v -oa preallocated : causes the disk images on the target to consume their full virtual size (excluding the effect of zero allocations will depends so much on the underlying storage that it is often hard even for experts to predict).

virt-v2v -of qcow2 : uses the QCOW2 format where supported, which means that the apparent size of the file will be equal to its sparse size, but otherwise should not affect estimates very much.

๐ŸŒˆ OPTIONS ๐ŸŒˆ

  • --help โ€” Display help. You love to see it ๐Ÿ™Œ
  • -O output.xml โ€” Write the output to a file called output.xml.
  • -O - โ€” Write the output to stdout. This is also the default if the -O option is omitted.
  • -v, --verbose โ€” Enable verbose messages for debugging. For when you need all the lore ๐Ÿ”
  • -V, --version โ€” Display version number and exit.
  • -x โ€” Enable tracing of libguestfs API calls. Watch it cook ๐Ÿณ
  • -i ... โ€” All of the -i* options supported by virt-v2v and also supported by virt-v2v-inspector.
  • -ic ... โ€” All of the -i* options supported by virt-v2v and also supported by virt-v2v-inspector.
  • -if ... โ€” All of the -i* options supported by virt-v2v and also supported by virt-v2v-inspector.
  • -io ... โ€” All of the -i* options supported by virt-v2v and also supported by virt-v2v-inspector.
  • -ip ... โ€” All of the -i* options supported by virt-v2v and also supported by virt-v2v-inspector.
  • -it ... โ€” All of the -i* options supported by virt-v2v and also supported by virt-v2v-inspector.
  • -b ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --bridge ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --collect ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --collect-output ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --colors โ€” These options work in the same way as the equivalent virt-v2v options.
  • --colours โ€” These options work in the same way as the equivalent virt-v2v options.
  • --echo-keys โ€” These options work in the same way as the equivalent virt-v2v options.
  • --key ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --keys-from-stdin โ€” These options work in the same way as the equivalent virt-v2v options.
  • --mac ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --machine-readable โ€” These options work in the same way as the equivalent virt-v2v options.
  • --machine-readable=format โ€” These options work in the same way as the equivalent virt-v2v options.
  • -m MB โ€” These options work in the same way as the equivalent virt-v2v options.
  • --memsize MB โ€” These options work in the same way as the equivalent virt-v2v options.
  • -n ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --network ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --no-fstrim โ€” These options work in the same way as the equivalent virt-v2v options.
  • -q โ€” These options work in the same way as the equivalent virt-v2v options.
  • --quiet โ€” These options work in the same way as the equivalent virt-v2v options.
  • --root ... โ€” These options work in the same way as the equivalent virt-v2v options.
  • --smp N โ€” These options work in the same way as the equivalent virt-v2v options.
  • --wrap โ€” These options work in the same way as the equivalent virt-v2v options.

๐Ÿงš FILES ๐Ÿงš

Files used are the same as for virt-v2v. See "FILES" in virt-v2v(1) ๐Ÿ’–

โญ ENVIRONMENT VARIABLES โญ

Environment variables used are the same as for virt-v2v. See "ENVIRONMENT VARIABLES" in virt-v2v(1) โœจ

๐Ÿ“ SEE ALSO ๐Ÿ“

virt-v2v(1), virt-p2v(1), virt-inspector(1), guestfs(3), guestfish(1), qemu-img(1), nbdkit(1), http://libguestfs.org/. Go read them, they're all icons ๐Ÿ‘‘

๐Ÿ’€ AUTHORS ๐Ÿ’€

Shoutout to the whole squad, genuinely carrying this:

Matthew Booth

Cรฉdric Bosdonnat

Laszlo Ersek

Tomรกลก Golembiovskรฝ

Shahar Havivi

Richard W.M. Jones

Roman Kagan

Mike Latimer

Nir Soffer

Pino Toscano

Xiaodai Wang

Ming Xie

Tingting Zheng

Copyright (C) 2009-2025 Red Hat Inc.

๐ŸŒธ LICENSE ๐ŸŒธ

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.

๐Ÿ› BUGS ๐Ÿ›

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.

and that's the whole page, bestie ๐Ÿซถ this was virt-v2v-2.13.8, dated 2026-10-05, served fresh from virt-v2v-inspector(1) โ€” now go estimate some disks, you absolute main character ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from