Bug 514831 - cannot attach USB floppy device to existing VM
cannot attach USB floppy device to existing VM
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-30 19:12 EDT by James Ralston
Modified: 2009-07-31 05:04 EDT (History)
6 users (show)

See Also:
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:


Attachments (Terms of Use)

  None (edit)
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.

But:

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.

Whee!

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...

Versions:

0:libvirt-0.6.2-13.fc11
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'.

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