virt-v2v-inspector(1) | Virtualization Support | virt-v2v-inspector(1) |
virt-v2v-inspector - Estimate disk space needed before virt-v2v conversion
virt-v2v-inspector [-i* options] guest [-O output.xml]
Virt-v2v-inspector is a companion tool for virt-v2v(1) which can be used before conversion to estimate the number of output disks and disk space that will be required to complete the virt-v2v conversion. The common use for this is to preallocate target disks on management systems that need this (like Kubevirt).
This manual page only documents the estimation feature, not all of the -i* options which are the same as virt-v2v. You should read virt-v2v(1) first.
You can run virt-v2v-inspector with the same -i* options as virt-v2v. (Don't use any -o* options). This will select the guest that you want to estimate.
For example to estimate the space required for a guest in a stored local disk called filename.img you could do:
virt-v2v-inspector -i disk filename.img
The output from this tool is an XML document.
<?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.
<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 information 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 information about the guest operating system gleaned during conversion, in a manner similar to the virt-inspector(1) tool from guestfs-tools.
Virt-v2v supports selecting the output allocation mode (-oa option) and output format (-of option, eg. -of qcow2). Since it is difficult to predict the effect of these options on the actual space occupied by the final image this tool does not account for them.
As a rule of thumb:
Files used are the same as for virt-v2v. See "FILES" in virt-v2v(1).
Environment variables used are the same as for virt-v2v. See "ENVIRONMENT VARIABLES" in virt-v2v(1).
virt-v2v(1), virt-p2v(1), virt-inspector(1), guestfs(3), guestfish(1), qemu-img(1), nbdkit(1), http://libguestfs.org/.
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-2022 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:
2023-01-13 | virt-v2v-2.2.0 |