I think it’s both. Add to it the Russian military does not have its heart in it and Ukrainians are defending their home.
On top of everything between Russia and China, I have to believe that Putin should be reminded of the “alliance” between Hitler and Stalin during WWII. As soon as Hitler perceived he had an advantage over Stalin, that alliance was torn up and German troops advanced into Russia. If Putin believes he can trust Xi to have his back, he’s a fool. Russia’s oil fields would be an easier objective than America’s natural resources...at least in the short term.