Since Alfresco 4.0 is a really old version (why are you using it?), you will probably not get any answers in the form of "yes, it definitely works", and more like "it should work - I don't see why it wouldn't".
You can also count this post in the latter category, since I don't see why it would not work...
I asking becouse i have full implementation in 4.0 version on physical server. Now i want transfer all implementation from physical server to virtual machine. And people are satisfied with this system 4.0. We dont have resources to upgrade at the time. And physical server is running at centos 5.1 it is very old. So I want upgrade OS to ubuntu 18.04 and implementation preserve.