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