RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1176493 - virt-v2v ignores sound device when convert xen guest to local kvm
Summary: virt-v2v ignores sound device when convert xen guest to local kvm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-22 06:31 UTC by zhoujunqin
Modified: 2015-11-19 06:58 UTC (History)
5 users (show)

Fixed In Version: libguestfs-1.28.1-1.29.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 06:58:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
detail debug log (421.74 KB, text/plain)
2014-12-22 06:31 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2183 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-11-19 08:18:42 UTC

Description zhoujunqin 2014-12-22 06:31:56 UTC
Created attachment 971889 [details]
detail debug log

Description of problem:
virt-v2v ignores sound device when convert xen guest to local kvm

Version-Release number of selected component (if applicable):
libguestfs-1.28.1-1.18.el7.x86_64
virt-v2v-1.28.1-1.18.el7.x86_64
libvirt-1.2.8-11.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a xen guest with sound device.

e.g. # virsh dumpxml xen-fv-rhel7.0-x86_64
there should be  some code like this

...
    <sound model='es1370'/>
...

or you can add a sound card by virt-manager add Hareware.

2. Use virt-v2v convert this guest to local kvm.

# virt-v2v -ic xen+ssh://10.66.106.64 xen-fv-rhel7.0-x86_64 -of raw -on xen-fv-rhel7.0-x86_64-sound-es1370
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-fv-rhel7.0-x86_64
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[   3.0] Initializing the target -o libvirt -os default
[   3.0] Inspecting the overlay
[  13.0] Checking for sufficient free disk space in the guest
[  13.0] Estimating space required on target for each disk
[  13.0] Converting Red Hat Enterprise Linux Server release 7.0 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  52.0] Mapping filesystem data to avoid copying unused and blank areas
[  54.0] Closing the overlay
[  54.0] Copying disk 1/1 to /var/lib/libvirt/images/xen-fv-rhel7.0-x86_64-sound-es1370-sda (raw)
    (100.00/100%)
[ 185.0] Creating output metadata
Pool default refreshed

Domain xen-fv-rhel7.0-x86_64-sound-es1370 defined from /tmp/v2vlibvirtfaa5b7.xml

[ 185.0] Finishing off

3. Repeat step1 & step2 with other type sound device: pcspk/sb16

Actual results:
Conversion finished successfully and guest can be seen via virt-manager, but inspecting the guest HW details the sound card is missing.

Expected results:
1. Sound device can be seen via virt-manager after conversion.
2. If sound device is not supported by rhel7, there should be some information showing.

Additional info:
1. I will attach detail debug log.
2. Sound device type supported on rhel7: ich6/ac97/ich9

Comment 1 Richard W.M. Jones 2014-12-22 08:40:52 UTC
I just checked old virt-v2v, and it didn't transfer sound devices either.

There is an open question about what devices we should copy over --
perhaps we should copy every 'unknown' device.  Although for sound
devices that wouldn't work since we likely do need to convert them
for the new hypervisor.

Anyway this is RHEL 7.2 material.

Comment 2 Richard W.M. Jones 2015-04-20 20:28:23 UTC
Patch posted:
https://www.redhat.com/archives/libguestfs/2015-April/msg00076.html

Comment 3 Richard W.M. Jones 2015-04-22 15:09:51 UTC
Upstream:
https://github.com/libguestfs/libguestfs/commit/3834a1064f866eef4c34440e6dd5023cc47ff7e1
https://github.com/libguestfs/libguestfs/commit/2b0c6e8565977c3a53e3a834f3518cce2128aaec

For RHEL we will also need a RHEL-specific patch to
remove certain devices from the list in v2v/utils.ml
function 'qemu_supports_sound_card'.

The function in RHEL 7 will need to end up like this:

let qemu_supports_sound_card = function
  | AC97
  | ICH6
  | ICH9
  | PCSpeaker
    -> true
  | ES1370
  | SB16
  | USBAudio
    -> false

Comment 5 zhoujunqin 2015-06-26 09:59:15 UTC
I can reproduce this issue with package:
libvirt-1.2.16-1.el7.x86_64
libguestfs-1.28.1-1.38.el7.x86_64
virt-v2v-1.28.1-1.38.el7.x86_64

Then try to verify this issue with new build:
libvirt-1.2.16-1.el7.x86_64
libguestfs-1.28.1-1.40.el7.x86_64
virt-v2v-1.28.1-1.40.el7.x86_64

Scenario1:     <sound model='es1370'/>
1.
# virt-v2v -ic xen+ssh://10.66.106.64 xen-fv-rhel7.0-x86_64 -of raw -on xen-fv-rhel7.0-x86_64-sound-es1370
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-fv-rhel7.0-x86_64
[   0.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[ 127.0] Initializing the target -o libvirt -os default
[ 127.0] Inspecting the overlay
[ 137.0] Checking for sufficient free disk space in the guest
[ 137.0] Estimating space required on target for each disk
[ 137.0] Converting Red Hat Enterprise Linux Server release 7.0 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 184.0] Mapping filesystem data to avoid copying unused and blank areas
[ 186.0] Closing the overlay
[ 186.0] Copying disk 1/1 to /var/lib/libvirt/images/xen-fv-rhel7.0-x86_64-sound-es1370-sda (raw)
    (100.00/100%)
[ 308.0] Creating output metadata
Pool default refreshed

Domain xen-fv-rhel7.0-x86_64-sound-es1370 defined from /tmp/v2vlibvirt80e0c6.xml

[ 310.0] Finishing off

Result1: After conversion, there is no sound device in guest configuration.

# virsh dumpxml xen-fv-rhel7.0-x86_64-sound-es1370  |grep sound
  <name>xen-fv-rhel7.0-x86_64-sound-es1370</name>
      <source pool='default' volume='xen-fv-rhel7.0-x86_64-sound-es1370-sda'/>

Result2: when set <sound model='sb16'/>, get same result.


Scenario2:     <sound model='pcspk'/>
1.
# virt-v2v -ic xen+ssh://10.66.106.64 xen-fv-rhel7.0-x86_64 -of raw -on xen-fv-rhel7.0-x86_64-sound-pcspk
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-fv-rhel7.0-x86_64
[   1.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[   4.0] Initializing the target -o libvirt -os default
[   4.0] Inspecting the overlay
[  15.0] Checking for sufficient free disk space in the guest
[  15.0] Estimating space required on target for each disk
[  15.0] Converting Red Hat Enterprise Linux Server release 7.0 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  60.0] Mapping filesystem data to avoid copying unused and blank areas
[  62.0] Closing the overlay
[  62.0] Copying disk 1/1 to /var/lib/libvirt/images/xen-fv-rhel7.0-x86_64-sound-pcspk-sda (raw)
    (100.00/100%)
[ 181.0] Creating output metadata
Pool default refreshed

Domain xen-fv-rhel7.0-x86_64-sound-pcspk defined from /tmp/v2vlibvirtca8206.xml

[ 181.0] Finishing off

Result: After conversion, we can found sound device in guest co

# virsh dumpxml xen-fv-rhel7.0-x86_64-sound-pcspk |grep sound
  <name>xen-fv-rhel7.0-x86_64-sound-pcspk</name>
      <source pool='default' volume='xen-fv-rhel7.0-x86_64-sound-pcspk-sda'/>
    <sound model='pcspk'/>

Since above 2 scenarios testing result is consistent with Comments 3 said, move this bug from ON_QA to VERIFIED.

Comment 7 errata-xmlrpc 2015-11-19 06:58:35 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://rhn.redhat.com/errata/RHBA-2015-2183.html


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