virt-v2v-output-local(1)
π virt-v2v-output-local β bestie's guide to local output π
Okay so this is a page from the Virtualization Support corner of the man-verse (it's virt-v2v-output-local(1) if we're being formal β¨), and it's literally all about how to make virt-v2v(1) drop your converted guests into local files or into a libvirt instance running on your own machine. Obsessed already? Same. π«Ά
πΈ NAME πΈ
virt-v2v-output-local β using virt-v2v to convert guests to local files or libvirt. That's the whole gig, no cap. π
β¨ SYNOPSIS β¨
virt-v2v [-i* options] [-o libvirt] -os POOL
virt-v2v [-i* options] -o local -os DIRECTORY
virt-v2v [-i* options] -o qemu -os DIRECTORY
virt-v2v [-i* options] -o null
Look at those four little moods. Pick your fave, bestie. π
π¦ DESCRIPTION π¦
So this page is the tutorial for using virt-v2v(1) to convert guests over to local files, or to a libvirt instance that's running locally. And ngl, there are four output modes you get to pick from on the virt-v2v command line, and they are, in order:
-o libvirt -osPOOL-osPOOLβ This one converts the guest into a libvirt directory pool calledPOOL, and instantiates the guest inside libvirt (but heads up: it does not start it running, so don't come for it if it's not booting π). Peep "OUTPUT TO LIBVIRT" below for the deets.
Also! -o libvirt is the default when you don't pass any -o option at all, so you can literally just omit it like it's not even a thing. Lowkey convenient. π
-o local -osDIRECTORYβ This one converts the guest into files insideDIRECTORY. You also get a libvirt XML file created β but unlike-o libvirt, the guest is not instantiated in libvirt. Only files get made. That's it. Very demure.
The files come out named like this:
NAME-sda, NAME-sdb, etc. Guest disk(s).
NAME.xml Libvirt XML.
where NAME is the guest name. Cute, consistent, iconic. β
-o qemu -osDIRECTORYβ This one also converts the guest into files insideDIRECTORY. The twist: unlike-o localup there, you get a shell script that contains the raw qemu command you'd need to actually boot the guest. But bestie, listen β the shell script is not run. It's there for you to run later, on your own terms. Main character energy. π-o nullβ The guest gets converted, but then the final result is straight-up thrown away and no metadata is created at all. This is mainly useful for testing. It's giving "the journey was the friends we made along the way." π
π OUTPUT TO LIBVIRT π
The -o libvirt option is how you upload the converted guest onto a libvirt-managed host. And okay, before you get too excited, there are several limitations and I need you to know them:
- You can only use a local libvirt connection [see below for how to workaround this].
- The
-ospool option must specify a directory pool, not anything more exotic such as iSCSI [but see below]. - You can only upload to a KVM hypervisor.
Yeah. But don't spiral β there's a workaround, and it slays. π§
π Workaround for output to a remote libvirt instance and/or a non-directory storage pool π
- Use
virt-v2vin-o localmode to convert the guest disks and metadata into a local temporary directory:
virt-v2v [...] -o local -os /var/tmp
This creates two (or more) files in /var/tmp called:
/var/tmp/NAME.xml # the libvirt XML (metadata)
/var/tmp/NAME-sda # the guestβs first disk
(for NAME substitute the guest's name, iykyk π).
- Upload the converted disk(s) into the storage pool called
POOL:
size=$(stat -c%s /var/tmp/NAME-sda)
virsh vol-create-as POOL NAME-sda $size --format raw
virsh vol-upload --pool POOL NAME-sda /var/tmp/NAME-sda
- Edit
/var/tmp/NAME.xmlto change/var/tmp/NAME-sdato the pool name. In other words, locate the following bit of XML:
<disk type='file' device='disk'>
<driver name='qemu' type='raw' />
<source file='/var/tmp/NAME-sda' />
<target dev='hda' bus='ide' />
</disk>
and change two things: the type='file' attribute must be changed to type='volume', and the <source> element must be changed to include pool and volume attributes:
<disk type='volume' device='disk'>
...
<source pool='POOL' volume='NAME-sda' />
...
</disk>
Two edits. That's it. You got this. πͺ
- Define the final guest in libvirt:
virsh define /var/tmp/NAME.xml
And boom β remote libvirt, non-directory pool, all handled. Periodt. π₯
π SEE ALSO π
That's the whole list, go read it, it's the parent page and it's kind of a big deal. π
π AUTHOR π
Richard W.M. Jones β the legend behind all this. π«Ά
π COPYRIGHT π
Copyright (C) 2009-2025 Red Hat Inc. β protect it at all costs.
π LICENSE π
Okay so legally speaking (and I'm quoting the vibe, not skipping anything):
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.
π Yeah the all-caps warranty bit is real and it's not me being dramatic for once. No warranty, bestie. None.
π 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 β and I'm begging you, don't skip these, the maintainers will cry π:
- 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.
π "Complete, unedited" means don't trim it, don't summarize it, don't vibe-edit it. Paste the whole thing. The whole thing. π
Okay that's the page!! This was virt-v2v-output-local from virt-v2v-2.13.8, dated 2026-10-05 β mwah, go convert something, bestie πβ¨ππ¦
π¦ where this page comes from
- centos-stream 10: virt-v2v 1:2.13.8-1.el10 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms