Bug 1468509

Summary: Failed to import and convert guest from kvm source if guest's disk type is volume at rhv4.1
Product: Red Hat Enterprise Linux 7 Reporter: mxie <mxie>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.8CC: jsuchane, juzhou, linl, michal.skrivanek, mxie, mzhan, nsimsolo, ptoscano, rjones, tgolembi, tzheng, xiaodwan, xuzhang
Target Milestone: rcKeywords: Reopened, TestOnly
Target Release: 7.8   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1469077 (view as bug list) Environment:
Last Closed: 2020-02-04 13:10:40 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:
Attachments:
Description Flags
no-disk
none
vdsm.log
none
engine.log
none
failed-import
none
import-from-rhel8.png none

Description mxie@redhat.com 2017-07-07 09:53:33 UTC
Created attachment 1295243 [details]
no-disk

Description of problem:
Failed to import and convert guest from kvm source if guest's disk type is volume at rhv4.1

Version-Release number of selected component (if applicable):
rhv:4.1.3-0.1.el7
vdsm-4.19.20-1.el7ev.x86_64
virt-v2v-1.36.3-6.el7.x86_64
libguestfs-1.36.3-6.el7.x86_64
libvirt-client-3.2.0-14.el7.x86_64
qemu-kvm-rhev-2.9.0-14.el7.x86_64
libguestfs-winsupport-7.2-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest whose disk type is volume without floppy or CDROM device
#virsh dumpxml win2k12-file-virtio
....
   disk type='volume' device='disk'>
      <driver name='qemu' type='raw'/>
      <source pool='default' volume='esx6.0-win2012-x86_64-sda'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
....
2.Log in rhv and import guest from kvm as below steps, but failed to import the guest whose disk type is volume without floppy/CDROM device,  pls refer to screenshot "failed-import" and vdsm-import.log/engine-import.log

Open virtual machine option at rhv4.1 -> click import button -> choose source as KVM(via libvirt)->input URL:qemu+tcp://ip/system, username/password->Load guests successfully-> select guest "win2k12-file-virtio" to import

3.Add floppy/CDROM device to guest "win2k12-file-virtio" and try step2, then guest could be imported successfully

4.Although Guest win2k12-file-virtio could be imported but conversion of v2v can't be started because there is no disk listed in disk option pls refer to screenshot"no-disk"

Actula results:
As above description

Expected results:
Could import and convert guest from kvm source if disk type is volume at rhv4.1


Additional info:
Could import and convert guest from kvm source if disk type is file at rhv4.1 successfully

Comment 2 mxie@redhat.com 2017-07-07 09:54:14 UTC
Created attachment 1295244 [details]
vdsm.log

Comment 3 mxie@redhat.com 2017-07-07 09:54:39 UTC
Created attachment 1295245 [details]
engine.log

Comment 4 mxie@redhat.com 2017-07-07 09:55:22 UTC
Created attachment 1295246 [details]
failed-import

Comment 5 Richard W.M. Jones 2017-07-07 10:04:08 UTC
The only error I can see in the logs is:

2017-07-07 11:21:20,640+0800 WARN  (jsonrpc/7) [root] Cannot add VM win2k12-file-virtio due to disk storage error (v2v:1020)

Is there no other information available in any other log?

Comment 6 mxie@redhat.com 2017-07-07 10:19:53 UTC
Hi rjones,

  Yes, only got one error from vdsm.log, I doubt the problem is due to ovirt or vdsm can't recognize the volume disk

Comment 7 Tomáš Golembiovský 2017-07-10 11:07:32 UTC
This is indeed a VDSM issue. Currently we support only type='file' and type='block'. I cloned this and turned into RFE against VDSM.

*** This bug has been marked as a duplicate of bug 1469077 ***

Comment 11 Michal Skrivanek 2017-09-28 12:17:00 UTC
Sorry, this bug is not changed but closed. Verified by rhv qe

Comment 13 Tomáš Golembiovský 2019-06-25 18:40:07 UTC
I don't understand why is this bug still open. This was fixed in oVirt bug 1469077 and there is nothing in libguestfs that would require changes. Please either close the bug right away or move to QE for verification if that is required.

Comment 14 tingting zheng 2019-06-26 03:29:45 UTC
(In reply to Tomáš Golembiovský from comment #13)
> I don't understand why is this bug still open. This was fixed in oVirt bug
> 1469077 and there is nothing in libguestfs that would require changes.
> Please either close the bug right away or move to QE for verification if
> that is required.

QE will test this bug with latest rhv and add comments later.

Comment 15 Jaroslav Suchanek 2020-01-23 10:13:39 UTC
Please re-test. Thanks.

Comment 16 mxie@redhat.com 2020-02-04 13:10:40 UTC
Verify the bug with below builds:
*KVM host:rhel7.8 
  kernel-3.10.0-1111.el7.x86_64
  libvirt-4.5.0-23.el7_7.4.x86_64
  qemu-kvm-rhev-2.12.0-33.el7_7.7.x86_64
*RHV env:4.3.7.0-0.1.el7


Steps:
1.Prepare a guest whose disk type is volume without floppy or CDROM device
# virsh dumpxml esx6.0-rhel7.7-x86_64
<domain type='kvm'>
  <name>esx6.0-rhel7.7-x86_64</name>
  .....
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source pool='default' volume='esx6.0-rhel7.7-x86_64-sda'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
....

2.Log in rhv and import guest from kvm source
3.Check guest after finishing importing, guest can boot into OS normally


Additional info:
  Try to import guest from rhel8.1 kvm host on rhv4.3, but can't load guests from rhel8 host on rhv4.3 with error info "VDSM NFS command GetVmsNamesFromExternalProviderVDS failed: unable to connect to server at '10.73.224.193:16509': Connection refused", pls refer to screenshot "import-from-rhel8", maybe rhv4.3 doesn't support importing guests from rhel8 yet, I think we should change  product from Red Hat Enterprise Linux Advanced Virtualization to Red Hat Enterprise Linux 7


Result:
  Can import guest whose disk type is volume from RHEL7 kvm host on rhv4.3 now, bug has been fixed on rhv4.3, so close the bug as CURRENTRELEASE

Comment 17 mxie@redhat.com 2020-02-04 13:12:31 UTC
Created attachment 1657547 [details]
import-from-rhel8.png

Comment 18 Tomáš Golembiovský 2020-02-04 14:39:46 UTC
(In reply to mxie from comment #16)
>   Try to import guest from rhel8.1 kvm host on rhv4.3, but can't load guests
> from rhel8 host on rhv4.3 with error info "VDSM NFS command
> GetVmsNamesFromExternalProviderVDS failed: unable to connect to server at
> '10.73.224.193:16509': Connection refused"

This may be caused by firewalling or other network setup in your environment. If you are sure there's no problem with your setup and connection to libvirt on your rhel8 host from other machines works then please open a new bug on VDSM for this and attach the vdsm.log.

Comment 19 mxie@redhat.com 2020-02-05 10:11:03 UTC
> This may be caused by firewalling or other network setup in your
> environment. If you are sure there's no problem with your setup and
> connection to libvirt on your rhel8 host from other machines works then
> please open a new bug on VDSM for this and attach the vdsm.log.

Thanks Tomas, file bug1798399 to track problem