Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1388330

Summary: Cannot convert machine on remote KVM host
Product: Red Hat Enterprise Linux 7 Reporter: Marcus West <mwest>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: ptoscano
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-25 07:51:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcus West 2016-10-25 06:59:47 UTC
## Description of problem:

Using rhel7 virt-v2v, i cannot convert a remote KVM guest

## Version-Release number of selected component (if applicable):

virt-v2v-1.28.1-1.55.el7_2.4.x86_64
libguestfs-1.28.1-1.55.el7_2.4.x86_64

## How reproducible:

always

## Steps to Reproduce:
1. Set up some guests on a RHEL6 KVM server
2. install virt-v2v on a RHEL7 conversion host
3. try and convert with the command:

virt-v2v -v -x -ic qemu+ssh://root@<kvm-host>/system rhel7-01 -o rhev -os <rhev-export-domain>:/data/export --network ovirtmgmt

## Actual results:

Get the error:

qemu-img create -q -f qcow2 -b '/var/lib/libvirt/images/rhel7-01.qcow2' -o 'compat=1.1,backing_fmt=qcow2' /var/tmp/v2vovl8cb460.qcow2
qemu-img: /var/tmp/v2vovl8cb460.qcow2: Could not open '/var/lib/libvirt/images/rhel7-01.qcow2': No such file or directory
virt-v2v: error: qemu-img command failed, see earlier errors


## Expected results:

Be able to export the VM, so it can be imported into RHEV later.


## Additional info:

KVM host details:

kernel-2.6.32-573.el6.x86_64
qemu-img-0.12.1.2-2.491.el6_8.3.x86_64
qemu-kvm-0.12.1.2-2.491.el6_8.3.x86_64
libvirt-0.10.2-60.el6.x86_64

If I run that failed qemu-img command on the KVM host with the '-q' and 'compat' options removed, it works:

# qemu-img create -q -f qcow2 -b '/var/lib/libvirt/images/rhel7-01.qcow2' -o 'compat=1.1,backing_fmt=qcow2' /var/tmp/v2vovl8cb460.qcow2
create: invalid option -- 'q'
...
# qemu-img create -f qcow2 -b '/var/lib/libvirt/images/rhel7-01.qcow2' -o 'compat=1.1,backing_fmt=qcow2' /var/tmp/v2vovl8cb460.qcow2
Unknown option 'compat'
Invalid options for file format 'qcow2'.

# qemu-img create -f qcow2 -b '/var/lib/libvirt/images/rhel7-01.qcow2' -o 'backing_fmt=qcow2' /var/tmp/v2vovl8cb460.qcow2
Formatting '/var/tmp/v2vovl8cb460.qcow2', fmt=qcow2 size=7516192768 backing_file='/var/lib/libvirt/images/rhel7-01.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536
<success>

# qemu-img info /var/tmp/v2vovl8cb460.qcow2
image: /var/tmp/v2vovl8cb460.qcow2
file format: qcow2
virtual size: 7.0G (7516192768 bytes)
disk size: 196K
cluster_size: 65536
backing file: /var/lib/libvirt/images/rhel7-01.qcow2
backing file format: qcow2


We are trying to migrate these KVM guests to a new RHEV3.6/RHEL6.6 environment.  We can't use the RHV 'import disk' feature, as I believe that's only in 4.0  If there's a better way to go about this, please let me know.

Comment 2 Richard W.M. Jones 2016-10-25 07:51:32 UTC
You're using the wrong tool.  If the guest already runs on KVM then
you shouldn't be using virt-v2v.

Use something like import-to-ovirt:

http://git.annexia.org/?p=import-to-ovirt.git;a=summary

I recently modified import-to-ovirt so it can be run directly
from RHEL 6 hosts.