Patent ID: 8874749

Claim:
A method for defragmenting a virtual machine network of a customer, the virtual machine network comprising a plurality of virtual machines associated with the customer, the virtual machine network spanning one or more pods, wherein each pod comprises a set of physical resources in a zone, the physical resources comprising physical, storage, and network resources, the method comprising: identifying first virtual machines of the customer in a first pod operating a first portion of the virtual machine network of the customer; identifying additional virtual machines associated with the customer and outside the first portion of the virtual machine network; determining a measure of network fragmentation of the customer network, the measure indicating a degree to which virtual machines of the customer are distributed across multiple pods; determining available resources in the first pod for migrating one or more of the additional virtual machines to the first pod, and whether the measure of network fragmentation indicates an advantage to the customer network by migrating one or more of the additional virtual machines to the first pod to reduce the network fragmentation; and based on the available resources and the measure of network fragmentation indicating the advantage to the customer network, migrating one or more of the additional virtual machines into the first portion of the customer network on the first pod, wherein the virtual machines outside the first portion of the virtual machine network operate on one or more secondary system routing appliances in a second portion of the virtual machine network, and wherein determining the measure of network fragmentation includes considering volume of network traffic between the first and second portions of the virtual machine network.