Fedora Account System
Red Hat Associate
Red Hat Customer
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
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'.