Creating virtual machine groups based on request
View Patent ↗A method for creating a virtual machine includes: receiving a virtual machine creation request to create a plurality of virtual machines; dividing the plurality of virtual machines into a plurality of virtual machine groups; determining a home physical rack for each virtual machine group, where one virtual machine group corresponds to one home physical rack; and creating each virtual machine group on the home physical rack of each virtual machine group. Because each virtual machine group is created on a home physical rack to which each virtual machine group belongs, each virtual machine group is equivalent to one physical rack.
1. A method for creating a virtual machine and comprising:
receiving one or more creation requests, wherein each of the one or more creation requests indicates a number of virtual machines in a virtual machine group of a plurality of virtual machine groups, and wherein the virtual machine groups are not clusters;
creating a first identifier of a first virtual machine group belonging to the virtual machine groups;
creating a second identifier of a second virtual machine group belonging to the virtual machine groups;
creating one or more first virtual machines of the first virtual machine group on one or more first physical racks based on the one or more creation requests by:
creating a third virtual machine of the first virtual machine group on a third physical machine of the one or more first physical racks, and
creating a fourth virtual machine of the first virtual machine group on a fourth physical machine of the one or more first physical racks;
creating one or more second virtual machines of the second virtual machine group on one or more second physical racks based on the one or more creation requests, wherein the one or more first physical racks and the one or more second physical racks are different; and
providing to a distributed application the first identifier or the second identifier.
2. The method of claim 1 , wherein the one or more creation requests comprise a first creation request and a second creation request, and wherein the method further comprises:
further creating the one or more first virtual machines using the first creation request; and
further creating the one or more second virtual machines using the second creation request.
3. The method of claim 1 , further comprising:
further creating the one or more first virtual machines for the distributed application; and
further creating the one or more second virtual machines for the distributed application.
4. The method of claim 1 , wherein the virtual machine groups belongs to a cluster.
5. The method of claim 1 , wherein the one or more creation requests comprise a first creation request and a second creation request, wherein the first creation request indicates a first number of the first virtual machines in the first virtual machine group and a first specification of the first virtual machines, wherein the second creation request indicates a second number of the second virtual machines in the second virtual machine group and a second specification of the second virtual machines, and wherein the method further comprises creating the distributed application using the first creation request and the second creation request.
6. The method of claim 1 , wherein the one or more creation requests comprise a third creation request indicating a first number of the first virtual machines in the first virtual machine group, a first specification of the first virtual machines, a second number of the second virtual machines in the second virtual machine group, and a second specification of the second virtual machines, and wherein the method further comprises creating the distributed application using the third creation request.
7. The method of claim 1 , wherein the one or more creation requests indicate a first number of the first virtual machines in the first virtual machine group and a second number of the second virtual machines in the second virtual machine group.
8. The method of claim 1 , wherein the one or more creation requests indicate a first specification of the first virtual machines and a second specification of the second virtual machines.
9. The method of claim 1 , wherein the one or more creation requests indicate a mutex relationship between the first virtual machine group and the second virtual machine group.
10. The method of claim 1 , wherein the one or more creation requests indicate a first specification of the first virtual machines and a second specification of the second virtual machines.
11. The method of claim 1 , further comprising further providing to the distributed application the first identifier.
12. The method of claim 1 , further comprising further providing to the distributed application the second identifier.
13. A computer comprising:
a memory configured to store instructions; and
a processor coupled to the memory and configured to execute the instructions to:
receive one or more creation requests, wherein each of the one or more creation requests indicates a number of virtual machines in a virtual machine group of a plurality of virtual machine groups, and herein the virtual machine groups are not clusters;
create a first identifier of a first virtual machine group belonging to the virtual machine groups;
create a second identifier of a second virtual machine group belonging to the virtual machine groups;
create one or more first virtual machines of the first virtual machine group on one or more first physical racks based on the one or more creation requests by:
creating a third virtual machine of the first virtual machine group on a third physical machine of the one or more first physical racks, and
creating a fourth virtual machine of the first virtual machine group on a fourth physical machine of the one or more first physical racks;
create one or more second virtual machines of the second virtual machine group on one or more second physical racks based on the one or more creation requests, wherein the one or more first physical racks and the one or more second physical racks are different; and
provide to a distributed application the first identifier or the second identifier.
14. The computer of claim 13 , wherein the one or more creation requests comprise a first creation request and a second creation request, and wherein the processor is further configured to:
further create the one or more first virtual machines using the first creation request; and
further create the one or more second virtual machines using the second creation request.
15. The computer of claim 13 , wherein the processor is further configured to:
further create the one or more first virtual machines for the distributed application; and
further create the one or more second virtual machines for the distributed application.
16. The computer of claim 13 , wherein the virtual machine groups belongs to a cluster.
17. The computer of claim 13 , wherein the one or more creation requests comprise a first creation request and a second creation request, wherein the first creation request indicates a first number of the first virtual machines in the first virtual machine group and a first specification of the first virtual machines, wherein the second creation request indicates a second number of the second virtual machines in the second virtual machine group and a second specification of the second virtual machines, and wherein the processor is further configured to create the distributed application using the first creation request and the second creation request.
18. The computer of claim 13 , wherein the one or more creation requests comprise a third creation request indicating a first number of the first virtual machines in the first virtual machine group, a first specification of the first virtual machines, a second number of the second virtual machines in the second virtual machine group, and a second specification of the second virtual machines, and wherein the processor is further configured to create the distributed application using the third creation request.
19. The computer of claim 13 , wherein the one or more creation requests indicate a first number of the first virtual machines in the first virtual machine group and a second number of the second virtual machines in the second virtual machine group.
20. The computer of claim 13 , wherein the one or more creation requests indicate a mutex relationship between the first virtual machine group and the second virtual machine group.
21. The computer of claim 13 , wherein the one or more creation requests indicate a first specification of the first virtual machines and a second specification of the second virtual machines.
22. A system comprising:
one or more first physical racks;
one or more second physical racks different from the one or more first physical racks; and
a computer configured to:
receive one or more creation requests, wherein each of the one or more creation requests indicates a number of virtual machines in a virtual machine group of a plurality of virtual machine groups, and wherein the virtual machine groups are not clusters;
create a first identifier of a first virtual machine group belonging to the virtual machine groups;
create a second identifier of a second virtual machine group belonging to the virtual machine groups;
create one or more first virtual machines of the first virtual machine group on the one or more first physical racks based on the one or more creation requests by:
creating a third virtual machine of the first virtual machine group on a third physical machine of the one or more first physical racks, and
creating a fourth virtual machine of the first virtual machine group on a fourth physical machine of the one or more first physical racks;
create one or more second virtual machines of the second virtual machine group on the one or more second physical racks based on the one or more creation requests; and
provide to a distributed application the first identifier or the second identifier.
23. The system of claim 22 , wherein the one or more creation requests comprise a first creation request and a second creation request, and wherein the computer is further configured to:
further create the one or more first virtual machines using the first creation request; and
further create the one or more second virtual machines using the second creation request.
24. The system of claim 22 , wherein the computer is further configured to:
further create the one or more first virtual machines for the distributed application; and
further create the one or more second virtual machines for the distributed application.
25. The system of claim 22 , wherein the virtual machine groups belongs to a cluster.
26. The system according to claim 22 , wherein the one or more creation requests comprise a first creation request and a second creation request, wherein the first creation request indicates a first number of the first virtual machines in the first virtual machine group and a first specification of the first virtual machines, wherein the second creation request indicates a second number of the second virtual machines in the second virtual machine group and a second specification of the second virtual machines.
27. The system of claim 22 , wherein the one or more creation requests comprise a third creation request indicating a first number of the first virtual machines in the first virtual machine group, a first specification of the first virtual machines, a second number of the second virtual machines in the second virtual machine group, and a second specification of the second virtual machines, and wherein the computer is further configured to create the distributed application using the third creation request.
28. The system of claim 22 , wherein the one or more creation requests indicate a first number of the first virtual machines in the first virtual machine group and a second number of the second virtual machines in the second virtual machine group.
29. The system of claim 22 , wherein the one or more creation requests indicate a mutex relationship between the first virtual machine group and the second virtual machine group.
30. The system of claim 22 , wherein the one or more creation requests indicate a first specification of the first virtual machines and a second specification of the second virtual machines.