Virtual Floppy drive not showing up

This is for discussing general topics about how to use VirtualBox.
hakito
Posts: 17
Joined: 1. Jul 2014, 12:56

Virtual Floppy drive not showing up

Post by hakito »

Hi!

I've already searched the forum but couldn't find a suitable answer.

I have a Win11 host with Virtualbox 6.1.34.
I have a Win10 Guest and added a floppy controller (Controller: Floppy) and a floppy drive (Floppy Device 0)

I restarted the VM several times but there is no Drive A showing up in the guest.

Am I missing something?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Floppy drive not showing up

Post by mpack »

hakito wrote:Am I missing something?
Frankly, I don't know. I've never seen a Win10 PC with a built in floppy drive. I can't imagine why I'd ever need one, instead of e.g. copying my entire floppy library to a single CD, which I did years ago!

Back in XP days you sometimes had to use <control panel>| Add new hardware... to get new legacy hardware recognized.

Or it could be as simple as: it won't show in explorer until there is media in the virtual drive. I assume you know that putting media in a host drive does nothing, unless the host drive is mapped to the virtual drive.
hakito
Posts: 17
Joined: 1. Jul 2014, 12:56

Re: Virtual Floppy drive not showing up

Post by hakito »

I also have a physical PC (with Win10) with a floppy drive, which also shows up without a floppy inserted.

The device manager in the VM also shows a floppy controller.

I am also not talking about a physical host drive, but a virtual floppy drive using a floppy disk image.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual Floppy drive not showing up

Post by scottgus1 »

hakito wrote:I also have a physical PC (with Win10) with a floppy drive, which also shows up without a floppy inserted.
Modern Windows has an option to hide drives with no media in them. Open a File explorer window, View tab, Options, Change Folder and Search options > Folder Options box, View tab, Hide Empty Drives.

Also open the VM OS's Device Manager, check if the floppy controller and drive are present.
hakito
Posts: 17
Joined: 1. Jul 2014, 12:56

Re: Virtual Floppy drive not showing up

Post by hakito »

The floppy drive does not show up in device manager.

Scan for hardware does not work in the VM.
Attachments
Settings.PNG
Settings.PNG (5.71 KiB) Viewed 4854 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtual Floppy drive not showing up

Post by scottgus1 »

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Floppy drive not showing up

Post by mpack »

Where did "floppy.img" come from?

What is the file size (in bytes) of floppy.img?
hakito
Posts: 17
Joined: 1. Jul 2014, 12:56

Re: Virtual Floppy drive not showing up

Post by hakito »

mpack wrote:Where did "floppy.img" come from? What is the file size (in bytes) of floppy.img?
Virtualbox created it, the size is 1.474.560 bytes.
scottgus1 wrote:...Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
I attached the log.

One weird thing is that Virtualbox logs the file system of the floppy image as NTFS. But anyway even with an invalid (or no) filesystem, the drive should show up in explorer.
Attachments
Win10 x64 1709 DE-2022-05-27-08-36-05.zip
(37.42 KiB) Downloaded 21 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Floppy drive not showing up

Post by mpack »

hakito wrote: One weird thing is that Virtualbox logs the file system of the floppy image as NTFS.
No, in fact it says that the "floppy.img" file is located on an NTFS drive. VirtualBox doesn't know or care what filesystems are used inside the guest OS. That is just data in sectors. In this case NTFS looks like some kind of default, since the file actually seems to be located in a network folder?

I've never heard of VirtualBox creating floppy images. Please expand on how did you accomplished that?
 Edit:  I just tried it, and VirtualBox does indeed have a floppy image creation feature which I never knew it had, including choosing the FAT12 format for it (*). I just tested it in XP and it worked fine. Which of course means it must work in Win10 as well, since the guest OS choice does not determine how the virtual hardware works.

(*) AFAIK, VirtualBox supplying a formatted disk is unique to this floppy creation feature. I see no such option for creating formatted ISOs or hard disk images. IMO it would be dumb for VirtualBox to include complex filesystem formatting code for a multitide of OS's and disk types, so I guess it must have template blank disk images stored somewhere, probably in some compacted form (e.g. only the filesystem sectors). 
hakito
Posts: 17
Joined: 1. Jul 2014, 12:56

Re: Virtual Floppy drive not showing up

Post by hakito »

I think the problem is that the Win10 VM uses EFI which probably does not support Floppy disks.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Floppy drive not showing up

Post by mpack »

Please be careful about references to external authorities. We don't accept that any such thing exists. Here we have access to the source code and the developers, why would we defer to anyone else?

In this case I'm not sure I see what EFI would have to do with it. EFI is just the BIOS, it does not determine what hardware exists... It's possible however that Windows has always relied on the BIOS to support floppy drives, just as DOS did. It would have been incredibly inefficient for a 32bit OS (*) to thunk down to 16 bit code to access floppy drives, but given the inherently poor performance of floppies I guess nobody would care. So yes, it's possible that an EFI BIOS carries no such baggage - it was always intended to be a break from that past. So, no code for Windows to call.

(*) The next obvious question is whether any 64bit Windows ever had the ability to access floppy drives, because that would require either 64bit floppy drivers, or thunking down from 64bits to 16bits, which MS has traditionally refused to do (e.g. Win64 refuses to make even 32bit drivers usable). So I just tried adding a floppy drive to 64bit Win7, and at first it wouldn't even boot into the OS. I tried again with floppies removed from the boot order, and now it booted - but no floppy drive was visible inside the OS. So, I'd say that this is a limitation of 64bit Windows, and EFI is likely to be a double whammy.

Anyway, going back to the original problem, surely you don't really have a Win10 era PC that has a physical floppy drive? If it's just in a USB caddy then it can be accessed like any other USB mass storage device. The guest possibly doesn't need to know it's a floppy. I'm still finding it hard to imagine what you could having running on Windows 10 (an OS from 2016 and later) that needs to access a 3.5" floppy drive (a technology from 1987-1995), especially now that we suspect that Win10 in it's most common 64bit form can never have had that feature.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtual Floppy drive not showing up

Post by fth0 »

mpack wrote:AFAIK, VirtualBox supplying a formatted disk is unique to this floppy creation feature. I see no such option for creating formatted ISOs or hard disk images.
FWIW, the undocumented vbox-img program can create formatted floppy images and formatted ISO images, but not formatted hard disk images. It doesn't reveal the detail options for the ISO images, though:

Code: Select all

Usage: vbox-img
   [...]
   createiso    [too-many-options]
If you need to know the options, you can search the VirtualBox source code for the rtFsIsoMakerCmdParse() function.
hakito
Posts: 17
Joined: 1. Jul 2014, 12:56

Re: Virtual Floppy drive not showing up

Post by hakito »

mpack wrote:(*) The next obvious question is whether any 64bit Windows ever had the ability to access floppy drives,
Yes it has. As I already said my phyiscal x64 Win10 has floppy drive support. (See screenshot) And no - it's not a USB-drive.
Attachments
OSVersion.PNG
OSVersion.PNG (32.86 KiB) Viewed 4709 times
hakito
Posts: 17
Joined: 1. Jul 2014, 12:56

Re: Virtual Floppy drive not showing up

Post by hakito »

mpack wrote:Anyway, going back to the original problem, surely you don't really have a Win10 era PC that has a physical floppy drive? ... I'm still finding it hard to imagine what you could having running on Windows 10 (an OS from 2016 and later) that needs to access a 3.5" floppy drive (a technology from 1987-1995), especially now that we suspect that Win10 in it's most common 64bit form can never have had that feature.
The reason why i wanted a Win10 VM with floppy support is simply because it's a student exercise do develop a C-application with FA12 support. Everything works fine with the image file, but I wanted to compare the behavior with the Windows system by emulating the floppy drive. It's also working on my legacy PC (with the physical floppy drive). But it is very slow - that's why I wanted to use a VM instead.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Floppy drive not showing up

Post by mpack »

hakito wrote:
mpack wrote:(*) The next obvious question is whether any 64bit Windows ever had the ability to access floppy drives,
Yes it has.
I meant native support. Any hardware at all can be supported if additional drivers are found, and I can't think of another explanation for your case.

If Win64 has native support for floppies then I'd expect to see that in a VM, since of course the OS is the OS - it's not a special version of the OS for VMs.

We know that VirtualBox virtual floppy drive hardware works, because it is usable in DOS, Win9x, XP etc. I would guess it's usable in any 16bit and 32bit OS using MBR BIOS. Apparantly it does not work in a Win7-64bit VM using a legacy BIOS. Since the virtual hardware works I can only assume it's a limitation of Windows. I don't think it can be a limitation of the legacy BIOS because there's only one legacy BIOS for all OS's. It wouldn't surprise me if EFI BIOSes have also discarded support for floppy drives.
Post Reply