RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1076213 (v2v_openstack_target) - OpenStack as a v2v target.
Summary: OpenStack as a v2v target.
Keywords:
Status: CLOSED ERRATA
Alias: v2v_openstack_target
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
: 1095210 (view as bug list)
Depends On:
Blocks: 1082754 1113520 1134729 1134730
TreeView+ depends on / blocked
 
Reported: 2014-03-13 19:13 UTC by Stephen Gordon
Modified: 2018-12-05 17:40 UTC (History)
15 users (show)

Fixed In Version: libguestfs-1.28.1-1.18.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1134729 1134730 (view as bug list)
Environment:
Last Closed: 2015-03-05 13:43:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description Stephen Gordon 2014-03-13 19:13:24 UTC
Description of problem:

Customers with an existing investment in alternate hypervisors have expressed an interest in being able to extract an instance with OpenStack as the target, with the intent to then run on KVM hosts.

This type of migration is theoretically possible today via v2v to a KVM host and then manually injecting the image into glance or possibly more likely as a volume in cinder but it would be useful to streamline this procedure.

Comment 1 Stephen Gordon 2014-06-20 14:23:26 UTC
*** Bug 1095210 has been marked as a duplicate of this bug. ***

Comment 4 Stephen Gordon 2014-08-30 02:45:26 UTC
After some further discussion via email it's clear we have two use cases to facilitate ideally:

- Migration of a VMware image to Glance to run on OpenStack-managed ESXi hypervisors (via the Nova vCenter driver).
- Migration of a VMware image to Glance to run on OpenStack-managed KVM hypervisors (via the Nova Libvirt driver).

In the case of the former additional image properties need to be set:

    http://docs.openstack.org/trunk/config-reference/content/vmware.html

    http://lists.openstack.org/pipermail/openstack-dev/2014-August/043041.html

Comment 5 Richard W.M. Jones 2014-08-30 07:03:32 UTC
(In reply to Stephen Gordon from comment #4)
> After some further discussion via email it's clear we have two use cases to
> facilitate ideally:
> 
> - Migration of a VMware image to Glance to run on OpenStack-managed ESXi
> hypervisors (via the Nova vCenter driver).

For this case, just use tar + qemu-img convert + glance image-create.
virt-v2v is not involved.

> - Migration of a VMware image to Glance to run on OpenStack-managed KVM
> hypervisors (via the Nova Libvirt driver).
> 
> In the case of the former additional image properties need to be set:
> 
>     http://docs.openstack.org/trunk/config-reference/content/vmware.html
> 
>    
> http://lists.openstack.org/pipermail/openstack-dev/2014-August/043041.html

For the second case, virt-v2v sets the properties.

For the first case, you could use image inspection, using the tool
virt-inspector + some xpath scripting.

http://libguestfs.org/virt-inspector.1.html
http://libguestfs.org/virt-inspector.1.html#xpath-queries

Comment 6 Richard W.M. Jones 2014-09-30 14:48:30 UTC
virt-v2v in RHEL 7.1 and Fedora >= 21 support the -o glance
option which writes the converted guest to glance.

http://libguestfs.org/virt-v2v.1.html#convert-disk-image-to-openstack-glance

Note this is only suitable when the guest will be booted
on KVM (because virt-v2v converts to KVM).  If the guest is
to be booted on ESXi hypervisors managed by OpenStack then
you would not want to involve virt-v2v.

Comment 7 Scott Radvan 2014-12-11 23:37:31 UTC
See the following article which covers this topic:

https://access.redhat.com/articles/1247463

"Converting VMware guests to Red Hat Enterprise Linux OpenStack Platform"

Comment 8 Richard W.M. Jones 2014-12-16 15:00:30 UTC
This bug is assigned to me, but I don't know what there is to do.

The customer can already try the preview packages we've been
distributing since May 2014 by following the instructions here:

https://www.redhat.com/archives/libguestfs/2014-May/msg00090.html

The -o glance option exists and is tested by QA, so we have a high
confidence it should just work for them.

The virt-v2v package will be Tech Preview in RHEL 7.1, and supported
at some point in RHEL 7 after that.

Comment 9 Stephen Gordon 2014-12-18 22:06:21 UTC
(In reply to Richard W.M. Jones from comment #8)
> This bug is assigned to me, but I don't know what there is to do.

Ship it, primarily. This RFE was raised because at the time this functionality did not exist in the tool (preview or otherwise). Normally we would track this through to completion and attachment to the errata (including QE verification of this RFE) - as the reporter I'm not sure how to answer the question as I don't see that I have done anything outside of normal RHEL process?

Comment 10 Richard W.M. Jones 2014-12-18 23:27:25 UTC
Tingting, could you please QA ACK this bug so I can add it
to the erratum.  The RFE is already fixed because we support
'-o glance' in libguestfs-1.28.1-1.18.el7 so no extra QA
is required.

Comment 11 Richard W.M. Jones 2014-12-18 23:28:48 UTC
For cinder import specifically, refer to bug 1155229.

Comment 16 zhoujunqin 2015-01-27 10:41:45 UTC
Test with ova file exported from esx server since esx server license expired.

Packages:
libguestfs-1.28.1-1.18.el7.x86_64
virt-v2v-1.28.1-1.18.el7.x86_64

Steps:
1. Export guest ova image from esx server.

Scenario 1:Test with rhel guest's ova file:
1.1 # source keystonerc_admin_rhel7
1.2 Use virt-v2v convert guest with "-i ova" option.
# virt-v2v -i ova esx-rhel6-ova.tar -o glance -of qcow2 
[   0.0] Opening the source -i ova esx-rhel6-ova.tar
[  21.0] Creating an overlay to protect the source from being modified
[  23.0] Opening the overlay
[  26.0] Initializing the target -o glance
[  28.0] Inspecting the overlay
[  35.0] Checking for sufficient free disk space in the guest
[  35.0] Estimating space required on target for each disk
[  35.0] Converting Red Hat Enterprise Linux Server release 6.5 (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  59.0] Mapping filesystem data to avoid copying unused and blank areas
[  60.0] Closing the overlay
[  60.0] Copying disk 1/1 to /var/tmp/glance.3YHL9U/sda (qcow2)
    (100.00/100%)
[  88.0] Creating output metadata
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 4958ffd76c9104261dcdb8ecfba8b34d     |
| container_format | bare                                 |
| created_at       | 2015-01-27T10:03:05                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | ed3dd8aa-823d-4e21-8f7f-f3dd88769bb8 |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | esx-rhel6                            |
| owner            | c3a9c07d56aa401b84da161f28cfc06f     |
| protected        | False                                |
| size             | 3049652224                           |
| status           | active                               |
| updated_at       | 2015-01-27T10:03:53                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+
+----------------------------+--------------------------------------+
| Property                   | Value                                |
+----------------------------+--------------------------------------+
| Property 'architecture'    | x86_64                               |
| Property 'hw_disk_bus'     | virtio                               |
| Property 'hw_vif_model'    | virtio                               |
| Property 'hypervisor_type' | kvm                                  |
| Property 'os_distro'       | rhel                                 |
| Property 'os_type'         | linux                                |
| Property 'os_version'      | 6.5                                  |
| Property 'vm_mode'         | hvm                                  |
| checksum                   | 4958ffd76c9104261dcdb8ecfba8b34d     |
| container_format           | bare                                 |
| created_at                 | 2015-01-27T10:03:05                  |
| deleted                    | False                                |
| deleted_at                 | None                                 |
| disk_format                | qcow2                                |
| id                         | ed3dd8aa-823d-4e21-8f7f-f3dd88769bb8 |
| is_public                  | False                                |
| min_disk                   | 0                                    |
| min_ram                    | 2048                                 |
| name                       | esx-rhel6                            |
| owner                      | c3a9c07d56aa401b84da161f28cfc06f     |
| protected                  | False                                |
| size                       | 3049652224                           |
| status                     | active                               |
| updated_at                 | 2015-01-27T10:03:54                  |
| virtual_size               | None                                 |
+----------------------------+--------------------------------------+
[ 143.0] Finishing off

Result: Conversion finished successfully, after login openstack server, guest image can be launched and boot up with no error.

Scenario 2:Test with windows guest's ova file:

# virt-v2v -i ova esx5.5-win7-i386.ova -o glance -of raw 
[   0.0] Opening the source -i ova esx5.5-win7-i386.ova
tar: esx5.5-win7-i386.ovf: time stamp 2015-01-28 13:20:56 is 68162.691316301 s in the future
tar: esx5.5-win7-i386-file1.iso: time stamp 2015-01-28 13:08:51 is 67390.435699417 s in the future
tar: esx5.5-win7-i386-disk1.vmdk: time stamp 2015-01-28 13:20:56 is 68060.349641 s in the future
tar: esx5.5-win7-i386.mf: time stamp 2015-01-28 13:20:56 is 68060.349387163 s in the future
[ 102.0] Creating an overlay to protect the source from being modified
[ 104.0] Opening the overlay
[ 113.0] Initializing the target -o glance
[ 114.0] Inspecting the overlay
[ 116.0] Checking for sufficient free disk space in the guest
[ 116.0] Estimating space required on target for each disk
[ 116.0] Converting Windows 7 Ultimate to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 116.0] Mapping filesystem data to avoid copying unused and blank areas
[ 117.0] Closing the overlay
[ 117.0] Copying disk 1/1 to /var/tmp/glance.TNuvMp/sda (raw)
    (100.00/100%)
[ 211.0] Creating output metadata
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | cea9b7ca2edb3b913df2a25ff0bfd644     |
| container_format | bare                                 |
| created_at       | 2015-01-27T10:28:32                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | raw                                  |
| id               | 8800b641-dfe1-4809-8f18-c5f079919975 |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | esx5.5-win7-i386                     |
| owner            | c3a9c07d56aa401b84da161f28cfc06f     |
| protected        | False                                |
| size             | 17179869184                          |
| status           | active                               |
| updated_at       | 2015-01-27T10:31:39                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+
+----------------------------+--------------------------------------+
| Property                   | Value                                |
+----------------------------+--------------------------------------+
| Property 'architecture'    | x86_64                               |
| Property 'hw_disk_bus'     | virtio                               |
| Property 'hw_vif_model'    | virtio                               |
| Property 'hypervisor_type' | kvm                                  |
| Property 'os_distro'       | windows                              |
| Property 'os_type'         | windows                              |
| Property 'os_version'      | 6.1                                  |
| Property 'vm_mode'         | hvm                                  |
| checksum                   | cea9b7ca2edb3b913df2a25ff0bfd644     |
| container_format           | bare                                 |
| created_at                 | 2015-01-27T10:28:32                  |
| deleted                    | False                                |
| deleted_at                 | None                                 |
| disk_format                | raw                                  |
| id                         | 8800b641-dfe1-4809-8f18-c5f079919975 |
| is_public                  | False                                |
| min_disk                   | 0                                    |
| min_ram                    | 1024                                 |
| name                       | esx5.5-win7-i386                     |
| owner                      | c3a9c07d56aa401b84da161f28cfc06f     |
| protected                  | False                                |
| size                       | 17179869184                          |
| status                     | active                               |
| updated_at                 | 2015-01-27T10:31:42                  |
| virtual_size               | None                                 |
+----------------------------+--------------------------------------+
[ 409.0] Finishing off

Result: Conversion finished successfully, after login openstack server, guest image can be launched and boot up with no error.

And according to Comment 15, move this bug from ON_QA to VERIFIED.

Comment 18 errata-xmlrpc 2015-03-05 13:43:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0303.html


Note You need to log in before you can comment on or make changes to this bug.