Bug 1443955 - There is error info about permission denied when convert a guest from vmx file by virt-v2v
Summary: There is error info about permission denied when convert a guest from vmx fil...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On: 1045069
Blocks: 1558351
TreeView+ depends on / blocked
 
Reported: 2017-04-20 10:39 UTC by kuwei@redhat.com
Modified: 2019-05-13 09:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-13 09:39:48 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description kuwei@redhat.com 2017-04-20 10:39:56 UTC
Description of problem:
There is error info about permission denied when convert a guest from vmx file by virt-v2v

Version-Release number of selected component (if applicable):
virt-v2v-1.36.3-3.el7.x86_64
libguestfs-1.36.3-3.el7.x86_64
libvirt-3.2.0-3.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

How reproducible:
100% 

Steps to Reproduce:
1.Mount the NFS storage which contains VMware virtual machines to virt-v2v conversion server as below:
#mount IP:/path  /mnt

2.Locate in VMware virtual machine directory, then import the vmx file to KVM by virt-v2v
#virt-v2v -i vmx esx5.5-rhel7.2-x86_64.vmx -of qcow2
[   0.0] Opening the source -i vmx esx5.5-rhel7.2-x86_64.vmx
[   0.0] Creating an overlay to protect the source from being modified
[   0.2] Initializing the target -o libvirt -os default
[   0.2] 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: internal error: process exited while 
connecting to monitor: 2017-04-20T06:30:44.247605Z qemu-kvm: -drive 
file=/var/tmp/v2vovl4f2b14.qcow2,format=qcow2,if=none,id=drive-scsi0-0-0-0,cache=unsafe,discard=unmap: 
Could not open backing file: Could not open 
'/mnt/esx5.5-rhel7.2-x86_64/esx5.5-rhel7.2-x86_64.vmdk': Permission denied 
[code=1 int1=-1]

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:
virt-v2v should not report any error when convert a guest from vmx file by virt-v2v.

Additional info:

Comment 2 Richard W.M. Jones 2017-04-20 10:46:25 UTC
Yes, I have seen this problem too.

The workaround is to set LIBGUESTFS_BACKEND=direct before conversion.

I believe it's the usual thing related to lack of qemu:///session
support as root in libvirt (bug 890291 / bug 1045069).

Anyway we will have to leave this one open until RHEL 7.5.

Comment 3 Richard W.M. Jones 2019-05-13 09:39:48 UTC
We don't plan to fix this (or the real bug 1045069) in RHEL 7, so I'm
closing this.  This probably does occur on RHEL 8, but the real bug here
is in libvirt, not virt-v2v.


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