Patent ID: 8352942

Claim:
A non-transitory computer-readable medium storing a program containing instructions for realizing a virtual machine on a first machine and controlling the virtual machine, the program causing a computer to execute a procedure, the procedure comprising: inquiring of a second machine about a memory usage status of virtual machines realized on the second machine; selecting a second virtual machine capable of being swapped for a first virtual machine realized on the first machine from among the virtual machines realized on the second machine based on information obtained at the inquiring; and when a second free space size in the second machine is not smaller than a first memory usage size of the first virtual machine and a first free space size in the first machine is not smaller than a second memory usage size of the second virtual machine, performing a swap process that makes the first machine move the first virtual machine into the second machine and makes the second machine move the second virtual machine into the first machine through a migration, wherein: the selecting further includes inquiring of the second machine about a load of the second machine and selecting a virtual machine that is realized on a machine with low load as a priority, as the second virtual machine, and the program does not cause the computer to perform the swap process when the second free space size is smaller than the first memory usage size or the first free space size is smaller than the second memory usage size.