Bug 514831

Summary: cannot attach USB floppy device to existing VM
Product: [Fedora] Fedora Reporter: James Ralston <ralston>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: berrange, clalance, crobinso, itamar, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-31 05:04:21 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description James Ralston 2009-07-30 19:12:58 EDT
I have a KVM-based virtual guest on my laptop. I've attached a USB floppy drive (which appears as /dev/sdb) to my laptop. I need to make that floppy drive visible to the guest.


virsh # attach-disk myguest /dev/sdb fd0 --driver tap --type floppy
error: No support floppy in command 'attach-disk'

Hmmm. Let's try without --floppy:

virsh # attach-disk myguest /dev/sdb fd0 --driver tap
error: internal error cannot attach device on inactive domain

Ok, so I start the virtual guest, then try again:

virsh # attach-disk myguest /dev/sdb fd0 --driver tap --type floppy
error: this function is not supported by the hypervisor: disk bus 'ide' cannot be hotplugged.


From searching, I see that others have had problems performing this operation as well, but I haven't seen any resolutions.

For now, I've taken a decidedly brute-force approach, which is to rename /usr/bin/qemu-kvm to /usr/bin/qemu-kvm.REAL, and create this script as /usr/bin/qemu-kvm:

#! /bin/sh
exec qemu-kvm.REAL $@ -fda /dev/sdb

It works, but virsh could really use a healthy sprinkle of FAIL-B-GONE...


Comment 1 Daniel Berrange 2009-07-31 05:04:21 EDT
The 'attach-disk' command is for transient hotplugging of new disks, or changing the media on existing CDROM/floppy disks. It cannot hotplug IDE disks/cdroms or floppy disks, only hotplug VirtIO or SCSI.

If you wish to add a floppy disk, then power off the VM, and use 'virsh edit GUEST' to alter the persistent config. Or use a combination fo 'virsh dumpxml', emacs, followed by 'virsh define'.