File: virt-v2v-output-openstack.1

package info (click to toggle)
libguestfs 1%3A1.40.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 123,660 kB
  • sloc: ansic: 460,074; ml: 63,059; sh: 14,955; java: 9,512; makefile: 9,133; cs: 6,300; haskell: 5,652; python: 3,856; perl: 3,619; erlang: 2,435; xml: 1,683; ruby: 350; pascal: 255; lex: 135; yacc: 128; cpp: 10
file content (311 lines) | stat: -rw-r--r-- 12,597 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
.\" Automatically generated by Podwrapper::Man 1.40.2 (Pod::Simple 3.35)
.\"
.\" 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 "2019-02-07" "libguestfs-1.40.2" "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 "名前"
.IX Header "名前"
virt\-v2v\-output\-openstack \- Using virt\-v2v to convert guests to OpenStack
.SH "書式"
.IX Header "書式"
.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 "説明"
.IX Header "説明"
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
または:
.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
Normally there is a file called something like \f(CW\*(C`stackrc\*(C'\fR, \f(CW\*(C`overcloudrc\*(C'\fR
etc which you can simply \f(CW\*(C`source\*(C'\fR to set everything up.
.PP
例:
.PP
.Vb 1
\& export OS_USERNAME=admin
.Ve
.PP
または:
.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.
.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.  In most cases you can do this by sourcing a
file called something like \fIkeystonerc_admin\fR.
.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 "関連項目"
.IX Header "関連項目"
\&\fBvirt\-v2v\fR\|(1),
https://docs.openstack.org/python\-openstackclient/latest/cli/man/openstack.html,
\&\fBglance\fR\|(1).
.SH "著者"
.IX Header "著者"
Richard W.M. Jones
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (C) 2009\-2019 Red Hat Inc.
.SH "LICENSE"
.IX Header "LICENSE"
.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.