1virt-v2v-output-openstack(1)Virtualization Supportvirt-v2v-output-openstack(1)
2
3
4
6 virt-v2v-output-openstack - Using virt-v2v to convert guests to
7 OpenStack
8
10 virt-v2v [-i* options] -o openstack
11 -oo server-id=SERVER
12 [-oo guest-id=GUEST]
13 [-oo verify-server-certificate=false]
14 [-oo os-username=admin] [-oo os-*=*]
15
16 virt-v2v [-i* options] -o glance
17
19 This page documents how to use virt-v2v(1) to convert guests to run on
20 OpenStack. There are two output modes you can select, but only -o
21 openstack should be used normally.
22
23 -o openstack -oo server-id=SERVER [...]
24 Full description: "OUTPUT TO OPENSTACK"
25
26 This is the modern method for uploading to OpenStack via the REST
27 API. Guests can be directly converted into Cinder volumes.
28
29 -o glance
30 Full description: "OUTPUT TO GLANCE"
31
32 This is the old method for uploading to Glance. Unfortunately
33 Glance is not well suited to storing converted guests (since
34 virt-v2v deals with "pets" not templated "cattle"), so this method
35 is not recommended unless you really know what you are doing.
36
38 To output to OpenStack, use the -o openstack option.
39
40 OpenStack: Setting up a conversion appliance
41 When virt-v2v is converting to OpenStack, it is unusual in that
42 virt-v2v must be running inside a virtual machine running on top of the
43 OpenStack overcloud. This virtual machine is called the "conversion
44 appliance". Note this virtual machine is unrelated to the guest which
45 is being converted.
46
47 The reason for this is because to create Cinder volumes that will
48 contain the guest data (for the converted guest) we must attach those
49 Cinder volumes to an OpenStack virtual machine.
50
51 The "openstack" command must be installed in the appliance. We use it
52 for communicating with OpenStack.
53
54 When virt-v2v is running in the conversion appliance, you must supply
55 the name or UUID of the conversion appliance to virt-v2v, eg:
56
57 $ openstack server list
58 +--------------------------------------+-----------+--------+
59 | ID | Name | Status |
60 +--------------------------------------+-----------+--------+
61 | bbb0147a-44b9-4d19-9a9d-10ca9a984744 | test1 | ACTIVE |
62 +--------------------------------------+-----------+--------+
63
64 # virt-v2v [...] \
65 -o openstack -oo server-id=bbb0147a-44b9-4d19-9a9d-10ca9a984744
66
67 or:
68
69 # virt-v2v [...] -o openstack -oo server-id=test1
70
71 You can run many parallel conversions inside a single conversion
72 appliance if you want, subject to having enough resources available.
73 However OpenStack itself imposes a limit that you should be aware of:
74 OpenStack cannot attach more than around 25 disks [the exact number
75 varies with configuration] to a single appliance, and that limits the
76 number of guests which can be converted in parallel, because each
77 guest's disk must be attached to the appliance while being copied.
78
79 OpenStack: Authentication
80 Converting to OpenStack requires access to the tenant (non-admin) API
81 endpoints. You will need to either set up your "$OS_*" environment
82 variables or use output options on the virt-v2v command line to
83 authenticate with OpenStack.
84
85 For example:
86
87 export OS_USERNAME=admin
88
89 or:
90
91 virt-v2v [...] -o openstack -oo os-username=admin
92
93 are equivalent, and have the same effect as using --os-username on the
94 command line of OpenStack tools.
95
96 Normally there is a file called overcloudrc or keystonerc_admin which
97 you can simply "source" to set everything up.
98
99 If you need to copy overcloudrc to another machine, check if it
100 references the "OS_CLOUD" environment variable. If so, you may have to
101 copy the clouds.yaml file from /etc/openstack/ or
102 $HOME/.config/openstack/ to the other machine as well. See the section
103 "CLOUD CONFIGURATION" in the openstack CLI manual.
104
105 OpenStack: Running as root
106 Because virt-v2v must access Cinder volumes which are presented as /dev
107 devices to the conversion appliance, virt-v2v must usually run as root
108 in -o openstack mode.
109
110 If you use "sudo" to start virt-v2v and you are using environment
111 variables for authentication, remember to use the "sudo -E" option to
112 preserve the environment.
113
114 OpenStack: Guest ID
115 virt-v2v [...] -o openstack -oo guest-id=123-456-7890
116
117 You may optionally specify -oo guest-id=... on the command line. The
118 ID (which can be any string) is saved on each Cinder volume in the
119 "virt_v2v_guest_id" volume property.
120
121 This can be used to find disks associated with a guest, or to associate
122 which disks are related to which guests when converting many guests.
123
124 OpenStack: Ignore server certificate
125 Using -oo verify-server-certificate=false you can tell the openstack
126 client to ignore the server certificate when connecting to the
127 OpenStack API endpoints. This has the same effect as passing the
128 --insecure option to the "openstack" command.
129
130 OpenStack: Converting a guest
131 The final command to convert the guest, running as root, will be:
132
133 # virt-v2v [-i options ...] \
134 -o openstack -oo server-id=NAME|UUID [-oo guest-id=ID]
135
136 If you include authentication options on the command line then:
137
138 # virt-v2v [-i options ...] \
139 -o openstack -oo server-id=NAME|UUID -oo os-username=admin [etc]
140
141 OpenStack: Booting the guest
142 Guests are converted as Cinder volume(s) (one volume per disk in the
143 original guest). To boot them use the "openstack server create
144 --volume" option:
145
146 $ openstack volume list
147 +--------------------------------------+---------------+-----------+
148 | ID | Name | Status |
149 +--------------------------------------+---------------+-----------+
150 | c4d06d15-22ef-462e-9eff-ab54ab285a1f | fedora-27-sda | available |
151 +--------------------------------------+---------------+-----------+
152 $ openstack server create \
153 --flavor x1.small \
154 --volume c4d06d15-22ef-462e-9eff-ab54ab285a1f \
155 myguest
156 $ openstack console url show myguest
157
158 OpenStack: Other conversion options
159 To specify the Cinder volume type, use -os. If not specified then no
160 Cinder volume type is used.
161
162 The following options are not supported with OpenStack: -oa, -of.
163
165 Note this is a legacy option. In most cases you should use "OUTPUT TO
166 OPENSTACK" instead.
167
168 To output to OpenStack Glance, use the -o glance option.
169
170 This runs the glance(1) CLI program which must be installed on the
171 virt-v2v conversion host. For authentication to work, you will need to
172 set "OS_*" environment variables. See "OpenStack: Authentication"
173 above.
174
175 Virt-v2v adds metadata for the guest to Glance, describing such things
176 as the guest operating system and what drivers it requires. The
177 command "glance image-show" will display the metadata as "Property"
178 fields such as "os_type" and "hw_disk_bus".
179
180 Glance and sparseness
181 Glance image upload doesn't appear to correctly handle sparseness. For
182 this reason, using qcow2 will be faster and use less space on the
183 Glance server. Use the virt-v2v -of qcow2 option.
184
185 Glance and multiple disks
186 If the guest has a single disk, then the name of the disk in Glance
187 will be the name of the guest. You can control this using the -on
188 option.
189
190 Glance doesn't have a concept of associating multiple disks with a
191 single guest, and Nova doesn't allow you to boot a guest from multiple
192 Glance disks either. If the guest has multiple disks, then the first
193 (assumed to be the system disk) will have the name of the guest, and
194 the second and subsequent data disks will be called "guestname-disk2",
195 "guestname-disk3" etc. It may be best to leave the system disk in
196 Glance, and import the data disks to Cinder.
197
199 virt-v2v(1),
200 https://docs.openstack.org/python-openstackclient/latest/cli/man/openstack.html,
201 glance(1).
202
204 Richard W.M. Jones
205
207 Copyright (C) 2009-2020 Red Hat Inc.
208
210 This program is free software; you can redistribute it and/or modify it
211 under the terms of the GNU General Public License as published by the
212 Free Software Foundation; either version 2 of the License, or (at your
213 option) any later version.
214
215 This program is distributed in the hope that it will be useful, but
216 WITHOUT ANY WARRANTY; without even the implied warranty of
217 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
218 General Public License for more details.
219
220 You should have received a copy of the GNU General Public License along
221 with this program; if not, write to the Free Software Foundation, Inc.,
222 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
223
225 To get a list of bugs against libguestfs, use this link:
226 https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
227
228 To report a new bug against libguestfs, use this link:
229 https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
230
231 When reporting a bug, please supply:
232
233 • The version of libguestfs.
234
235 • Where you got libguestfs (eg. which Linux distro, compiled from
236 source, etc)
237
238 • Describe the bug accurately and give a way to reproduce it.
239
240 • Run libguestfs-test-tool(1) and paste the complete, unedited output
241 into the bug report.
242
243
244
245virt-v2v-2.3.6 2023-11-02 virt-v2v-output-openstack(1)