Saturday, March 21, 2009

Hyper-V floppy trivia

 

Hyper-V floppy trivia

"When I were a lad" (you have to say that in a northern British accent for authenticity), I used to catch the “Number 64” bus outside Fairfield Halls in Central Croydon as a leg of my journey to Junior school.

The busses never arrived as scheduled some six or seven minutes apart during rush hour – instead, three of them nearly always arrived together. 1970’s London transport at it’s very best :). (Ask me about the “233 bus episode sometime – it has a different route these days, but ask only in person, and with a case of beer in hand…..”).

What has this to do with Hyper-V? Bad 1970’s bus scheduling came to mind when the floppy disk controller in Hyper-V came up in three conversations in one week – I don’t recall it being mentioned for months beforehand. So I figured it was time to explain a little about the floppy disk controller in Hyper-V.

The first thing to note is that it cannot be connected to a physical floppy disk drive (does anyone, apart from me, still have, and use, one....?). The floppy disk controller in Hyper-V can only hold virtual media in the form of .VFD files, otherwise known as Virtual Floppy Disks.

The next thing to address is the media types the controller supports. It supports 1.44KB and 720KB floppies. (Which also reminds me of "when I were a lad" cutting out a fake tab on 5 1/4" disks to write to them upside down for use on PETs and 380Z's, doubling the available space to (IIRC) 720KB - saved me a fortune at the time, being a somewhat prolific collector and developer of PET programs ). I guess I'm not quite old enough to remember 8" floppies too well though....

Next, the question which cropped up twice. Why is there a file called "blank.vfd" in the “\Users\Public\Documents\Hyper-V\Blank floppy disk” directory when you enable the Hyper-V role? And further, when you try and insert the media into a VM, you get an error "Inserting the disk failed... The file blank.vfd does not have the required security settings. Error: 'General access denied error'".

floppy-insert

To answer these questions requires cranking back the time machine to June 2006, a few months after I joined the Hyper-V team. Remember June 2006 was two years before we shipped Hyper-V “v1” RTM, so code was in flux and in full-scale development. We didn't plan back then to ship UI to create new floppy disk media. So it made sense to include a blank floppy disk image in the installation (and yes, I was responsible – in fact, I created blank.vfd using Virtual Server IIRC – could have been Virtual PC though). That’s why we laid the file down during installation.  (Note: The UI can only create 1.44KB .VFDs, but you can still use Virtual PC to create 720KB .VFDs).

We didn't want people deleting blank.vfd accidentally, or writing to it (as it otherwise wouldn’t be blank), so we set security on the file so that users and administrators didn’t have write permission. That’s why you get the ‘General access denied error’ inserting the media.

floppy-perms

Wind forward a few months more (I don’t recall exactly when), plans changed, and the Hyper-V UI was extended to include the ability to create a new floppy disk from the MMC (or the “browser” as it was called then – the name “Hyper-V” was still way off in the future).

Things being what they can be, it was an oversight that the UI now provided the ability to create a blank VFD file, and we installed one. On to June 2008 when we RTM’d, blank.vfd was still being installed. I guess in retrospect we didn’t do a lot of testing using blank.vfd – our test automation for floppies created a new file as part of the test.

The last question which cropped up was “Why does Hyper-V even have a floppy controller?”. There’s a couple of reasons. For compatibility with unsupported older operating systems, it’s often necessary to boot from a floppy to install the OS. There’s clearly no business case for this though. The main reason for including support for floppies is Windows Server 2003 full system backup which uses a floppy disk as part of a full system backup.

Do please let me know if you have alternate reasons for using the floppy disk controller in Hyper-V, or even still use physical floppy disks (somewhat) regularly. I’d hate to be the only one (but suspect I might)….

Cheers,
John.

John Howard - Hyper-V and virtualization blog : Hyper-V floppy trivia

2 comments:

Marcus said...

Hi Todd.

Funny thing is We still use it.

And you right we user it for our backups (ASR)

I have a question, and can't seem to find the answer for.

I have a VM on a(Hyper-V base).
When i do a ntbackup which includes the data that is stored in the virtual floppy drive.

I the setup a nother clean VM configure this VM to use the same floppy drive as above but all i get when i boot the server is "Remove Disk or other media. Press any key to restart." and thats all it does and idea what im doing wrong?

We trying to test our DR for our VM servers.

Any help / pointers would be appreciated.

James Tuson said...

Interesting article thanks.

I have never used a floppy in my life, and don't think I ever will.

We use Backup Exec for backups.

I came across this article while looking for a way to remove the floppy drive from an existing Hyper-V VM. It is extremely frustrating but there does not seem to be any way. Hopefully this is fixed in HV2012?

Blog Archive