Bug 514831 - cannot attach USB floppy device to existing VM
Summary: cannot attach USB floppy device to existing VM
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-30 23:12 UTC by James Ralston
Modified: 2009-07-31 09:04 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-07-31 09:04:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Ralston 2009-07-30 23:12:58 UTC
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 Berrangé 2009-07-31 09:04:21 UTC
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.