Bug 1778031 - RuntimeError: direct upload to host not supported
Summary: RuntimeError: direct upload to host not supported
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libguestfs
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On: 1778029
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-29 04:23 UTC by Xiaodai Wang
Modified: 2020-05-05 09:51 UTC (History)
10 users (show)

Fixed In Version: libguestfs-1.40.2-21.module+el8.2.0+5851+8d6a931b
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1778029
Environment:
Last Closed: 2020-05-05 09:51:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ovirt log (2.23 MB, application/gzip)
2019-11-30 08:38 UTC, Xiaodai Wang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:51:57 UTC

Description Xiaodai Wang 2019-11-29 04:23:51 UTC
+++ This bug was initially created as a clone of Bug #1778029 +++

Description of problem:
RuntimeError: direct upload to host not supported

Version-Release number of selected component (if applicable):
libvirt-4.5.0-28.el7.x86_64
qemu-kvm-rhev-2.12.0-38.el7.x86_64
libguestfs-1.40.2-8.el7.x86_64
virt-v2v-1.40.2-8.el7.x86_64
nbdkit-1.8.0-3.el7.x86_64
nbdkit-1.8.0-3.el7.x86_64
nbdkit-plugin-vddk-1.8.0-3.el7.x86_64
nbdkit-plugin-python2-1.8.0-3.el7.x86_64
nbdkit-plugin-python-common-1.8.0-3.el7.x86_64

ovirt:
ovirt-engine-4.3.6.5-0.1.el7.noarch
ovirt-imageio-proxy-1.5.2-0.el7ev.noarch

ovirt node:
vdsm-4.30.33-1.el7ev.x86_64
ovirt-imageio-daemon-1.5.2-0.el7ev.noarch

How reproducible:
Hardly reproduce.

Steps to Reproduce:
The problem occurs when doing rhv-upload by v2v and '-oo rhv-direct' must be given.

e.x.
virt-v2v  -i ova  -ic qemu:///system -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt /home/ova-images/esx-rhel6-ova.tar -on ova_vm_wxq -oc https://xxxx/ovirt-engine/api -op /tmp/rhv_upload_passwd_file -oo rhv-cafile=/tmp/rhv_upload_ca.pem -oo rhv-cluster=NFS -oo rhv-direct 

Actual results:
libguestfs: trace: disk_has_backing_file = 1qemu-img 'convert' '-p' '-n' '-f' 'qcow2' '-O' 'raw' '/var/tmp/v2vovl62e909.qcow2' 'json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.Yo89gB/nbdkit0.sock", "file.export": "/" }'nbdkit: debug: accepted connectionnbdkit: python[1]: debug: newstyle negotiation: flags: global 0x3nbdkit: python[1]: debug: newstyle negotiation: client flags: 0x3nbdkit: python[1]: debug: newstyle negotiation: NBD_OPT_GO: client requested export '/' (ignored)nbdkit: python[1]: debug: python: open readonly=0disk.id = 'a806db7c-3d12-4c05-a782-606b4e555e98'cannot read /etc/vdsm/vdsm.id, using any host: [Errno 2] No such file or directory: '/etc/vdsm/vdsm.id'transfer.id = 'd5d227d2-0120-4fea-9af2-12b65e879096'nbdkit: python[1]: error: /var/tmp/v2v.uUtxcu/rhv-upload-plugin.py: open: error: ['Traceback (most recent call last):
', '  File "/var/tmp/v2v.uUtxcu/rhv-upload-plugin.py", line 227, in open
    raise RuntimeError("direct upload to host not supported, "
', 'RuntimeError: direct upload to host not supported, requires ovirt-engine >= 4.2 and only works when virt-v2v is run within the oVirt/RHV environment, eg. on an oVirt node.
']qemu-img: Could not open 'json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.Yo89gB/nbdkit0.sock", "file.export": "/" }': Failed to read option reply: Unexpected end-of-file before all bytes were readvirt-v2v: error: qemu-img command failed, see earlier errorsrm -rf '/var/tmp/ova.qkrqDn'rm -rf '/var/tmp/v2v.TgrfFV'rm -rf '/var/tmp/v2v.uUtxcu'rm -rf '/var/tmp/v2v.X7bQJ2'rm -rf '/var/tmp/rhvupload.Yo89gB'rm -rf '/var/tmp/null.3m4uO9'libguestfs: trace: closelibguestfs: closing guestfs handle 0x55cb9e38d0f0 (state 0)nbdkit: debug: python: unload

Expected results:
v2v should run successfully.

Additional info:
https://www.redhat.com/archives/libguestfs/2019-November/msg00319.html

--- Additional comment from RHEL Product and Program Management on 2019-11-29 04:19:37 UTC ---

Since this bug report was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.

Comment 1 Richard W.M. Jones 2019-11-29 08:08:23 UTC
Fixed by Nir yesterday in:
https://www.redhat.com/archives/libguestfs/2019-November/msg00319.html

Comment 2 Xiaodai Wang 2019-11-30 08:38:20 UTC
Created attachment 1640809 [details]
ovirt log

Comment 3 Nir Soffer 2020-01-13 19:54:29 UTC
Fixed upstream in:

commit 40e1844827e4d096b1919a2159f9effc41915a73
Author: Nir Soffer <nsoffer>
Date:   Thu Nov 28 20:36:32 2019 +0200

    rhv-upload: Fix waiting for transfer

Comment 4 Pino Toscano 2020-02-24 09:18:57 UTC
Notes to self: this will most probably need also
9863044f5e825e4e29bea0310b1da0e40add579e
8816c5db220f518ef70beec7ac543290e3d5c0c7
d4ca9b6ca42d4ad3c717f5c59402ca6ff5d322bb

Comment 7 liuzi 2020-03-03 12:52:45 UTC
Verify bug with builds:
virt-v2v-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
libguestfs-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
libvirt-6.0.0-5.module+el8.2.0+5765+64816f89.x86_64
qemu-kvm-4.2.0-10.module+el8.2.0+5740+c3dff59e.x86_64
nbdkit-1.16.2-2.module+el8.2.0+5664+dd92f997.x86_64

Steps:
1.Use virt-v2v to convert a guest to rhv with parameter "-oo rhv-direct"
#  virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.6-multi-network --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /home/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct=true -oo rhv-cluster=Default
[   0.4] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel7.6-multi-network
[   2.2] Creating an overlay to protect the source from being modified
[   2.7] Opening the overlay
[  25.0] Inspecting the overlay
[ 199.5] Checking for sufficient free disk space in the guest
[ 199.5] Estimating space required on target for each disk
[ 199.5] Converting Red Hat Enterprise Linux Server 7.6 (Maipo) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el7’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
virt-v2v: This guest has virtio drivers installed.
[1754.9] Mapping filesystem data to avoid copying unused and blank areas
[1757.2] Closing the overlay
[1757.3] Assigning disks to buses
[1757.3] Checking if the guest needs BIOS or UEFI to boot
[1757.3] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -os nfs_data
[1759.2] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.0RoCqS/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[2811.2] Creating output metadata
[2812.7] Finishing off

Result:Conversion can be finished successfully and the guests can pass all checkpoints.so change the bug from ON_QA to VERIFIED.

Comment 9 errata-xmlrpc 2020-05-05 09:51:23 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-2020:2017


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