Bug 1309706 - error: internal error: Invalid floppy device name: hdb
error: internal error: Invalid floppy device name: hdb
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
V2V
:
: 1318999 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-18 09:21 EST by Richard W.M. Jones
Modified: 2016-11-03 13:59 EDT (History)
7 users (show)

See Also:
Fixed In Version: libguestfs-1.32.5-6.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 13:59:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Richard W.M. Jones 2016-02-18 09:21:18 EST
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 09:22 EST
Created attachment 1128234 [details]
Output libvirt XML
Comment 2 Richard W.M. Jones 2016-02-18 09:25 EST
Created attachment 1128235 [details]
virt-v2v -v -x output
Comment 4 tingting zheng 2016-02-24 08:32:01 EST
I hit this bug with latest version.
Comment 7 Richard W.M. Jones 2016-06-23 10:43:23 EDT
*** Bug 1318999 has been marked as a duplicate of this bug. ***
Comment 9 zhoujunqin 2016-07-08 06:28:15 EDT
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 06:36:04 EDT
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 08:59:10 EDT
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-11 22:30:53 EDT
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 13:59:04 EDT
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.