This paper presents UnaCloud: an opportunistic cloud computing Infrastructure as a Service (IaaS) model implementation, which provides at lower cost than dedicated cloud infrastructures, basic computing resources (processing, storage and networking) to run arbitrary software, including operating systems and applications. The IaaS model is provided through the opportunistic use of idle computing resources available in a university campus. UnaCloud deals with the problems associated to use commodity, non-dedicated, distributed, and heterogeneous computing resources that are part of different administrative domains. We propose an IaaS architecture based on two strategies: an opportunistic strategy that allows the use of idle computing resources in a nonintrusive manner, and a virtualization strategy to allow the ondemand deployment of customized execution environments. The proposed solution was implemented and tested through the provision of an opportunistic IaaS model, evidencing high efficiency in the deployment of virtual machines for academic and scientific projects.