2013-03-17 17:06:52 -04:00
=pod
=head1 NAME
2014-02-05 19:09:26 -05:00
virt-convert - convert ovf/vmx to native libvirt guests
2013-03-17 17:06:52 -04:00
=head1 SYNOPSIS
2014-02-05 19:09:26 -05:00
B<virt-convert> INPUT.vmx|INPUT.ovf|INPUT-DIR|INPUT.zip [OPTIONS]
2013-03-17 17:06:52 -04:00
=head1 DESCRIPTION
2017-10-23 20:36:49 +02:00
B<virt-convert> is a command line tool for converting VMX or OVF virtual
2014-02-05 19:09:26 -05:00
machines to native libvirt XML. Disk format conversion can also be done
at the same time.
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
The simplest invocation is simply: virt-convert INPUT. INPUT might be
a .vmx or .ovf file, a directory containing a .vmx or .ovf file (and
likely 1 or more disk images), or an appliance archive like .zip, .tar.gz,
or .ova. virt-convert will try to do the right thing in each case.
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
By default, the virt-convert will convert all encountered disk images
to 'raw' format, sending the output to a new directory location. So the
original disk images are _not_ altered in place.
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
2013-03-17 17:06:52 -04:00
=head1 OPTIONS
=over 4
2015-04-04 17:43:28 -04:00
=item B<--connect> URI
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
Connect to a non-default hypervisor. See L<virt-install(1)> for details
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=back
2014-01-26 12:25:18 -05:00
2014-02-05 19:09:26 -05:00
2015-04-04 17:43:28 -04:00
=head1 CONVERSION OPTIONS
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=over 4
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=item B<-i> INPUT-FORMAT
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=item B<--input-format> INPUT-FORMAT
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
Input format. This should be auto-detected, but can be forced if necessary. Currently C<vmx> and C<ovf> are supported.
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=item B<-D> OUTPUT-FORMAT
=item B<--disk-format> OUTPUT-FORMAT
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
Output disk format. The default is 'raw', so any encountered disk images will be converted to 'raw' format using L<qemu-img(1)>. Pass C<none> if no conversion should be performed: in this case the images will just be copied to the specified --destination.
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=item B<--destination> DIRECTORY
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
The directory to send converted/copied disk images. If not specified, the hypervisor default is used, typically /var/lib/libvirt/images.
2013-03-17 17:06:52 -04:00
=back
2015-04-04 17:43:28 -04:00
=head1 MISCELLANEOUS OPTIONS
=over 4
=item B<--noautoconsole>
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
Don't automatically try to connect to the guest console. The default behaviour
is to launch L<virt-viewer(1)> to display the graphical console, or to run the
C<virsh> C<console> command to display the text console. Use of this parameter
will disable this behaviour.
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=item B<--print-xml>
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
Print the generated libvirt XML, but do not perform any disk conversions or
install/start the guest. This option implies --dry-run.
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=item B<--dry-run>
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
Proceed through the conversion process, but don't convert disks or actually
write any converted files.
2013-03-17 17:06:52 -04:00
2015-04-04 17:43:28 -04:00
=item B<-h>
=item B<--help>
Show the help message and exit
=item B<--version>
Show program's version number and exit
=item B<-q>
=item B<--quiet>
2013-03-17 17:06:52 -04:00
Avoid verbose output.
2015-04-04 17:43:28 -04:00
=item B<-d>
=item B<--debug>
2013-03-17 17:06:52 -04:00
Print debugging information
=back
2015-04-04 17:43:28 -04:00
2013-03-17 17:06:52 -04:00
=head1 EXAMPLES
2014-02-05 19:09:26 -05:00
Run a fedora18 OVA archive:
# virt-convert fedora18.ova
Run an extracted zip archive containing a centos6 .vmx and .vmdk file, converting the images to qcow2 format
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
# virt-convert centos6/ --disk-format qcow2
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
Convert the specified .vmx file. Any references disk images must be in the same directory. Don't change the disk format. Move the disk images to /tmp
2013-03-17 17:06:52 -04:00
2014-02-05 19:09:26 -05:00
# virt-convert foo.vmx --disk-format none --destination /tmp
2013-03-17 17:06:52 -04:00
=head1 BUGS
2018-04-30 13:56:53 +01:00
Please see https://virt-manager.org/page/BugReporting
2013-03-17 17:06:52 -04:00
=head1 COPYRIGHT
2013-08-18 16:04:54 -04:00
Copyright (C) Red Hat, Inc, and various contributors.
2013-03-17 17:06:52 -04:00
This is free software. You may redistribute copies of it under the terms
2018-04-30 13:56:53 +01:00
of the GNU General Public License C<https://www.gnu.org/licenses/gpl.html>.
2013-03-17 17:06:52 -04:00
There is NO WARRANTY, to the extent permitted by law.
=head1 SEE ALSO
2018-04-30 13:56:53 +01:00
L<virt-install(1)>, the project website C<https://virt-manager.org>
2013-03-17 17:06:52 -04:00
=cut