Will there be or can there be any advantage of sharing memory across VMs? For memory to be shared, some conditions have to be met: the pages have to be read only. The most obvious choice for read-only pages are code pages. And code pages from different operating systems are less likely to match. So, obviously, code pages from same operating systems can be shared and that is where there is an advantage of consolidating VMs running same operating systems on a physical host server because there could be good memory savings.
Apparently, though VMWare supports it, Xen and Microsoft does not support memory sharing across VMs. This article talks about the same:
Ultimately, the memory savings can lead to higher consolidation ratios or the flexibility to over commit memory. Memory overcommitment is an essential piece of virtualization management, as it allows administrators to allocate enough memory to each VM in order for it to handle workload peaks. With staggered performance peaks amongst VMs on the same physical host, consolidation can be optimized without sacrificing performance.