|
|
c232e6 |
From 7edb403ee54153c64205915c0bd1d177c0094ee0 Mon Sep 17 00:00:00 2001
|
|
|
c232e6 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
c232e6 |
Date: Wed, 30 Jun 2021 11:15:52 +0100
|
|
|
c232e6 |
Subject: [PATCH 11/12] RHEL 9: Disable -o glance
|
|
|
c232e6 |
|
|
|
c232e6 |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539
|
|
|
c232e6 |
---
|
|
|
c232e6 |
docs/virt-v2v-output-openstack.pod | 56 ++----------------------------
|
|
|
c232e6 |
docs/virt-v2v.pod | 22 ------------
|
|
|
c232e6 |
tests/test-v2v-o-glance.sh | 3 ++
|
|
|
c232e6 |
v2v/cmdline.ml | 3 --
|
|
|
c232e6 |
v2v/output_glance.ml | 2 +-
|
|
|
c232e6 |
5 files changed, 6 insertions(+), 80 deletions(-)
|
|
|
c232e6 |
|
|
|
c232e6 |
diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod
|
|
|
c232e6 |
index f5a3abad..1ab356e8 100644
|
|
|
c232e6 |
--- a/docs/virt-v2v-output-openstack.pod
|
|
|
c232e6 |
+++ b/docs/virt-v2v-output-openstack.pod
|
|
|
c232e6 |
@@ -10,13 +10,10 @@ virt-v2v-output-openstack - Using virt-v2v to convert guests to OpenStack
|
|
|
c232e6 |
[-oo verify-server-certificate=false]
|
|
|
c232e6 |
[-oo os-username=admin] [-oo os-*=*]
|
|
|
c232e6 |
|
|
|
c232e6 |
- virt-v2v [-i* options] -o glance
|
|
|
c232e6 |
-
|
|
|
c232e6 |
=head1 DESCRIPTION
|
|
|
c232e6 |
|
|
|
c232e6 |
This page documents how to use L<virt-v2v(1)> to convert guests to run
|
|
|
c232e6 |
-on OpenStack. There are two output modes you can select, but only
|
|
|
c232e6 |
-I<-o openstack> should be used normally.
|
|
|
c232e6 |
+on OpenStack.
|
|
|
c232e6 |
|
|
|
c232e6 |
=over 4
|
|
|
c232e6 |
|
|
|
c232e6 |
@@ -27,15 +24,6 @@ Full description: L</OUTPUT TO OPENSTACK>
|
|
|
c232e6 |
This is the modern method for uploading to OpenStack via the REST API.
|
|
|
c232e6 |
Guests can be directly converted into Cinder volumes.
|
|
|
c232e6 |
|
|
|
c232e6 |
-=item B<-o glance>
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-Full description: L</OUTPUT TO GLANCE>
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-This is the old method for uploading to Glance. Unfortunately Glance
|
|
|
c232e6 |
-is not well suited to storing converted guests (since virt-v2v deals
|
|
|
c232e6 |
-with "pets" not templated "cattle"), so this method is not recommended
|
|
|
c232e6 |
-unless you really know what you are doing.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
=back
|
|
|
c232e6 |
|
|
|
c232e6 |
=head1 OUTPUT TO OPENSTACK
|
|
|
c232e6 |
@@ -170,50 +158,10 @@ no Cinder volume type is used.
|
|
|
c232e6 |
The following options are B<not> supported with OpenStack: I<-oa>,
|
|
|
c232e6 |
I<-of>.
|
|
|
c232e6 |
|
|
|
c232e6 |
-=head1 OUTPUT TO GLANCE
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-Note this is a legacy option. In most cases you should use
|
|
|
c232e6 |
-L</OUTPUT TO OPENSTACK> instead.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-To output to OpenStack Glance, use the I<-o glance> option.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-This runs the L<glance(1)> CLI program which must be installed on the
|
|
|
c232e6 |
-virt-v2v conversion host. For authentication to work, you will need
|
|
|
c232e6 |
-to set C<OS_*> environment variables.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-Normally there is a file called C<overcloudrc> or C<keystonerc_admin>
|
|
|
c232e6 |
-which you can simply C<source> to set everything up.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-Virt-v2v adds metadata for the guest to Glance, describing such things
|
|
|
c232e6 |
-as the guest operating system and what drivers it requires. The
|
|
|
c232e6 |
-command C<glance image-show> will display the metadata as "Property"
|
|
|
c232e6 |
-fields such as C<os_type> and C<hw_disk_bus>.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-=head2 Glance and sparseness
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-Glance image upload doesn't appear to correctly handle sparseness.
|
|
|
c232e6 |
-For this reason, using qcow2 will be faster and use less space on the
|
|
|
c232e6 |
-Glance server. Use the virt-v2v S<I<-of qcow2>> option.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-=head2 Glance and multiple disks
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-If the guest has a single disk, then the name of the disk in Glance
|
|
|
c232e6 |
-will be the name of the guest. You can control this using the I<-on>
|
|
|
c232e6 |
-option.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-Glance doesn't have a concept of associating multiple disks with a
|
|
|
c232e6 |
-single guest, and Nova doesn't allow you to boot a guest from multiple
|
|
|
c232e6 |
-Glance disks either. If the guest has multiple disks, then the first
|
|
|
c232e6 |
-(assumed to be the system disk) will have the name of the guest, and
|
|
|
c232e6 |
-the second and subsequent data disks will be called
|
|
|
c232e6 |
-C<I<guestname>-disk2>, C<I<guestname>-disk3> etc. It may be best to
|
|
|
c232e6 |
-leave the system disk in Glance, and import the data disks to Cinder.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
=head1 SEE ALSO
|
|
|
c232e6 |
|
|
|
c232e6 |
L<virt-v2v(1)>,
|
|
|
c232e6 |
-L<https://docs.openstack.org/python-openstackclient/latest/cli/man/openstack.html>,
|
|
|
c232e6 |
-L<glance(1)>.
|
|
|
c232e6 |
+L<https://docs.openstack.org/python-openstackclient/latest/cli/man/openstack.html>.
|
|
|
c232e6 |
|
|
|
c232e6 |
=head1 AUTHOR
|
|
|
c232e6 |
|
|
|
c232e6 |
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
|
|
c232e6 |
index 719a95b5..2f4fe86c 100644
|
|
|
c232e6 |
--- a/docs/virt-v2v.pod
|
|
|
c232e6 |
+++ b/docs/virt-v2v.pod
|
|
|
c232e6 |
@@ -422,20 +422,10 @@ interested in looking at the metadata.
|
|
|
c232e6 |
This option is not compatible with I<-o libvirt> since it would create
|
|
|
c232e6 |
a faulty guest (one with no disks).
|
|
|
c232e6 |
|
|
|
c232e6 |
-This option is not compatible with I<-o glance> for technical reasons.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
=item B<-o> B<disk>
|
|
|
c232e6 |
|
|
|
c232e6 |
This is the same as I<-o local>.
|
|
|
c232e6 |
|
|
|
c232e6 |
-=item B<-o> B<glance>
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-This is a legacy option. You should probably use I<-o openstack>
|
|
|
c232e6 |
-instead.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-Set the output method to OpenStack Glance. In this mode the converted
|
|
|
c232e6 |
-guest is uploaded to Glance. See L<virt-v2v-output-openstack(1)>.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
=item B<-o> B<json>
|
|
|
c232e6 |
|
|
|
c232e6 |
Set the output method to I<json>.
|
|
|
c232e6 |
@@ -1148,11 +1138,6 @@ and output methods may use disk space, as outlined in the table below.
|
|
|
c232e6 |
This temporarily places a full copy of the uncompressed source disks
|
|
|
c232e6 |
in C<$VIRT_V2V_TMPDIR> (or F).
|
|
|
c232e6 |
|
|
|
c232e6 |
-=item I<-o glance>
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-This temporarily places a full copy of the output disks in
|
|
|
c232e6 |
-C<$VIRT_V2V_TMPDIR> (or F).
|
|
|
c232e6 |
-
|
|
|
c232e6 |
=item I<-o local>
|
|
|
c232e6 |
|
|
|
c232e6 |
=item I<-o qemu>
|
|
|
c232e6 |
@@ -1337,13 +1322,6 @@ instance.
|
|
|
c232e6 |
Because of how Cinder volumes are presented as F</dev> block devices,
|
|
|
c232e6 |
using I<-o openstack> normally requires that virt-v2v is run as root.
|
|
|
c232e6 |
|
|
|
c232e6 |
-=item Writing to Glance
|
|
|
c232e6 |
-
|
|
|
c232e6 |
-This does I<not> need root (in fact it probably won’t work), but may
|
|
|
c232e6 |
-require either a special user and/or for you to source a script that
|
|
|
c232e6 |
-sets authentication environment variables. Consult the Glance
|
|
|
c232e6 |
-documentation.
|
|
|
c232e6 |
-
|
|
|
c232e6 |
=item Writing to block devices
|
|
|
c232e6 |
|
|
|
c232e6 |
This normally requires root. See the next section.
|
|
|
c232e6 |
diff --git a/tests/test-v2v-o-glance.sh b/tests/test-v2v-o-glance.sh
|
|
|
c232e6 |
index c0db9115..074b5e16 100755
|
|
|
c232e6 |
--- a/tests/test-v2v-o-glance.sh
|
|
|
c232e6 |
+++ b/tests/test-v2v-o-glance.sh
|
|
|
c232e6 |
@@ -20,6 +20,9 @@
|
|
|
c232e6 |
|
|
|
c232e6 |
set -e
|
|
|
c232e6 |
|
|
|
c232e6 |
+# Feature is disabled in RHEL 9.
|
|
|
c232e6 |
+exit 77
|
|
|
c232e6 |
+
|
|
|
c232e6 |
source ./functions.sh
|
|
|
c232e6 |
set -e
|
|
|
c232e6 |
set -x
|
|
|
c232e6 |
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
|
|
|
c232e6 |
index 01314580..e6c86b6f 100644
|
|
|
c232e6 |
--- a/v2v/cmdline.ml
|
|
|
c232e6 |
+++ b/v2v/cmdline.ml
|
|
|
c232e6 |
@@ -170,7 +170,6 @@ let parse_cmdline () =
|
|
|
c232e6 |
if !output_mode <> `Not_set then
|
|
|
c232e6 |
error (f_"%s option used more than once on the command line") "-o";
|
|
|
c232e6 |
match mode with
|
|
|
c232e6 |
- | "glance" -> output_mode := `Glance
|
|
|
c232e6 |
| "libvirt" -> output_mode := `Libvirt
|
|
|
c232e6 |
| "disk" | "local" -> output_mode := `Local
|
|
|
c232e6 |
| "json" -> output_mode := `JSON
|
|
|
c232e6 |
@@ -323,8 +322,6 @@ let parse_cmdline () =
|
|
|
c232e6 |
|
|
|
c232e6 |
virt-v2v -i disk disk.img -o local -os /var/tmp
|
|
|
c232e6 |
|
|
|
c232e6 |
- virt-v2v -i disk disk.img -o glance
|
|
|
c232e6 |
-
|
|
|
c232e6 |
There is a companion front-end called \"virt-p2v\" which comes as an
|
|
|
c232e6 |
ISO or CD image that can be booted on physical machines.
|
|
|
c232e6 |
|
|
|
c232e6 |
diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml
|
|
|
c232e6 |
index 8c5426b9..3fce4e7a 100644
|
|
|
c232e6 |
--- a/v2v/output_glance.ml
|
|
|
c232e6 |
+++ b/v2v/output_glance.ml
|
|
|
c232e6 |
@@ -100,4 +100,4 @@ object
|
|
|
c232e6 |
end
|
|
|
c232e6 |
|
|
|
c232e6 |
let output_glance = new output_glance
|
|
|
c232e6 |
-let () = Modules_list.register_output_module "glance"
|
|
|
c232e6 |
+(* let () = Modules_list.register_output_module "glance" *)
|
|
|
c232e6 |
--
|
|
|
c232e6 |
2.31.1
|
|
|
c232e6 |
|