Patent ID: 8307369

Claim:
A virtual computer system comprising: a physical computer including a plurality of physical CPUs that is switchable between a sleep state and a normal state; and a virtualization control unit which divides the physical computer into a plurality of logical partitions to run a guest OS in each of the plurality of logical partitions, and which controls allocation of resources of the physical computer to the plurality of logical partitions, wherein the virtualization control unit includes: a logical partition control unit which receives an operation instruction for operating the plurality of logical partitions; a virtual CPU control unit which allocates virtual CPUs to the plurality of logical partitions based on the operation instruction, the virtual CPUs each executing the guest OS; a virtual CPU-physical CPU allocation unit which allocates the virtual CPUs to the plurality of physical CPUs based on the operation instruction, and which controls operation states of the plurality of physical CPUs; and a physical CPU control unit which controls the operation states of the plurality of physical CPUs based on the operation instruction from the virtual CPU-physical CPU allocation unit, wherein the virtual CPU-physical CPU allocation unit is configured to: judge, upon reception of the operation instruction from the logical partition control unit to create a virtual CPU, whether or not the virtual CPU to be created can be allocated to any one of the plurality of physical CPUs that is in the normal state; allocate the created virtual CPU to the any one of the plurality of physical CPUs that is in the normal state in a case where the allocation of the created virtual CPU is executable; issue an instruction to the physical CPU control unit to activate one of the plurality of physical CPUs that is in the sleep state, and allocate the created virtual CPU to the activated one of the plurality of physical CPUs in a case where the allocation of the created virtual CPU is not executable; and update a table for managing virtual CPU-physical CPU allocation and the operation states of the plurality of physical CPUs by adding the allocated created virtual CPU to the table, and wherein the virtual CPU-physical CPU allocation unit is configured to: delete, upon reception of the operation instruction from the logical partition control unit to delete a virtual CPU, the deleted virtual CPU from the table; and instruct the physical CPU control unit to put into the sleep state one of the plurality of physical CPUs that has been allocated the deleted virtual CPU in a case where the deletion leaves no virtual CPUs allocated thereto.