VFR to IFR

In real life, if you start a VFR flight with a small GA plane and then suddenly the weather goes all bad and you have to choose an alternate and land but you are not cleared because "airport is currently IFR", is it possible (like it is in FS) to create an IFR flight plan "on the fly" so to be cleared for landing? And if this is the case, can this be done on any type of aircraft regardless of the onboard equipment (provided the pilot is IFR certified)? I'm asking this because it actually happened to me in FS, and I was able to land by providing an instant IFR plan "from where I am now to the airstrip". The plane was equipped with the standard radio stack and no autopilot, so I actually landed manually (I just used the ILS beacon as a reference).