Bug 1430680 - There is error info about "No such file or directory" when convert a guest from ova file by v2v
Summary: There is error info about "No such file or directory" when convert a guest fr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.4
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On: 1359086
Blocks: 1375157
TreeView+ depends on / blocked
 
Reported: 2017-03-09 09:52 UTC by kuwei@redhat.com
Modified: 2017-08-01 22:13 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.36.2-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 22:13:55 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2023 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2017-08-01 19:32:01 UTC

Description kuwei@redhat.com 2017-03-09 09:52:07 UTC
Description of problem:
There is error info about "No such file or directory" when convert a guest from ova file by v2v

Version-Release number of selected component (if applicable):
virt-v2v-1.36.2-1.el7.x86_64
libvirt-3.1.0-2.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

How reproducible:
100% 

Steps to Reproduce:
1.Convert a guest from ova file by v2v,will be report a error info "No such file or directory".

# virt-v2v -i ova rhel6.7-efi.ova -of raw -on test
[   0.0] Opening the source -i ova rhel6.7-efi.ova
virt-v2v: warning: making OVA directory public readable to work around 
libvirt bug https://bugzilla.redhat.com/1045069
[  12.4] Creating an overlay to protect the source from being modified
[  12.6] Initializing the target -o libvirt -os default
[  12.6] Opening the overlay
virt-v2v: error: libguestfs error: could not create appliance through 
libvirt.

Try running qemu directly without libvirt using this environment variable:
export LIBGUESTFS_BACKEND=direct

Original error from libvirt: Cannot access backing file 'rhel6.7-efi.ova' 
of storage file '/var/tmp/v2vovl40cd20.qcow2' (as uid:107, gid:107): No 
such file or directory [code=38 int1=2]

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

Actual results:
As above description

Expected results:
There is no error info about  "No such file or directory" when convert a guest from ova file by v2v,


Additional info:

Comment 2 Richard W.M. Jones 2017-03-09 15:54:46 UTC
The fix for https://bugzilla.redhat.com/show_bug.cgi?id=1375157#c6
works by chmoding the OVA exploded directory.

That's fine, but it doesn't work with Tomas's code where we read
the disks directly from the OVA file without unpacking it.  So the
fix for bug 1375157 needs to be modified to take that into account.

Comment 3 Richard W.M. Jones 2017-03-13 14:48:08 UTC
Posted:
https://www.redhat.com/archives/libguestfs/2017-March/msg00150.html

Comment 4 Richard W.M. Jones 2017-03-13 17:14:28 UTC
I believe the full list of commits required for this is:

9bde1526445369044ccf730fff366a05c5eb6ee3
09b061378776b656b7d3ef1e63a490de011aa6c7
e3782a361136748c617e664415ace10f95778faa
57949e68538341f41504d76c808280bf59987d75
f34636700ae2f9b0762e00fd5a386a8d5733b660
91b5fb3641c91ff4e4778879d4bc866089923c28
542eb560bd8c7b24d4628837730d636713d02f56
80d3e0548316bb7ec5ea957bafb94163ad6a8c21
ebb0d32395ee90af862d7fed33891174a3599091

Although it's possible to simplify this greatly if only
the chmod change and the absolute path to backing file
change are needed, and not the tests and general refactoring
of the code.

Comment 6 kuwei@redhat.com 2017-03-16 09:12:44 UTC
Verify with below bulids:
virt-v2v-1.36.2-2.el7.x86_64
libguestfs-1.36.2-2.el7.x86_64
libvirt-3.1.0-2.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

Verify steps:
1.Convert a guest from ova file by v2v
# virt-v2v -i ova rhel6.7-efi.ova -o null -of raw
[   0.0] Opening the source -i ova rhel6.7-efi.ova
virt-v2v: warning: making OVA directory public readable to work around 
libvirt bug https://bugzilla.redhat.com/1045069
[  28.4] Creating an overlay to protect the source from being modified
[  28.6] Initializing the target -o null
[  28.6] Opening the overlay
[  61.5] Inspecting the overlay
[  75.4] Checking for sufficient free disk space in the guest
[  75.4] Estimating space required on target for each disk
[  75.4] Converting Red Hat Enterprise Linux Server release 6.7 Beta (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 149.5] Mapping filesystem data to avoid copying unused and blank areas
virt-v2v: warning: fstrim on guest filesystem /dev/sda1 failed.  Usually 
you can ignore this message.  To find out more read "Trimming" in 
virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: the discard operation is not 
supported
[ 149.7] Closing the overlay
[ 149.9] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[ 149.9] Assigning disks to buses
[ 149.9] Copying disk 1/1 to /var/tmp/null.K0FkyC/sda (raw)
    (100.00/100%)
[ 175.7] Creating output metadata
[ 175.7] Finishing off
2:Reboot test server to verify it again.
# virt-v2v -i ova rhel6.7-efi.ova -o null -of raw


Result : There are no  error info  when convert a guest from ova file by v2v。
So , I think we could move this to VERIFIED.

Comment 7 errata-xmlrpc 2017-08-01 22:13:55 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://access.redhat.com/errata/RHBA-2017:2023


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