Cluster architectures are increasingly used to solve high-performance computing applications. To build more computational power, sets of clusters, interconnected by high-speed networks, can be used in an elaboration to form a cluster grid. In this type of architecture, it is difﬁcult to exploit all the internal resources of a cluster, because each one can be shielded by a ﬁrewall and is usually conﬁgured with machines where there is only one visible IP front-end node that hides all its internal nodes from the external world. The exploitation of resources is even more complicated if we consider the general case where each internal node of a cluster can be a front-end node of an another cluster. This type of architecture has been deﬁned as a multilayer cluster grid. In this paper, a Parallel Virtual Machine (PVM) extension is presented which, through a middleware solution based on the H2O distributed metacomputing framework, permits the building of a parallel virtual machine in a multilayer cluster grid environment. In addition, the existing code written for PVM can be executed into this environment without modiﬁcations.