Bug 1309706
| Summary: | error: internal error: Invalid floppy device name: hdb | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Richard W.M. Jones <rjones> | ||||||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 7.3 | CC: | juzhou, mxie, mzhan, ptoscano, rjones, tzheng, xiaodwan | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | V2V | ||||||||||
| 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 17:59:04 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: |
|
||||||||||
Created attachment 1128234 [details]
Output libvirt XML
Created attachment 1128235 [details]
virt-v2v -v -x output
I hit this bug with latest version. Fix posted: https://www.redhat.com/archives/libguestfs/2016-June/msg00145.html https://www.redhat.com/archives/libguestfs/2016-June/msg00146.html Upstream commits: https://github.com/libguestfs/libguestfs/commit/b9613acb94e3328204d96efab0dfc8b8ed1d3368 https://github.com/libguestfs/libguestfs/commit/0421c5afa330b80c17d8dce88abed2cb53f4f5cc *** Bug 1318999 has been marked as a duplicate of this bug. *** 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. 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.
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> 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.
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 |
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.