Sunday 12 January 2014

Hyper-V and floppy disks

Using floppy disks on Hyper-V virtual machines

The problem

Hyper-V is great, but Microsoft have removed support for floppy disks. That's fine for most of the time, but what about when you need to read a dusty old floppy disk ...

A while ago I developed some software that was ported to various UNIX platforms. I moved code and compiled binaries around on floppy disks and recently had the need to read one of these. So I fired up my Red Hat Linux VM and found that unfortunately I couldn't add my physical (USB attached) floppy drive to the VM.

You can however attach a virtual floppy disk via a floppy drive image file. So the problem became how to read my physical floppy drive to an image, ahead of mounting it in my Red Hat environment.

The solution

You will need a physical floppy drive for this. I picked up a USB drive on eBay for a few quid.

Read the floppy drive image from the physical media to an image file

  1. Download a program called "dd" from here. (This is a Windows version of a UNIX command that can stream physical media, such as a floppy disk, to a file on your hard drive.
  2. Open a command prompt and run the command to read the floppy drive to a file:
                      dd if=\\.\a: of=floppyimage.vfd bs=1440k

You will now have a file "floppyimage.vfd" that is a copy of all of the contents of the floppy drive. You are now finished with the physical floppy drive, so you can unplug it and put it away safely, so you can find it in 5 years time when you need it again.

Attach the floppy image file to your virtual machine


  1. Open up the settings for your Hyper-V virtual machine
  2. In the "Hardware" section on the left, find the "Diskette Drive" and using the Floppy Drive settings, browse to the virtual floppy (.vfd) file you just created above.
  3. Now the operating system will be able to read the floppy (image) as if the floppy disk itself was inserted into a drive on the machine. In my case I could read the drive on Red Hat via the /dev/fd0 device. On a Windows virtual machine you should see an A:\ drive