Can Windows OS be upgraded on SharePoint hosted servers?
Will the SharePoint Farm be effected?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Regarding the Possibility
In general scenarios, yes it's possible to upgrade the windows server from 2008 to 2012 in-place
But it's heavily recommended to do not do that on the production servers.
Regarding the Effect
To be honest, I don't try it before for SharepPoint farm to can specify specifically what's the effect, but based on my knowledge it for sure will effect on the farm at least there is a long downtime that may be forever!!.
In case you want to venture on test environment try to do the following:
As far as I know, in place upgrade of windows server is not supported for SharePoint servers. It is kind of full rebuild of the SharePoint farm. Check this link.
Make sure that the intended operating system is supported by the version of SharePoint that you are running.
Detach the content databases from the SharePoint server.
Uninstall SharePoint through Control Panel.
Upgrade the operating system.
Attach the content databases.
If it is single server farm then above is only options. But multi server farms you can take one server out of farm rebuild it and join it to farm. This way you will have a mix os in farm for short period of time which is ok. This process will minimize the downtime.