In the German army during WWII, there were a number of officers who were not considered to be on active duty and who rose to the rank of general (of reserves). These were usually men who had originally planned on a lifelong military career, had served in WWI as junior officers and left/had to leave the service after the war because the post WWI German army offered no career opportunities. The most famous of these generals was lieutenant general of reserves Hyacinth Count Strachwitz (who had been a first lieutenant when he left the active service in the early 1920s).
There even was a German major general of reserves who had never formally been on active duty, Friedrich-Wilhelm Dernen. Dernen was a reserve officer in WWI.
I wonder if there are/were cases in other countries in which reserve officers were promoted to high ranks during times of war. I’m only interested the 20th and 21st century.