Patent ID: 8578369

Claim:
An apparatus for managing virtual machines, the apparatus comprising: a processor coupled to a physical memory, wherein the processor is programmed to manage virtual machines by implementing: a virtual machine information obtaining unit that obtains software hierarchy information of a current virtual machine to be installed; a memory analyzing unit that divides a logical memory assigned to the current virtual machine into a private part and a shared part based at least in part upon: existing software hierarchy information corresponding to installed virtual machines and the software hierarchy information of the current virtual machine; wherein the memory analyzing unit further: compares the software hierarchy information of the current virtual machine with the existing software hierarchy information; determines which installed virtual machine among the installed virtual machines has software hierarchy information that is most similar with the software hierarchy information of the current virtual machine; determines the common software hierarchy information between the software hierarchy information of the current virtual machine and the most similar software hierarchy information of the installed virtual machine; based on the common software hierarchy information, divides the logical memory assigned to the current virtual machine into the private part and the shared part; and relates the size of the shared part of the logical memory of the current virtual machine with the size of common software between the current virtual machine and the installed virtual machine having the most similar software hierarchy information, and the size of fixed memory segment that can be shared in the memory occupied by the common software; and a memory mapping unit that maps the shared part of the logical memory assigned to the current virtual machine to shared segments of the physical memory, wherein the shared segments are used by at least one of the installed virtual machines.