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 1309706 - error: internal error: Invalid floppy device name: hdb
Summary: error: internal error: Invalid floppy device name: hdb
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
: 1318999 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 14:21 UTC by Richard W.M. Jones
Modified: 2016-11-03 17:59 UTC (History)
7 users (show)

Fixed In Version: libguestfs-1.32.5-6.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 17:59:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Windows 2012 R2 UEFI.ovf (input OVF) (8.45 KB, application/xml)
2016-02-18 14:21 UTC, Richard W.M. Jones
no flags Details
Output libvirt XML (1.42 KB, text/plain)
2016-02-18 14:22 UTC, Richard W.M. Jones
no flags Details
virt-v2v -v -x output (276.21 KB, text/plain)
2016-02-18 14:25 UTC, Richard W.M. Jones
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2576 0 normal SHIPPED_LIVE Moderate: libguestfs and virt-p2v security, bug fix, and enhancement update 2016-11-03 12:06:51 UTC

Description Richard W.M. Jones 2016-02-18 14:21:18 UTC
Created attachment 1128233 [details]
Windows 2012 R2 UEFI.ovf (input OVF)

Description of problem:

Converting a guest which has a floppy disk failed:

error: Failed to define domain from /tmp/v2vlibvirt063486.xml
error: internal error: Invalid floppy device name: hdb

virt-v2v: warning: could not define libvirt domain.  The libvirt XML is 
still available in '/tmp/v2vlibvirt063486.xml'.  Try running 'virsh define 
/tmp/v2vlibvirt063486.xml' yourself instead.

The source guest (from a VMware OVA) has a floppy disk:

      <Item ovf:required="false">
        <rasd:AddressOnParent>0</rasd:AddressOnParent>
        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
        <rasd:Description>Floppy Drive</rasd:Description>
        <rasd:ElementName>Floppy 1</rasd:ElementName>
        <rasd:InstanceID>10</rasd:InstanceID>
        <rasd:ResourceSubType>vmware.floppy.remotedevice</rasd:ResourceSubType>
        <rasd:ResourceType>14</rasd:ResourceType>
      </Item>

virt-v2v tries to create this libvirt XML:

    <disk device='floppy' type='file'>
      <driver name='qemu' type='raw'/>
      <target dev='hdb' bus='ide'/>
    </disk>

and libvirt refuses to create the guest.

Version-Release number of selected component (if applicable):

Upstream libguestfs, but this must affect RHEL 7.2 and 7.3.

How reproducible:

100%

Steps to Reproduce:
1. Convert a guest from VMware which has a floppy disk.

Comment 1 Richard W.M. Jones 2016-02-18 14:22:16 UTC
Created attachment 1128234 [details]
Output libvirt XML

Comment 2 Richard W.M. Jones 2016-02-18 14:25:22 UTC
Created attachment 1128235 [details]
virt-v2v -v -x output

Comment 4 tingting zheng 2016-02-24 13:32:01 UTC
I hit this bug with latest version.

Comment 7 Richard W.M. Jones 2016-06-23 14:43:23 UTC
*** Bug 1318999 has been marked as a duplicate of this bug. ***

Comment 9 zhoujunqin 2016-07-08 10:28:15 UTC
Hi rjones,
I tried with add a floppy device to a virtual machine on exsi host, but failed to reproduce your issue.
Could you please supply such ova file to me, thanks.

Comment 11 zhoujunqin 2016-07-11 10:36:04 UTC
Hi rjones,
I try to reproduce this bug with following build,my result is different from yours, conversion can succeed but with some warning.

Reproduce package version:
virt-v2v-1.32.5-5.el7.x86_64 
libguestfs-1.32.5-5.el7.x86_64

Steps:

# virt-v2v -i ova -o local -os  /opt /tmp/juzhou/win_2012r2_x86_64_uefi.ova  -of raw 
[   0.0] Opening the source -i ova /tmp/juzhou/win_2012r2_x86_64_uefi.ova
[  95.3] Creating an overlay to protect the source from being modified
[  96.4] Initializing the target -o local -os /opt
[  96.4] Opening the overlay
[ 103.2] Inspecting the overlay
[ 107.1] Checking for sufficient free disk space in the guest
[ 107.1] Estimating space required on target for each disk
[ 107.1] Converting Windows Server 2012 R2 Standard to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (6.3 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 109.4] Mapping filesystem data to avoid copying unused and blank areas
[ 111.0] Closing the overlay
[ 111.1] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[ 111.1] Assigning disks to buses
virt-v2v: warning: removable floppy disk device in slot 0 clashes with 
another disk, so it has been moved to a higher numbered slot on the same 
bus.  This may mean that this removable device has a different name inside 
the guest (for example a CD-ROM originally called /dev/hdc might move to 
/dev/hdd, or from D: to E: on a Windows guest).
[ 111.1] Copying disk 1/1 to /opt/Windows 2012 R2 UEFI-sda (raw)
    (100.00/100%)
[ 309.8] Creating output metadata
[ 309.9] Finishing off




Verify package version:
libguestfs-1.32.5-10.el7.x86_64
virt-v2v-1.32.5-10.el7.x86_64
libvirt-2.0.0-2.el7.x86_64
qemu-kvm-1.5.3-116.el7.x86_64

Steps:

# virt-v2v -i ova -o local -os  /opt /tmp/juzhou/win_2012r2_x86_64_uefi.ova  -of raw -on re1
[   0.0] Opening the source -i ova /tmp/juzhou/win_2012r2_x86_64_uefi.ova
[  80.6] Creating an overlay to protect the source from being modified
[  82.3] Initializing the target -o local -os /opt
[  82.3] Opening the overlay
[ 166.8] Inspecting the overlay
[ 169.4] Checking for sufficient free disk space in the guest
[ 169.4] Estimating space required on target for each disk
[ 169.4] Converting Windows Server 2012 R2 Standard to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (6.3 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 170.9] Mapping filesystem data to avoid copying unused and blank areas
[ 172.4] Closing the overlay
[ 172.4] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[ 172.4] Assigning disks to buses
[ 172.4] Copying disk 1/1 to /opt/re1-sda (raw)
    (100.00/100%)
[ 361.1] Creating output metadata
[ 361.3] Finishing off


Result: No warning about floppy device and conversion can be succeed.

so please help me have a look of my reproduce/verify result, thanks.

Comment 12 Richard W.M. Jones 2016-07-11 12:59:10 UTC
Right.  That's actually because the error:

  error: internal error: Invalid floppy device name: hdb

comes from libvirt, not virt-v2v.  If you take the guest created
by virt-v2v 1.32.5-5.el7 and import the guest into libvirt:

  virsh define "/opt/Windows 2012 R2 UEFI.xml"

then you should see the error above (and the error should not
appear with virt-v2v 1.32.5-10.el7).

An easier way to check may be to just look at the libvirt XML.

This is bad:

 <disk device='floppy' type='file'>
   <driver name='qemu' type='raw'/>
   <target dev='hdb' bus='ide'/>      <-----
 </disk>

This is good:

 <disk device='floppy' type='file'>
   <driver name='qemu' type='raw'/>
   <target dev='fda'/>                <-----
 </disk>

Comment 13 zhoujunqin 2016-07-12 02:30:53 UTC
Thanks for rjones reply, then summarize verify steps more clearly.

I can reproduce with package version:
virt-v2v-1.32.5-5.el7.x86_64 
libguestfs-1.32.5-5.el7.x86_64

Steps:
1. Convert a virtual machine with floppy device.
# virt-v2v -i ova -o local -os  /opt /tmp/juzhou/win_2012r2_x86_64_uefi.ova  -of raw 
[   0.0] Opening the source -i ova /tmp/juzhou/win_2012r2_x86_64_uefi.ova
[  95.3] Creating an overlay to protect the source from being modified
[  96.4] Initializing the target -o local -os /opt
[  96.4] Opening the overlay
[ 103.2] Inspecting the overlay
[ 107.1] Checking for sufficient free disk space in the guest
[ 107.1] Estimating space required on target for each disk
[ 107.1] Converting Windows Server 2012 R2 Standard to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (6.3 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 109.4] Mapping filesystem data to avoid copying unused and blank areas
[ 111.0] Closing the overlay
[ 111.1] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[ 111.1] Assigning disks to buses
virt-v2v: warning: removable floppy disk device in slot 0 clashes with 
another disk, so it has been moved to a higher numbered slot on the same 
bus.  This may mean that this removable device has a different name inside 
the guest (for example a CD-ROM originally called /dev/hdc might move to 
/dev/hdd, or from D: to E: on a Windows guest).
[ 111.1] Copying disk 1/1 to /opt/Windows 2012 R2 UEFI-sda (raw)
    (100.00/100%)
[ 309.8] Creating output metadata
[ 309.9] Finishing off

2. Check xml file generated and try to start guest after define

# cat Windows\ 2012\ R2\ UEFI.xml 
    <disk device='floppy' type='file'>
      <driver name='qemu' type='raw'/>
      <target dev='hdb' bus='ide'/>   <-------------
    </disk>

# virsh define Windows\ 2012\ R2\ UEFI.xml 
error: Failed to define domain from Windows 2012 R2 UEFI.xml
error: internal error: Invalid floppy device name: hdb



Then try to verify package with version:
libguestfs-1.32.5-10.el7.x86_64
virt-v2v-1.32.5-10.el7.x86_64
libvirt-2.0.0-2.el7.x86_64
qemu-kvm-1.5.3-116.el7.x86_64

Steps:
1. Convert a virtual machine with floppy device.
# virt-v2v -i ova -o local -os  /opt /tmp/juzhou/win_2012r2_x86_64_uefi.ova  -of raw -on re1
[   0.0] Opening the source -i ova /tmp/juzhou/win_2012r2_x86_64_uefi.ova
[  80.6] Creating an overlay to protect the source from being modified
[  82.3] Initializing the target -o local -os /opt
[  82.3] Opening the overlay
[ 166.8] Inspecting the overlay
[ 169.4] Checking for sufficient free disk space in the guest
[ 169.4] Estimating space required on target for each disk
[ 169.4] Converting Windows Server 2012 R2 Standard to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (6.3 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 170.9] Mapping filesystem data to avoid copying unused and blank areas
[ 172.4] Closing the overlay
[ 172.4] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[ 172.4] Assigning disks to buses
[ 172.4] Copying disk 1/1 to /opt/re1-sda (raw)
    (100.00/100%)
[ 361.1] Creating output metadata
[ 361.3] Finishing off

2. Check xml file generated and try to start guest after define
# cat re1.xml 
...
    <disk device='floppy' type='file'>
      <driver name='qemu' type='raw'/>
      <target dev='fda'/>   <-------------
    </disk>
...

# virsh define re1.xml 
Domain re1 defined from re1.xml

Result: 
1. Conversion finished with no warning about floppy disk.
2. Define virtual machine from xml file correctly and can boot up.

so move this bug from ON_QA to VERIFIED.

Comment 15 errata-xmlrpc 2016-11-03 17:59:04 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/RHSA-2016-2576.html


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