7.1. Installing a virtualized floppy disk controller

7.1. Installing a virtualized floppy disk controller

Presently, physical floppy disks can not be mapped to virtualized guests, however, you can access a virtualized floppy drive created using an image file of a floppy disk and a modified configuration file. The section will guide you through the process.

This section uses a guest system created with virt-manager running a fully virtualized Red Hat Enterprise Linux installation with an image located in /var/lib/xen/images/rhel5FV-1.img.


There is no guarantee that this section will work for your system at this time. Para-virtualized guests can access floppy drives as well as using para-virtualized drivers on a fully virtualized system. For more information on using para-virtualized drivers read Chapter 13, Introduction to Para-virtualized Drivers.

Create the XML configuration file for your guest image using the following command on a running guest. This will save the configuration settings as an XML file which can be edited to customize the operations the guest performs when the guest is started. For another example of editing the virsh XML files, read Chapter 27, Creating custom Red Hat Virtualization scripts.

# virsh dumpxml rhel5FV > rhel5FV.xml

Execute this instruction to create a floppy image to use on the guest.

dd if=/dev/zero of=/var/lib/xen/images/rhel5FV-1flop.img bs=512 count=2880

Add the content below, changing where appropriate, to your guest's configuration XML file. This example creates a guest with a floppy device as a file based virtual device.

<disk type='file' device='floppy'>
	<source file='/var/lib/xen/images/rhel5FV-1flop.img'/>
	<target dev='fda'/>

Stop the guest system, and restart the guest using the XML configuration file.

# virsh create rhel5FV.xml

The floppy device is now available in the guest and stored as an image file on the host.

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.