Server 2012 R2 in place upgrade to server 2016 or 2019 error after first reboot

I'm trying to do in place upgrade from server 2012 R2 to server 2016 or 2019. After installation part and after first restart I get error

The installation failed in the FIRST_BOOT phase with an error durin BOOT operation

enter image description here

after I click Close system is returned to Server 2012 R2.

How can I do upgrade ? Migration is not an option (server does not have any roles, just sql instance and some custom software.).


Solution 1:

The problem was in the host server 2012. I had to update the host to server 2016/2019, then upgrade the virtual machine configuration version and then I managed to do in place upgrade.