Virtualized cloud infrastructures (also known as IaaS platforms) generally rely on a server consolidation system to pack virtual machines (VMs) on as few servers as possible. However, an important limitation of consolidation is not addressed by such systems. Because the managed VMs may be of various sizes (small, medium, large, etc.), VM packing may be obstructed when VMs do not fit available spaces. This phenomenon leaves servers with a set of unused resources ('holes'). It is similar to memory fragmentation, a well-known problem in operating system domain. In this paper, we propose a solution which consists in resizing VMs so that they can fit with holes. This operation leads to the management of what we call elastic VMs and requires cooperation between the application level and the IaaS level, because it impacts management at both levels. To this end, we propose a new resource negotiation and allocation model in the IaaS, called HRNM. We demonstrate HRNM's applicability through the implementation of a prototype compatible with two main IaaS managers (OpenStack and OpenNebula). By performing thorough experiments with SPECvirt_sc2010 (a reference benchmark for server consolidation), we show that the impact of HRNM on customer's application is negligible. Finally, using Google data center traces, we show an improvement of about 62.5% for the traditional consolidation engines. 1. We propose HRNM, a new resource allocation model for the cloud. 2. We propose StopGap, an extension which improves any VM consolidation system. 3. We present a prototype of our model built atop two reference IaaSManager systems (Open-Stack [17] and OpenNebula [12]). We demonstrate its applicability with SPECvirt_sc2010 [18], a suite of reference benchmarks. ‡ Eolas is our cloud computing partner. ELASTIC VMS TO ENHANCE SERVER CONSOLIDATION 1503 4. We show that StopGap improves the OpenStack consolidation engine by about 62.5%. 5. We show that our solution's overhead is, at worst, equivalent to the overhead of First Fit Decreasing algorithms [19] underlying the majority of consolidation systems.The rest of the paper is organized as follows. In Section 2, we introduce some notations, we motivate our new resource management policy, and we present its central idea. Section 3 defines the application type on which we tested our model. Section 4 presents in detail HRNM and its application to our reference benchmark. Section 5 presents StopGap while Section 6 evaluates both its impact and benefits. The paper ends with the presentation of related works in Section 7 and our conclusions in Section 9.