Bug 1612785 - "warning: <target dev='sr0'> was ignored because the device name could not be recognized" should be hidden since convert cdrom is supported by virt-v2v
Summary: "warning: <target dev='sr0'> was ignored because the device name could not be...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.6
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: P2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-06 09:22 UTC by zhoujunqin
Modified: 2019-08-26 03:09 UTC (History)
4 users (show)

Fixed In Version: libguestfs-1.38.2-11.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 07:47:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot for conversion page (229.19 KB, image/png)
2018-08-06 09:22 UTC, zhoujunqin
no flags Details
virt-v2v-conversion-log-local.txt (1.32 MB, text/plain)
2018-08-06 09:24 UTC, zhoujunqin
no flags Details
virt-v2v-conversion-log-rhv.txt (11.03 KB, text/plain)
2018-08-06 09:24 UTC, zhoujunqin
no flags Details
virt-v2v-conversion-log-rhv.txt (1.33 MB, text/plain)
2018-08-10 03:39 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:3021 0 None None None 2018-10-30 07:47:28 UTC

Description zhoujunqin 2018-08-06 09:22:44 UTC
Created attachment 1473549 [details]
Screenshot for conversion page

Description of problem:
"warning: <target dev='sr0'> was ignored because the device name could not be recognized" should be hidden since convert cdrom is supported by virt-v2v

Version-Release number of selected component (if applicable):
virt-v2v-1.38.2-10.el7.x86_64
libguestfs-1.38.2-10.el7.x86_64
libvirt-4.5.0-6.el7.x86_64
qemu-kvm-rhev-2.12.0-9.el7.x86_64
virt-p2v-1.38.2-3.el7.noarch
rhv:4.2.5-0.1.el7ev

How reproducible:
100%

Steps to Reproduce:
1. Install rhel7.5 on LSI-megaraid_sas host
2. Boot host into virt-p2v client via virt-p2v-1.38.2-3.el7.iso file attached.
3. Input conversion server info and pass the test connection
4  Input conversion info, then start convert host to local directory '/home'.
5. The conversion should be finished without error 
6.  Then import guest and login guest to check.

Actual results:
Step5: The conversion finished without error but with following warning message in conversion log.
virt-v2v: warning: <target dev='sr0'> was ignored because the device name
could not be recognized
virt-v2v: warning: <target dev='sr1'> was ignored because the device name
could not be recognized

Step6: Guest can be started successfully,  then login guest and check cdrom devices' status.
6.1  Check converted guest running on libvirt host by 
# virsh dumpxml raid-cdrom
...
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
...

6.2 Login guest and check, in fact there are 2 cdrom devices list.
# lsblk 
NAME                           MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0                             11:0    1  1024M  0 rom  
sr1                             11:1    1  1024M  0 rom  
vda                            252:0    0 278.9G  0 disk 
├─vda1                         252:1    0     1G  0 part /boot
└─vda2                         252:2    0 277.9G  0 part 
  ├─rhel_dell--per730--60-root 253:0    0    50G  0 lvm  /
  ├─rhel_dell--per730--60-swap 253:1    0  27.9G  0 lvm  [SWAP]
  └─rhel_dell--per730--60-home 253:2    0   200G  0 lvm  /home

Details please see attachment: virt-v2v-conversion-log-local.txt

Expected results:
"warning: <target dev='sr0'> was ignored because the device name could not be recognized" should be hidden since convert cdrom is supported by virt-v2v

Additional info:
I also convert this host to rhv environment, it also shows above warning, but after import guest and start, i only find 1 cdrom device in rhv UI.
Details please see attachment: virt-v2v-conversion-log-rhv.txt

Comment 2 zhoujunqin 2018-08-06 09:24:04 UTC
Created attachment 1473550 [details]
virt-v2v-conversion-log-local.txt

Comment 3 zhoujunqin 2018-08-06 09:24:33 UTC
Created attachment 1473551 [details]
virt-v2v-conversion-log-rhv.txt

Comment 4 Pino Toscano 2018-08-09 11:50:27 UTC
(In reply to zhoujunqin from comment #3)
> Created attachment 1473551 [details]
> virt-v2v-conversion-log-rhv.txt

Note this conversion failed, because the guest "dell-per730-60" already exists.

Comment 5 Pino Toscano 2018-08-09 12:04:36 UTC
(In reply to zhoujunqin from comment #0)
> Additional info:
> I also convert this host to rhv environment, it also shows above warning,
> but after import guest and start, i only find 1 cdrom device in rhv UI.

Tomáš Golembiovský confirmed that RHV supports only one CDROM per guest.

Comment 6 Pino Toscano 2018-08-09 13:06:05 UTC
First attempt at this:
https://www.redhat.com/archives/libguestfs/2018-August/msg00093.html

Comment 7 zhoujunqin 2018-08-10 03:39:10 UTC
(In reply to Pino Toscano from comment #4)
> (In reply to zhoujunqin from comment #3)
> > Created attachment 1473551 [details]
> > virt-v2v-conversion-log-rhv.txt
> 
> Note this conversion failed, because the guest "dell-per730-60" already
> exists.

Sorry for the wrong attachment, i have reattached it, thanks.

Comment 8 zhoujunqin 2018-08-10 03:39:48 UTC
Created attachment 1474871 [details]
virt-v2v-conversion-log-rhv.txt

Comment 9 Pino Toscano 2018-08-10 13:08:28 UTC
Fixed upstream with
https://github.com/libguestfs/libguestfs/commit/c9abaa3e96e7209595f0982c1f2f97e37f3369a6
which is libguestfs >= 1.39.9.

Comment 11 Pino Toscano 2018-08-15 12:18:20 UTC
Note: even if this something you hit when using virt-p2v, the actual fix is in virt-v2v.

Comment 12 mxie@redhat.com 2018-08-16 09:14:30 UTC
Verify the bug with builds:
virt-v2v-1.38.2-11.el7.x86_64
libguestfs-1.38.2-11.el7.x86_64
virt-p2v-1.38.2-4.el7.iso


Steps:
1.Install OS on physical machine which has CD drive
2.Boot host into virt-p2v client
3.Input v2v conversion server info and pass the test connection
4.There is "sr0" listed in removable media in p2v client
5 Input conversion info and start convert host to rhv4.2. There is no virt-v2v warning about "sr0" showing in p2v client during p2v converting
6.Check guest has CDROM on rhv4.2 after finishing conversion


Result:

  "virt-v2v: warning: <target dev='sr0'> was ignored because the device name
could not be recognized"  has disappeared during p2v conversion when host has CD drive and guest has CDROM after conversion, so move the bug from ON_QA to VERIFIED

Comment 14 errata-xmlrpc 2018-10-30 07:47:00 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/RHEA-2018:3021


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