Cloud computing is most popular for its ubiquitous behavior, because the users can access the resources irrespective of their location and time. Even though it is cost effective, flexible and efficient platform for delivering services, deployment of cloud computing in real-time business environment brings out substantial security issues in handling essential data. It is very difficult to provide security, maintain privacy and update service availability in cloud, because they outsource their services frequently to a third party. Clouds can be safeguarded by securing virtualized data center resources, preserving data integrity and maintaining user privacy. Thereby, secured and efficient methods are required to address confidentiality and integrity of the outsourced data on untrusted cloud servers. In this paper, the authors propose a Peerto- Peer based cloud architecture to secure resources in virtualized data centers and implementation of a secured protocol based on cryptographic and random sampling techniques for data integrity in cloud