virt-v2v-output-local(1) | Virtualization Support | virt-v2v-output-local(1) |
virt-v2v-output-local - Using virt-v2v to convert guests to local files or libvirt
virt-v2v [-i* options] [-o libvirt] -os POOL virt-v2v [-i* options] -o local -os DIRECTORY virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot] virt-v2v [-i* options] -o null
This page documents how to use virt-v2v(1) to convert guests to local files or to a locally running libvirt instance. There are four output modes you can select on the virt-v2v command line:
-o libvirt is the default if no -o option is given, so you can omit it.
The files will be called:
NAME-sda, NAME-sdb, etc. Guest disk(s). NAME.xml Libvirt XML.
where "NAME" is the guest name.
The -o libvirt option lets you upload the converted guest to a libvirt-managed host. There are several limitations:
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).
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
<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>
virsh define /var/tmp/NAME.xml
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:
2023-01-13 | virt-v2v-2.2.0 |