.\" Automatically generated by Podwrapper::Man 2.4.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "virt-v2v-output-openstack 1" .TH virt-v2v-output-openstack 1 "2024-01-09" "virt-v2v-2.4.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" virt\-v2v\-output\-openstack \- Using virt\-v2v to convert guests to OpenStack .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& virt\-v2v [\-i* options] \-o openstack \& \-oo server\-id=SERVER \& [\-oo guest\-id=GUEST] \& [\-oo verify\-server\-certificate=false] \& [\-oo os\-username=admin] [\-oo os\-*=*] \& \& virt\-v2v [\-i* options] \-o glance .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This page documents how to use \fBvirt\-v2v\fR\|(1) to convert guests to run on OpenStack. There are two output modes you can select, but only \&\fI\-o openstack\fR should be used normally. .IP "\fB\-o openstack\fR \fB\-oo server\-id=\fR\s-1SERVER\s0 [...]" 4 .IX Item "-o openstack -oo server-id=SERVER [...]" Full description: \*(L"\s-1OUTPUT TO OPENSTACK\*(R"\s0 .Sp This is the modern method for uploading to OpenStack via the \s-1REST API.\s0 Guests can be directly converted into Cinder volumes. .IP "\fB\-o glance\fR" 4 .IX Item "-o glance" Full description: \*(L"\s-1OUTPUT TO GLANCE\*(R"\s0 .Sp This is the old method for uploading to Glance. Unfortunately Glance is not well suited to storing converted guests (since virt\-v2v deals with \*(L"pets\*(R" not templated \*(L"cattle\*(R"), so this method is not recommended unless you really know what you are doing. .SH "OUTPUT TO OPENSTACK" .IX Header "OUTPUT TO OPENSTACK" To output to OpenStack, use the \fI\-o openstack\fR option. .SS "OpenStack: Setting up a conversion appliance" .IX Subsection "OpenStack: Setting up a conversion appliance" When virt\-v2v is converting to OpenStack, it is unusual in that virt\-v2v \fBmust\fR be running inside a virtual machine running on top of the OpenStack overcloud. This virtual machine is called the \&\*(L"conversion appliance\*(R". Note this virtual machine is unrelated to the guest which is being converted. .PP The reason for this is because to create Cinder volumes that will contain the guest data (for the converted guest) we must attach those Cinder volumes to an OpenStack virtual machine. .PP The \f(CW\*(C`openstack\*(C'\fR command must be installed in the appliance. We use it for communicating with OpenStack. .PP When virt\-v2v is running in the conversion appliance, you must supply the name or \s-1UUID\s0 of the conversion appliance to virt\-v2v, eg: .PP .Vb 6 \& $ openstack server list \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+ \& | ID | Name | Status | \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+ \& | bbb0147a\-44b9\-4d19\-9a9d\-10ca9a984744 | test1 | ACTIVE | \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+ \& \& # virt\-v2v [...] \e \& \-o openstack \-oo server\-id=bbb0147a\-44b9\-4d19\-9a9d\-10ca9a984744 .Ve .PP or: .PP .Vb 1 \& # virt\-v2v [...] \-o openstack \-oo server\-id=test1 .Ve .PP You can run many parallel conversions inside a single conversion appliance if you want, subject to having enough resources available. However OpenStack itself imposes a limit that you should be aware of: OpenStack cannot attach more than around 25 disks [the exact number varies with configuration] to a single appliance, and that limits the number of guests which can be converted in parallel, because each guest's disk must be attached to the appliance while being copied. .SS "OpenStack: Authentication" .IX Subsection "OpenStack: Authentication" Converting to OpenStack requires access to the tenant (non-admin) \s-1API\s0 endpoints. You will need to either set up your \f(CW\*(C`$OS_*\*(C'\fR environment variables or use output options on the virt\-v2v command line to authenticate with OpenStack. .PP For example: .PP .Vb 1 \& export OS_USERNAME=admin .Ve .PP or: .PP .Vb 1 \& virt\-v2v [...] \-o openstack \-oo os\-username=admin .Ve .PP are equivalent, and have the same effect as using \fI\-\-os\-username\fR on the command line of OpenStack tools. .PP Normally there is a file called \fIovercloudrc\fR or \fIkeystonerc_admin\fR which you can simply \f(CW\*(C`source\*(C'\fR to set everything up. .PP If you need to copy \fIovercloudrc\fR to another machine, check if it references the \f(CW\*(C`OS_CLOUD\*(C'\fR environment variable. If so, you may have to copy the \fIclouds.yaml\fR file from \fI/etc/openstack/\fR or \&\fI\f(CI$HOME\fI/.config/openstack/\fR to the other machine as well. See the section \*(L"\s-1CLOUD CONFIGURATION\*(R"\s0 in the openstack \s-1CLI\s0 manual. .SS "OpenStack: Running as root" .IX Subsection "OpenStack: Running as root" Because virt\-v2v must access Cinder volumes which are presented as \&\fI/dev\fR devices to the conversion appliance, virt\-v2v must usually run as root in \fI\-o openstack\fR mode. .PP If you use \f(CW\*(C`sudo\*(C'\fR to start virt\-v2v and you are using environment variables for authentication, remember to use the \f(CW\*(C`sudo \-E\*(C'\fR option to preserve the environment. .SS "OpenStack: Guest \s-1ID\s0" .IX Subsection "OpenStack: Guest ID" .Vb 1 \& virt\-v2v [...] \-o openstack \-oo guest\-id=123\-456\-7890 .Ve .PP You may optionally specify \fI\-oo guest\-id=...\fR on the command line. The \s-1ID\s0 (which can be any string) is saved on each Cinder volume in the \&\f(CW\*(C`virt_v2v_guest_id\*(C'\fR volume property. .PP This can be used to find disks associated with a guest, or to associate which disks are related to which guests when converting many guests. .SS "OpenStack: Ignore server certificate" .IX Subsection "OpenStack: Ignore server certificate" Using \fI\-oo verify\-server\-certificate=false\fR you can tell the openstack client to ignore the server certificate when connecting to the OpenStack \s-1API\s0 endpoints. This has the same effect as passing the \&\fI\-\-insecure\fR option to the \f(CW\*(C`openstack\*(C'\fR command. .SS "OpenStack: Converting a guest" .IX Subsection "OpenStack: Converting a guest" The final command to convert the guest, running as root, will be: .PP .Vb 2 \& # virt\-v2v [\-i options ...] \e \& \-o openstack \-oo server\-id=NAME|UUID [\-oo guest\-id=ID] .Ve .PP If you include authentication options on the command line then: .PP .Vb 2 \& # virt\-v2v [\-i options ...] \e \& \-o openstack \-oo server\-id=NAME|UUID \-oo os\-username=admin [etc] .Ve .SS "OpenStack: Booting the guest" .IX Subsection "OpenStack: Booting the guest" Guests are converted as Cinder volume(s) (one volume per disk in the original guest). To boot them use the \&\f(CW\*(C`openstack server create \-\-volume\*(C'\fR option: .PP .Vb 11 \& $ openstack volume list \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ \& | ID | Name | Status | \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ \& | c4d06d15\-22ef\-462e\-9eff\-ab54ab285a1f | fedora\-27\-sda | available | \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ \& $ openstack server create \e \& \-\-flavor x1.small \e \& \-\-volume c4d06d15\-22ef\-462e\-9eff\-ab54ab285a1f \e \& myguest \& $ openstack console url show myguest .Ve .SS "OpenStack: Other conversion options" .IX Subsection "OpenStack: Other conversion options" To specify the Cinder volume type, use \fI\-os\fR. If not specified then no Cinder volume type is used. .PP The following options are \fBnot\fR supported with OpenStack: \fI\-oa\fR, \&\fI\-of\fR. .SH "OUTPUT TO GLANCE" .IX Header "OUTPUT TO GLANCE" Note this is a legacy option. In most cases you should use \&\*(L"\s-1OUTPUT TO OPENSTACK\*(R"\s0 instead. .PP To output to OpenStack Glance, use the \fI\-o glance\fR option. .PP This runs the \fBglance\fR\|(1) \s-1CLI\s0 program which must be installed on the virt\-v2v conversion host. For authentication to work, you will need to set \f(CW\*(C`OS_*\*(C'\fR environment variables. See \&\*(L"OpenStack: Authentication\*(R" above. .PP Virt\-v2v adds metadata for the guest to Glance, describing such things as the guest operating system and what drivers it requires. The command \f(CW\*(C`glance image\-show\*(C'\fR will display the metadata as \*(L"Property\*(R" fields such as \f(CW\*(C`os_type\*(C'\fR and \f(CW\*(C`hw_disk_bus\*(C'\fR. .SS "Glance and sparseness" .IX Subsection "Glance and sparseness" Glance image upload doesn't appear to correctly handle sparseness. For this reason, using qcow2 will be faster and use less space on the Glance server. Use the virt\-v2v \fI\-of qcow2\fR option. .SS "Glance and multiple disks" .IX Subsection "Glance and multiple disks" If the guest has a single disk, then the name of the disk in Glance will be the name of the guest. You can control this using the \fI\-on\fR option. .PP Glance doesn't have a concept of associating multiple disks with a single guest, and Nova doesn't allow you to boot a guest from multiple Glance disks either. If the guest has multiple disks, then the first (assumed to be the system disk) will have the name of the guest, and the second and subsequent data disks will be called \&\f(CW\*(C`\f(CIguestname\f(CW\-disk2\*(C'\fR, \f(CW\*(C`\f(CIguestname\f(CW\-disk3\*(C'\fR etc. It may be best to leave the system disk in Glance, and import the data disks to Cinder. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBvirt\-v2v\fR\|(1), https://docs.openstack.org/python\-openstackclient/latest/cli/man/openstack.html, \&\fBglance\fR\|(1). .SH "AUTHOR" .IX Header "AUTHOR" Richard W.M. Jones .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2009\-2020 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, \s-1MA 02110\-1301 USA.\s0 .SH "BUGS" .IX Header "BUGS" To get a list of bugs against libguestfs, use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools .PP To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools .PP When reporting a bug, please supply: .IP "\(bu" 4 The version of libguestfs. .IP "\(bu" 4 Where you got libguestfs (eg. which Linux distro, compiled from source, etc) .IP "\(bu" 4 Describe the bug accurately and give a way to reproduce it. .IP "\(bu" 4 Run \fBlibguestfs\-test\-tool\fR\|(1) and paste the \fBcomplete, unedited\fR output into the bug report.