WO2015058377A1 - 一种创建虚拟机的方法和装置 - Google Patents

一种创建虚拟机的方法和装置 Download PDF

Info

Publication number
WO2015058377A1
WO2015058377A1 PCT/CN2013/085820 CN2013085820W WO2015058377A1 WO 2015058377 A1 WO2015058377 A1 WO 2015058377A1 CN 2013085820 W CN2013085820 W CN 2013085820W WO 2015058377 A1 WO2015058377 A1 WO 2015058377A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
virtual
machine group
physical
rack
Prior art date
Application number
PCT/CN2013/085820
Other languages
English (en)
French (fr)
Inventor
钟颙
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP13877430.2A priority Critical patent/EP2879049A4/en
Priority to PCT/CN2013/085820 priority patent/WO2015058377A1/zh
Priority to CN201610345019.9A priority patent/CN106055381B/zh
Priority to CN201380002627.4A priority patent/CN103797462B/zh
Priority to EP22152333.5A priority patent/EP4071605A1/en
Priority to EP17166743.9A priority patent/EP3287898A1/en
Priority to US14/492,329 priority patent/US10489176B2/en
Publication of WO2015058377A1 publication Critical patent/WO2015058377A1/zh
Priority to US14/703,340 priority patent/US9389903B2/en
Priority to US16/672,504 priority patent/US11704144B2/en
Priority to US17/220,615 priority patent/US11714671B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45545Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5033Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering data affinity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/505Clust

Definitions

  • Embodiments of the present invention relate to computer technology, and in particular, to a method, system, and system for creating a virtual machine
  • the cloud computing system mainly includes a cloud application layer, a cloud virtualization layer, and a physical device layer.
  • the cloud virtualization layer constructs a virtual machine (VM) according to physical resources of the physical device layer, and various applications in the cloud application layer Each virtual machine runs or provides services.
  • One cloud application may be distributed on one or more virtual machines, and one or more virtual machines corresponding to one cloud application may form a virtual machine cluster.
  • clustering software such as distributed applications
  • Hadoop is able to distribute large amounts of data to take full advantage of the power of clusters for high-speed computing and storage.
  • Hadoop implements a distributed file system (Hadoop Distributed File System) called HDFS, which can maintain multiple copies of working data.
  • HDFS Hadoop Distributed File System
  • the HDFS rule is to store the first copy block.
  • the cluster software runs services according to the allocated virtual machines.
  • virtualization technology and cluster software are combined. difficulty.
  • the cluster software is designed based on the physical machine cluster, in the virtualization technology, the virtual
  • the physical resources that make up a virtual machine may come from different physical machines in different physical racks. Therefore, the cloud virtualization layer in the prior art cannot create a virtual virtual network that meets the running requirements of the cluster software, such as distributed applications. machine. Summary of the invention
  • Embodiments of the present invention provide a method, apparatus, and system for creating a virtual machine, which are capable of creating a virtual machine that meets its operational requirements for a distributed application.
  • an embodiment of the present invention provides a method for creating a virtual machine, including: receiving a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines; and determining a plurality of virtual machines, where The plurality of virtual machines are divided by the plurality of virtual machines, and each virtual machine includes at least one virtual machine;
  • Each of the virtual units is created under the home physical rack of each of the virtual units.
  • different virtual machines in each of the virtual machines are created on different physical machines in the home physical chassis.
  • determining a current virtual unit to be allocated a physical physical chassis acquiring an idle physical chassis on the physical device layer, according to the The number of virtual machines included in each virtual machine group and the specifications of the respective virtual machines, and the first physical rack from which the idle resources meet the resources required by the current virtual machine are selected from the idle physical racks, from the first One of the physical racks is selected as the home physical rack.
  • acquiring constraint information of the virtual unit acquiring allocation record information of the home physical chassis, where the allocation record information includes the allocated home physics Corresponding relationship between the virtual unit of the rack and the home physical rack, and selecting one of the first physical racks as the current virtual unit according to the allocation record information and the virtual unit constraint information The belonging physical rack.
  • acquiring constraint information of the virtual unit where the constraint information of the virtual unit indicates the multiple virtual units The association relationship or the mutual exclusion relationship determines one of the home physical racks for each virtual unit according to the constraint information of the virtual unit.
  • the virtual unit constraint information includes: different virtual units corresponding to different The home physical rack; then, a different home physical rack is determined for each virtual unit.
  • the method further includes: acquiring an identifier of each virtual unit, The identification is provided to the application module such that the application module processes the service based on the identity of each of the virtual units.
  • the embodiment of the present invention provides a method for creating a virtual machine, including: receiving a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines for a distributed application;
  • Obtaining configuration information of each virtual machine group where the configuration information of each virtual machine group includes the number of virtual machines included in each virtual machine group and specifications of each virtual machine;
  • Determining a deployment attribute of the virtual machine according to the running attribute of the distributed application creating each virtual unit according to the configuration information of each virtual machine and the deployment attribute of the virtual machine.
  • determining a virtual chassis attribute of the virtual unit according to a rack-aware attribute of the distributed application where the virtual rack attribute indicates a virtual The unit corresponds to a home physical rack;
  • each virtual unit is created under the home physical rack of each virtual unit according to the configuration information of each virtual unit.
  • different virtual machines in each virtual unit are created according to configuration information of each virtual unit
  • the physical machines in the physical chassis are on different physical machines.
  • an embodiment of the present invention provides an apparatus for creating a virtual machine, including: a receiving unit, configured to receive a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines;
  • a grouping unit configured to determine a plurality of virtual machines, wherein the plurality of virtual machines are divided by the plurality of virtual machines, each virtual machine includes at least one virtual machine;
  • a configuration unit configured to determine a home physical rack for each virtual unit, where one virtual unit corresponds to one home physical rack
  • a creating unit configured to create each of the virtual units under the home physical rack of each of the virtual units.
  • the creating unit is specifically configured to: create different virtual machines in each virtual unit on different physical machines in the home physical chassis.
  • the configuration unit is specifically configured to: according to the configuration information of each virtual unit, Each virtual unit determines a home physical rack, wherein the configuration information of each virtual unit includes the number of virtual machines included in each virtual unit and the specifications of each virtual machine.
  • the configuration unit includes: Determining a subunit, configured to determine a current virtual unit to be allocated a physical physical rack, and obtaining an idle physical rack on the physical device layer, according to the number of virtual machines included in each virtual unit and specifications of each virtual machine Selecting, from the idle physical chassis, a first physical rack in which an idle resource meets resources required by the current virtual group;
  • a subunit is selected for selecting one of the first physical racks as the home physical rack.
  • the selecting sub-unit is specifically configured to: obtain the constraint information of the virtual unit, and obtain the allocation record information of the home physical chassis, where
  • the distribution record information includes a correspondence between the virtual machine group to which the home physical chassis is allocated and the home physical chassis, and according to the allocation record information and the virtual unit constraint information, from the first physical chassis Select a home physical rack that is the current virtual machine group.
  • the configuration unit is specifically configured to: obtain constraint information of the virtual unit, and the constraint of the virtual unit The information indicates an association relationship or a mutually exclusive relationship between the plurality of virtual machines, and one of the home physical machines is determined for each virtual unit according to the constraint information of the virtual unit.
  • the virtual unit constraint information includes: The belonging physical rack; then, the configuration unit determines a different home physical rack for each virtual unit.
  • the method further includes: a sending unit, configured to acquire an identifier of each virtual unit, The identification of the virtual units is provided to the application module such that the application module processes the service according to the identity of each of the virtual units.
  • an embodiment of the present invention provides an apparatus for creating a virtual machine, including: a receiving unit, configured to receive a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines for the distributed application;
  • a grouping unit configured to determine a plurality of virtual machines, wherein the plurality of virtual machines are divided by the plurality of virtual machines, each virtual machine includes at least one virtual machine;
  • An obtaining unit configured to acquire configuration information of each virtual machine group, where the configuration information of each virtual machine group includes the number of virtual machines included in each virtual machine group and specifications of each virtual machine group;
  • a determining unit configured to determine a deployment attribute of the virtual unit according to the running attribute of the distributed application
  • a creating unit configured to create each virtual unit according to the configuration information of each virtual unit and the deployment attribute of the virtual unit.
  • the determining unit is specifically configured to: determine, according to a rack-aware attribute of the distributed application, a virtual rack attribute of the virtual unit, where The virtual rack attribute indicates that one virtual unit corresponds to one home physical rack;
  • the creating unit is specifically configured to: determine, according to the virtual rack attribute of the virtual unit, a home physical rack for each virtual unit, according to configuration information of each virtual unit, Each of the virtual units is created under the home physical rack of each virtual unit.
  • a fifth aspect of the present invention provides a system for creating a virtual machine, including: a cloud virtualization device, configured to receive a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines, and determine multiple virtual machines.
  • a unit wherein the plurality of virtual units are divided by the plurality of virtual machines, each virtual unit includes at least one virtual machine, and a physical chassis is determined for each virtual unit, wherein One virtual unit corresponds to one home physical rack, and each virtual unit is created under the home physical rack of each virtual unit, and the identifier of each virtual unit is obtained, and each of the virtual units is The identification of the virtual unit is provided to the application device;
  • the application device is configured to receive an identifier of each virtual unit, and process a service according to the identifier of each virtual unit.
  • multiple virtual units divided by the multiple virtual machines are first determined, and then one physical physical rack is designated for each virtual unit. And each of the virtual units is created under the home physical rack of each virtual unit, and each virtual unit is created under each of its own physical racks, each of the virtual units
  • the virtual machine has the same physical physical rack, so that each virtual unit is equivalent to one physical rack. In this way, the virtual machine is created, and the deployment attributes of each virtual machine in each virtual unit can satisfy the distributed application.
  • Rack-aware attributes creating a cluster of virtual machines for distributed applications that meet their operational needs.
  • the embodiment of the present invention enables the distributed application to be implemented in combination with the virtualization technology without modification, and ensures that the performance of the distributed application is not affected.
  • FIG. 1 is a structural diagram of a virtual machine system architecture according to an embodiment of the present invention.
  • FIG. 2 is a flow chart of a method according to an embodiment of the present invention.
  • FIG. 3 is a flow chart of still another method according to an embodiment of the present invention.
  • FIG. 5 is a network topology diagram of a virtual machine group created according to an embodiment of the present invention
  • FIG. 6 is a flowchart of still another method according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a virtual machine creation apparatus according to an embodiment of the present invention
  • FIG. 8 is a composition diagram of another virtual machine creation apparatus according to an embodiment of the present invention
  • FIG. 9 is provided according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a virtual machine creation apparatus according to an embodiment of the present invention
  • FIG. 11 is a schematic diagram of a virtual machine creation apparatus according to an embodiment of the present invention
  • FIG. 12 is a composition diagram of a computer according to an embodiment of the present invention. detailed description
  • the embodiment of the invention provides a method, a device and a system for creating a virtual machine, and the created virtual machine cluster can meet the requirements of the distributed application.
  • the virtual machine system in the example includes: a cloud application layer 11 , a cloud virtualization layer 12 , and a physical device layer 13 .
  • the distributed application can be run on the cloud application layer 11, and the distributed application includes, but is not limited to, distributed cluster software such as Hadoop software and HDFS software.
  • the module that performs business processing of the application is the application module 111.
  • the cloud virtualization layer 12 is configured to abstract physical resources on the physical device layer 13 into multiple virtual machines according to the requirements of the cloud application layer 11, and manage the virtual machines.
  • the module for performing virtual machine creation/construction/abstract work on the cloud virtualization layer 12 is referred to as a virtualization module in the present invention, as shown in the virtualization module 121.
  • the physical device layer 13 contains one or more physical racks, each of which contains one or more physical machines.
  • the physical resources provided by each physical machine may include one or more of a CPU resource, a memory resource, a storage resource, and a network resource, and the physical resource provided by the physical device layer 13 is abstracted into multiple virtual machines by the virtualization module 121, and Provide services to the corresponding distributed applications.
  • a flowchart of creating a virtual machine according to an embodiment of the present invention includes:
  • Step 201 Receive a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines.
  • the configuration information of the multiple virtual machines may be carried in the creation virtual machine creation request.
  • the virtual machine creation request may be received by the virtualization module, where the virtual machine creation request may be a creation request of multiple virtual machines, each virtual machine includes at least one virtual machine, and the virtual machine creation request It can also be a creation request for multiple virtual machines.
  • the plurality of The virtual machine creation request or the multiple virtual machine creation request may be implemented in a flexible manner, which may be to create multiple virtual machines or multiple virtual machines through one request, or to create multiple virtual machines through multiple requests.
  • the specific implementation of the present invention is not limited to a virtual machine or a virtual machine.
  • the configuration information of each virtual machine may include configuration information of a virtual machine's computing resources (such as CPU), storage resources (such as memory), or network resources (such as network IP address), for example, each virtual unit's creation request specifies The number of virtual machines included in each virtual machine group and the specifications of each virtual machine, or the creation request of each virtual machine indicates the specification of each virtual machine.
  • Step 202 Determining a plurality of virtual machines, wherein the plurality of virtual machines are divided by the plurality of virtual machines, each virtual machine includes at least one virtual machine; specifically, when the virtualization module receives more
  • the virtual unit creation request may determine the plurality of virtual units according to the creation request of the plurality of virtual units.
  • the virtualization module may first divide the multiple virtual machines into multiple virtual machines, and then determine the information of the virtual machine according to the grouping result.
  • Step 203 Determine a home physical rack for each virtual unit, where one virtual machine group corresponds to one home physical rack;
  • the virtualization module in the embodiment of the present invention when creating a virtual machine for a distributed application, considers the running attribute of the distributed application and adapts the running attribute of the distributed application to generate a virtual machine. Deployment attributes of virtual units that are adapted to the operational attributes of the distributed application. For example, according to the rack-aware attribute in the running attribute of the distributed application, it is determined that the deployment attribute of the virtual unit includes virtual rack attributes, that is, each virtual unit can be simulated as a virtual rack, and one virtual A rack can be equated to one physical rack. Each virtual unit corresponds to one home physical rack, and each virtual unit is created or deployed under its corresponding home physical rack. Therefore, the virtualization module determines a home physical rack for each virtual unit.
  • the virtualization module may determine one home physical rack for each virtual unit according to configuration information of each virtual unit, or assign a home physical machine to each virtual unit in an arbitrary manner or in a rotating manner. In the actual deployment, if the physical resources of the specified physical rack cannot meet the resource requirements of the virtual unit, another home physical rack can be re-established.
  • Step 204 Create each virtual unit under the home physical rack of each virtual unit.
  • each virtual machine in each virtual machine group may be created by using resources of physical machines in the home physical chassis.
  • the virtualization module when creating a plurality of virtual machines for a distributed application, the virtualization module first determines a plurality of virtual machines divided by the plurality of virtual machines, and then assigns a home physics to each virtual unit. a rack, and then each of the virtual units is created under the home physical rack of each virtual unit, and each virtual unit is created under its own physical rack, each virtual unit in each virtual unit The machine has the same physical physical rack, so that each virtual unit is equivalent to one physical rack. In this way, the virtual machine is created in such a way that the deployment attributes of each virtual machine in each virtual unit can satisfy the rack sensing of the distributed application.
  • FIG. 3 is a flowchart of another embodiment of the present invention for creating a virtual machine for a distributed application according to an embodiment of the present invention.
  • the method of the embodiment of the present invention includes:
  • Step 301 Receive a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines for distributed applications.
  • Step 302 Determine a plurality of virtual machines, where the plurality of virtual machines are divided by the plurality of virtual machines, and each virtual unit includes at least one virtual machine;
  • Step 303 Determine, according to an operation attribute of the distributed application, a deployment attribute of each virtual unit.
  • Step 304 Create each virtual unit according to the configuration information of each virtual unit and the deployment attribute of each virtual unit.
  • This embodiment is another implementation manner of the present invention.
  • the virtualization module in the embodiment of the present invention considers the distribution when creating the virtual machine for the distributed application.
  • the running attribute of the application is adapted according to the running attribute of the distributed application, and the deployment attribute of the virtual unit that is adapted to the running attribute of the distributed application is generated.
  • each virtual unit can be created according to the configuration information of each virtual unit and the deployment attributes of each virtual unit to meet distributed application operation requirements.
  • the virtualization module may determine, according to the rack-aware attribute of the distributed application, a virtual rack attribute of the virtual unit, where the virtual rack attribute indicates that a virtual unit corresponds to a home physical rack. Defining, by the virtualization module, a home physical rack for each virtual unit according to configuration information of each virtual unit, and creating each virtual under the home physical rack of each virtual unit The crew, that is, the different virtual machines in the same virtual group are created in the same physical rack.
  • the embodiments of the present invention consider different operating attributes of multiple cluster softwares and different cluster softwares in the industry, and add an adaptation layer in the virtualization module to create a virtual machine cluster that satisfies the distributed application, so that the distributed application can be modified without Virtualization technology is implemented in conjunction with and ensures that the performance of distributed applications is not affected. Further, in still another embodiment of the present invention, after the step 204 or the step 304, the following steps may also be performed:
  • Step 205/305 Obtain an identifier of each virtual unit
  • the virtualization module can assign an identity to each virtual unit for representing each virtual unit.
  • Step 206/306 providing the identifier of each virtual unit to an application module of an upper layer, to The upper application module is caused to process the service according to the identifier of each virtual unit.
  • the virtualization module may send, to the application module of the upper layer, a physical rack number where each virtual machine is located, where the physical rack number of each virtual machine is the location of each virtual machine.
  • the identity of the virtual crew since the identifier of each virtual machine is further provided to an upper application module, such as a distributed application module, the upper application module can be made to be run on the multiple virtual machines.
  • FIG. 4 is a flowchart of another embodiment of the present invention for creating a virtual machine for a distributed application according to an embodiment of the present invention.
  • the method of the embodiment of the present invention includes:
  • Step 401 The virtualization module receives a creation request of multiple virtual machines, where the creation request of each virtual machine indicates the number of virtual machines included in each virtual machine and the specifications of each virtual machine.
  • the virtualization module no longer provides a template for creating a single virtual machine, but provides a template for creating a distributed application or a template for creating a virtual machine.
  • the template for creating a distributed application includes multiple virtual machines, each of which includes multiple virtual machines.
  • the virtual machine group includes at least one virtual machine, and the plurality of virtual machine groups correspond to one virtual machine cluster, and the virtual machine cluster provides services for distributed applications.
  • a cloud administrator or a user or other distributed application management software determines that a virtual machine cluster needs to be created for a distributed application, multiple virtual machines of the virtual machine cluster are grouped, and each virtual machine is filled into a virtual machine group.
  • each virtual unit creation template corresponds to a virtual unit
  • the virtualization module receives multiple virtual unit creation templates
  • each virtual unit creation template can contain the number of virtual machines, the identity and each virtual machine Specifications. For example, a distributed application 15 virtual machines need to be created, and 2 virtual machines of 15 virtual machines need to be used as management nodes.
  • the specification information is 8 CPU and 100 G memory, and other virtual machines are used as service nodes.
  • the specification information is
  • the 15 virtual machines are divided into three groups, wherein the virtual machines that are management nodes cannot be grouped into the same group. Therefore, the virtualization module receives the creation request of three virtual machine node groups, that is, receives three virtual units. Create a template as follows:
  • the creation template of the first virtual machine is the creation template of the first virtual machine
  • VM1 (8CPU, 100G memory);
  • VM2 (2CPU, 40G memory);
  • VM3 (2CPU, 40G memory);
  • VM4 (2CPU, 40G memory);
  • VM5 (2CPU, 40G memory);
  • VM6 (8CPU, 100G memory);
  • VM7 (2CPU, 40G memory);
  • VM8 (2CPU, 40G memory);
  • VM9 (2CPU, 40G memory);
  • VM10 (2CPU, 40G memory);
  • the creation template of the third virtual unit :
  • VM11 (2CPU, 40G memory);
  • VM12 (2CPU, 40G memory); VM13 (2CPU, 40G memory);
  • VM14 (2CPU, 40G memory);
  • VM15 (2CPU, 40G memory).
  • Step 402 The virtualization module determines the plurality of virtual machines according to the creation request of the plurality of virtual machines.
  • three virtual units are determined based on the creation requests of the three virtual units.
  • Step 403 The virtualization module determines a home physical rack for each virtual unit.
  • the virtualization module may further The unit is configured with a home physical rack, and the virtual machine in each virtual unit is created under the belonging physical rack.
  • the embodiments of the present invention are directed to creating a virtual machine that meets its operational requirements for a distributed application. Therefore, in the process of creating a virtual machine, the embodiment of the present invention considers the characteristics of the distributed application.
  • the management node places as many copies of the data blocks as possible on multiple physical racks in order to increase fault tolerance and maximize data reliability and availability.
  • the running attribute of the distributed application includes the rack-aware attribute.
  • the rack-aware attribute is used to obtain the physical rack information in the network topology information of each node. And perform business processing according to the obtained physical rack information.
  • the purpose of the copy placement strategy for a block is to strike a balance between the above two requirements. The following rules can be followed:
  • the management node needs to know the rack information of each node to determine which node the data copy is placed on, and which node to run or process according to the above rules.
  • the node that performs the task is a virtual machine. Therefore, the distributed application needs to know the rack number to which each virtual machine belongs, in order to perform business processing, and in addition, perform virtual machine deployment of the task. On which physical machine, certain rules need to be followed to meet the operational requirements of distributed applications.
  • the embodiment of the present invention is based on the requirements of the running attribute of the distributed application, and the virtualization module considers the running attribute of the distributed application, increases the adaptation layer, and runs the distributed application when creating the virtual machine cluster for the distributed application.
  • the attributes are adapted to generate deployment attributes of the virtual machine that are adapted to the operational attributes of the distributed application such that the created virtual machine cluster can satisfy the operational attributes of the distributed application.
  • the virtual rack attribute of the virtual unit is generated, that is, the same virtual unit corresponds to one home physical rack, and the virtual machine in each virtual machine node group is created at the physical entity to which it belongs. Under the rack.
  • the virtual rack attribute of the virtual unit is used to simulate the attributes of the physical rack, and one virtual rack can be equivalent to one physical rack, and the virtual machine and one physical rack in one virtual rack.
  • the physical machines inside have the same characteristics.
  • the physical and software resources of each physical machine in each physical rack are independent and do not interfere with each other, but have the same power and infrastructure (such as air conditioning equipment, etc.).
  • each virtual machine in each virtual chassis also has independent physical and software resources that do not interfere with each other, and has the same power and infrastructure.
  • to make the virtual rack's virtual rack attributes have the same characteristics as the physical racks, different virtual machines in the same virtual machine group are created in the same physical rack, that is, the same virtual machine.
  • the physical resources of different virtual machines in a group should come from the same physical rack.
  • the specific implementation manner of determining a home physical rack for each virtual unit in step 403 may be performed in multiple manners.
  • the virtualization module may first determine, for each virtual unit, according to configuration information of each virtual unit.
  • a physical physical rack can also be assigned to each virtual unit in a random manner or in a polling manner. In actual deployment, if the physical resources of the specified physical rack cannot meet the resource requirements of the virtual unit, Reassign another home physical rack.
  • step 403 can include:
  • Step 403-1 Determine the current virtual machine to be assigned to the physical chassis of the home
  • Step 403-2 Obtain an idle physical rack on the physical device layer
  • an idle physical rack or a free physical machine mainly refers to a physical rack or a physical machine whose physical resources are not completely occupied, and may include a physical rack or a physical machine whose resources are completely unoccupied, and also It can refer to a physical rack or physical machine where resources are only partially occupied.
  • Step 403-3 Select, according to the number of virtual machines included in each virtual machine group and the specifications of each virtual machine, the idle resource from the idle physical chassis to satisfy the first resource required by the current virtual machine. Physical rack
  • Step 403-4 Select one of the first physical chassis as the home physical chassis.
  • the virtualization module considers the configuration information of each virtual unit, and selects a physical rack that satisfies the resource requirements of the virtual unit as the home physical rack, and ensures the physical at the home.
  • the creation of virtual units under the rack can be successfully performed, which improves the success rate of virtual unit creation.
  • the virtualization module may further determine whether the resources of each physical machine in the physical rack meet the resource requirements of each virtual machine, and further filter the home physical chassis.
  • Each physical machine of the determined physical physical chassis can be configured to create a virtual machine for each virtual machine, so that the successful creation of the virtual machine is further ensured.
  • step 403-3 can be performed as follows:
  • Step 403-1-3-1 determining the number of idle physical machines on each of the idle physical racks;
  • Step 403-3-2 selecting a second physical rack from the idle physical rack according to the number of virtual machines included in the current virtual group, where the idle physical machine of the second physical rack The number is greater than or equal to the number of virtual machines included in the current virtual machine group;
  • Step 403-3-2 selecting the first physical chassis from the second physical chassis according to a specification of each virtual machine included in the current virtual group, where the first physical chassis The idle physical resources of the idle physical machine satisfy the resource requirements of each virtual machine in the current virtual machine group.
  • a home physical rack is determined for each virtual unit, and in addition to the configuration information of each virtual unit, the constraint information of the virtual unit may be further considered, and the constraint information of the virtual unit indicates the Association or mutual exclusion relationship between multiple virtual machines.
  • the virtualization module may also determine a home physical rack for each virtual unit based on the constraint information of the virtual unit.
  • a cluster software may often contain many redundant software instances (corresponding to virtual machines).
  • the topology of these software instances is complex.
  • the management nodes cannot be in the same In the physical rack, to ensure the reliability of the service, the virtualization module can obtain the constraint information of the virtual machine when the virtual machine cluster is created for the distributed application, and the constraint information of the virtual unit is used to indicate the multiple Create virtual associations or create mutually exclusive relationships.
  • some virtual machines need to be created in the same physical machine or in the same physical chassis.
  • Some virtual machines need to be created on the same physical machine or the same physical chassis. in.
  • Step 403-4 Selecting one of the first physical chassis as the home physical chassis of the current virtual machine may be specifically implemented as follows:
  • Step 403-4- 1 Obtain the constraint information of the virtual unit
  • the constraint information of the virtual unit in the embodiment may be sent to the virtualization module along with the creation request of the multiple virtual machines, and the specific example is still taken as an example.
  • the management node needs to cross the physical machine.
  • the shelf is created, so the virtualization module receives the constraint information of the following virtual machine: The first virtual machine group and the second virtual machine group cannot be created under the same physical machine frame.
  • the constraint information of the virtual unit may be directly specified in the creation template of the multiple virtual units, or may be sent to the virtualization module as a separate message, or may be distributed by the virtualization module.
  • the attribute information of the application and the corresponding rule determine the constraint information of the virtual machine, which is not limited by the embodiment of the present invention.
  • Step 403-4-2 Obtain allocation record information of the home physical rack, where the allocation record information includes a correspondence between the virtual unit that has been assigned the home physical rack and the home physical rack.
  • Step 403-4-3 Select one of the first physical chassis as the home physical chassis of the current virtual machine according to the allocation record information and the virtual unit constraint information.
  • the virtual unit constraint information in the same physical machine rack cannot be created, and the home physical rack of the first virtual unit selects the first physical rack, and the second The physical rack of the virtual unit is selected by the second physical rack.
  • the virtual unit constraint information may also be set as: different virtual units correspond to different And the virtualized module determines a different physical physical chassis for each virtual unit according to the constraint information of the virtual unit, for example, the physical physical frame of the first virtual unit is a physical machine.
  • the physical rack of the second virtual unit is the physical rack 1
  • the physical rack of the third virtual unit is the physical rack 2.
  • Step 404 The virtualization module creates each virtual unit under the home physical chassis of each virtual unit.
  • the virtualization module is configured according to the configuration information of each virtual unit, for example, the number of virtual machines included in each virtual unit and the specifications of each virtual machine, and the belonging physicality of each virtual unit. Under the rack, create each virtual machine for each of the virtual machines. Specifically, the virtualization module schedules physical resources on the physical device layer to create each virtual machine in each virtual machine group according to the number of virtual machines in each virtual machine group and the specifications of each virtual machine.
  • the virtualization module may further further further Different virtual machines in the group are created on different physical machines in the home physical rack, that is, the virtualization module creates different physical machines in the same physical rack under different physical machines in the same virtual unit.
  • Medium for example:
  • VM1 on the physical machine 1 of the physical rack 3
  • VM2 on the physical machine 2 of the physical rack 3
  • VM5 is created on the physical machine 5 of the physical rack 3;
  • VM6 creates a second virtual machine group under physical rack 1, create VM6 on physical machine 1 of physical rack 1, create VM7 on physical machine 2 of physical rack 1, and create physical machine 3 on physical rack 1.
  • VM8, VM9 is created on the physical machine 4 of the physical rack 1, and the VM10 is created on the physical machine 5 of the physical rack 1.
  • VM11 on physical machine 1 of physical rack 2
  • VM12 on physical machine 2 of physical rack 2
  • VM13 create physical machine 3 on physical rack 2
  • VM 14 is created on physical machine 4 of physical rack 2
  • VM 15 is created on physical machine 5 of physical rack 2.
  • the above virtualization module creates different virtual machines of the same virtual machine on different physical machines in the same physical physical chassis, which can ensure that the virtual machine has the same attributes as the physical chassis, so that the virtual unit can satisfy the distributed application with higher reliability. Sexual operational requirements.
  • Step 405 The virtualization module acquires an identifier of each virtual unit.
  • the virtualization module may allocate an identifier of the virtual unit to each virtual unit.
  • the virtualization module is a first virtual unit.
  • the assigned virtual unit is identified as VR1 (VR, Virtual Rack); the virtual unit assigned to the second virtual unit is identified as VR2; and the virtual unit assigned to the third virtual unit is identified as VR3.
  • the step 406 can be performed after the virtualization module determines a plurality of virtual units, and the embodiment of the present invention is not limited to the specific execution sequence in the specific implementation.
  • the virtualization module may obtain the identifier of the virtual unit carried in the creation request of each virtual unit without assigning the identifier of the virtual unit.
  • Step 406 The virtualization module provides the identifier of each virtual unit to an application module of an upper layer, so that the application module of the upper layer processes the service according to the identifier of each virtual unit.
  • the virtualization module provides the identity of each virtual unit to a distributed application.
  • the distributed application's perception of the rack is not adaptive.
  • the administrator of the distributed application manages each node of the distributed distributed application in a tree-like network topology.
  • the distributed application consists of multiple data.
  • the data center (DC) consists of multiple racks (Racks) in each data center, and multiple physical machines in each rack.
  • Each node can express its location in the network topology by, for example, the location of R1 can be represented as /D1/R1 and the location of N12 can be represented as /D2/R4/N12.
  • the virtualization module can also provide an identification of each virtual machine to the distributed application such that the distributed application processes traffic based on the identity of each of the virtual units.
  • the virtualization module returns the virtual machine creation result, including VR1 (VM1, VM2, VM3, VM4, and VM5), VR2 (VM6, VM7, VM8, VM9, and VM10) and VR3 (VM11, VM12, VM13, VM14) And VM15).
  • VR1 VM1, VM2, VM3, VM4, and VM5
  • VR2 VM6, VM7, VM8, VM9, and VM10
  • VR3 VM11, VM12, VM13, VM14
  • VM15 virtual machine creation result
  • the virtualization module may provide the identifier of the virtual machine to which each virtual machine belongs as the rack number of each virtual machine to the distributed application.
  • the virtualization module may further provide information of a physical rack in which each virtual unit is located to a distributed application. For example, the virtualization module returns the following information: VR1-Rack1, VR2-Rack2, and VR3-Rack3.
  • the network topology of each virtual machine may be established, and the network topology result is configured to the management section of the distributed application.
  • the management node performs service processing according to the network topology structure of each virtual machine.
  • FIG. 5 it is a network topology diagram of a virtual machine group that provides services for distributed applications established by an application module according to an embodiment of the present invention.
  • VM1 functions as a management node.
  • the first copy is placed on the local node, such as VM1;
  • the second copy is placed in a different physical chassis, such as VM7 in VMG2;
  • the third copy is placed on a different physical machine in the local physical chassis, such as VM2 in VMG1.
  • the virtualization module when creating a plurality of virtual machines for a distributed application, the virtualization module first determines a plurality of virtual machines divided by the plurality of virtual machines, and then assigns a home physical machine to each virtual unit. And each of the virtual units is created under the home physical rack of each virtual unit, and each virtual unit is created under its own physical rack, each virtual machine in each virtual unit Having the same physical physical rack, so that each virtual unit is equivalent to one physical rack, such a virtual machine is created, and the deployment attributes of each virtual machine in each virtual unit can satisfy the rack-aware attribute of the distributed application. To create a virtual machine cluster that meets its operational needs for distributed applications.
  • the embodiment of the present invention considers different running attributes of multiple cluster softwares and different cluster softwares in the industry, and adds an adaptation layer in the virtualization module to implement a virtual machine cluster that satisfies the distributed application, so that the distributed application does not need to be modified. Can be implemented in conjunction with virtualization technology and ensure that the performance of distributed applications is not compromised.
  • the virtual machine is created by using the granularity of the virtual unit, and the manner of creating the virtual machine through the virtual unit is also more efficient.
  • an upper application module such as a distributed application module, the upper application module can be made to be run on the multiple virtual machines.
  • the virtual machine to which each virtual machine belongs thereby obtaining the network topology information of each node, and performing service processing according to the obtained identifier of the virtual machine group, for example, ensuring that the same service is not allocated to the virtual machine of the same virtual machine group. Processing to meet the upper application Reliability and availability requirements.
  • the virtualization module further considers the constraint information of the virtual machine to create a virtual group, so that multiple virtual units belonging to one distributed application do not share the physical chassis, that is, any two virtual units are not created in the same Under the physical rack, the virtual machine cluster thus created can meet the operational requirements of distributed applications with higher reliability requirements.
  • the virtualization module creates different virtual machines of the same virtual machine on different physical machines in the same physical physical chassis, thereby ensuring that the virtual machine further has the same attributes as the physical chassis, so that the virtual unit can Meet the operational requirements of higher reliability for distributed applications.
  • the virtualization module no longer provides a template for creating a single virtual machine, but provides a template for creating a distributed application or a template for creating a virtual machine, which provides a more convenient way to create a virtual machine cluster.
  • FIG. 6 another flowchart of creating a virtual machine cluster according to an embodiment of the present invention includes:
  • Step 601 The virtualization module receives a creation request of multiple virtual machines, where a creation request of each virtual machine indicates the quantity and specification of each virtual machine.
  • the plurality of virtual machines form a virtual machine cluster, and the virtual machine cluster provides a service for the distributed application.
  • the virtualization module provides a template for creating a single virtual machine, and the cloud administrator or the user is When it is determined that a virtual machine cluster needs to be created for a distributed application, multiple virtual machines of the virtual machine cluster are filled into a virtual machine creation template, and the virtualization module receives creation templates of multiple virtual machines.
  • the creation template of each virtual machine may include the identifier, quantity, and configuration information of the virtual machine.
  • the creation template of the virtual machine received by the virtualization module may be a template created according to the specifications of the virtual machine. For example, the virtual machine to be created includes two specifications, and the virtualization module may receive two templates.
  • Virtual machine creation template each of which creates a virtual template Machine specifications, identification and quantity.
  • a distributed application needs to create 15 virtual machines. Two of the 15 virtual machines need to be used as management nodes.
  • the specification information is 8 CPU and 100 Gbytes of memory. Other virtual machines serve as service nodes.
  • the specification information is 2 CPU. 40G memory (the specifications of the service node can be the same or different. This example takes the same specifications of the service node as an example). Then the virtualization module receives the creation template of the following virtual machine:
  • Template one (first virtual machine creation request): Virtual machine specification: 8CPU, 100G memory; Virtual machine identification: VM1 and VM6; Number of virtual machines: 2;
  • Template 2 (second virtual machine creation request): Virtual machine specification: 2CPU, 40G memory; virtual machine identification: VM2, VM3, VM4, VM5, VM7, VM8, VM9, VM10, VM1K VM12, VM13, VM14 and VM15; Virtual Number of machines: 13.
  • Step 602 The virtualization module divides the multiple virtual machines into the multiple virtual machines.
  • the cloud administrator or the management software of the user or other distributed application determines that the need is a distributed application.
  • the virtualization module receives the creation request of the plurality of virtual machines that have been grouped.
  • the virtualization module receives the creation request of multiple virtual machines, and the virtualization module needs to group the multiple virtual machines to obtain multiple virtual machines.
  • the virtualization module needs to consider the distributed attributes of the distributed application when grouping the multiple virtual machines. For example, the management node distribution is created to meet reliability, that is, the virtual machines that are management nodes cannot be in the same In the group, the obtained virtual unit is as follows:
  • VM11 Members: VM11, VM12, VM13, VM14, and VM15.
  • Step 603 The virtualization module determines a home physical rack for each virtual unit.
  • Step 604 Create each virtual unit under the home physical rack of each virtual unit.
  • Step 605 The virtualization module acquires an identifier of each virtual unit.
  • Step 606 The virtualization module provides the identifier of each virtual unit to an application module of an upper layer, so that the application module of the upper layer processes the service according to the identifier of each virtual unit.
  • steps 603-606 are similar to the specific implementation details of steps 403-406, and will not be described in detail in this embodiment.
  • the virtualization module since the virtualization module receives multiple virtual machine creation requests, the virtualization module further groups multiple virtual machines that provide services for the distributed application, and determines the virtual units that are obtained by the grouping.
  • the physical rack is created, and the virtual machine group is created, so that the created virtual machine cluster can meet the running requirements of the distributed application.
  • an apparatus 700 for creating a virtual machine includes: a receiving unit 701, configured to receive a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines;
  • a grouping unit 702 configured to determine a plurality of virtual machines, wherein the plurality of virtual machines are divided by the plurality of virtual machines, each virtual machine includes at least one virtual machine;
  • the configuration unit 703 is configured to determine a home physical rack for each virtual unit, where one virtual unit corresponds to one home physical rack;
  • the creating unit 704 is configured to create each virtual unit under the home physical chassis of each virtual unit.
  • the creating unit 704 is specifically configured to: create different virtual machines in each virtual unit on different physical machines in the home physical chassis.
  • the configuration unit 703 is specifically configured to: determine, according to configuration information of each virtual unit, a home physical chassis for each virtual unit
  • the configuration information of each virtual unit includes the number of virtual machines included in each virtual machine group and specifications of each virtual machine.
  • the device 800 includes, in addition to the components shown in FIG. 7, the configuration unit 703 includes:
  • a determining subunit 7031 configured to determine a current virtual group to be allocated a home physical rack, and acquire an idle physical rack on the physical device layer, according to the number of virtual machines included in each virtual unit and each virtual machine a first physical rack that selects an idle resource from the idle physical rack to satisfy a resource required by the current virtual unit;
  • a subunit 7032 is selected for selecting one of the first physical racks as the belonging physical rack. Further, the determining subunit 7031 is specifically configured to: determine a quantity of idle physical machines on each of the idle physical racks, according to the number of virtual machines included in the current virtual group, from the idle physical racks Selecting a second physical rack, where the number of idle physical machines of the second physical rack is greater than or equal to the number of virtual machines included in the current virtual unit, according to specifications of each virtual machine included in the current virtual unit Selecting the first physical chassis from the second physical chassis, where idle physical resources of the idle physical machine of the first physical chassis meet resources of each virtual machine in the current virtual group demand.
  • the selecting sub-unit 7032 is specifically configured to: obtain the constraint information of the virtual unit, and obtain the allocation record information of the home physical chassis, where the allocation record information includes the virtual unit that has been assigned the physical physical chassis and the home physical chassis. Corresponding relationship, according to the allocation record information and The virtual unit constraint information is selected from the first physical chassis as a home physical chassis of the current virtual unit.
  • the configuration unit 703 may be specifically configured to: obtain constraint information of the virtual unit, where the constraint information of the virtual unit indicates an association relationship between the multiple virtual units or a mutually exclusive relationship, determining one of the home physical racks for each virtual unit according to the constraint information of the virtual unit.
  • the device 900 includes a sending unit 705 for acquiring each virtual machine, in addition to the components shown in FIG.
  • the identifier of the group is provided to the application module of the upper layer, so that the application module of the upper layer processes the service according to the identifier of each virtual unit.
  • the sending unit 705 is specifically configured to send, to the application module of the upper layer, a rack number where each virtual machine is located, where the rack number of each virtual machine is the each virtual machine.
  • an apparatus 1000 for creating a virtual machine includes:
  • the receiving unit 1001 is configured to receive a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines for the distributed application;
  • a grouping unit 1002 configured to determine a plurality of virtual machines, wherein the plurality of virtual machines are divided by the plurality of virtual machines, each virtual machine includes at least one virtual machine;
  • the obtaining unit 1003 is configured to acquire configuration information of each virtual unit, where the configuration information of each virtual unit includes the number of virtual machines included in each virtual unit and specifications of each virtual machine;
  • a determining unit 1004 configured to determine a deployment attribute of the virtual unit according to the running attribute of the distributed application
  • a creating unit 1005 configured to create, according to the configuration information of each virtual unit acquired by the obtaining unit 1003 and the deployment attribute of the virtual unit determined by the determining unit 1004 Each virtual unit is described.
  • the determining unit 1004 is specifically configured to: determine, according to the rack-aware attribute of the distributed application, a virtual rack attribute of the virtual unit, where the virtual rack attribute indicates a virtual unit corresponding to a home physical rack;
  • the creating unit 1005 is specifically configured to: determine, according to the virtual chassis attribute of the virtual unit, a home physical rack for each virtual unit, according to configuration information of each virtual unit, Each of the virtual units is created under the home physical rack of each virtual unit.
  • a system for creating a virtual machine includes: a cloud virtualization device 1101, configured to receive a virtual machine creation request, where the virtual machine creation request is used to create multiple virtual machines, Determining a plurality of virtual machines, wherein the plurality of virtual machines are divided by the plurality of virtual machines, each virtual machine includes at least one virtual machine, and determining a home physical machine for each virtual machine a virtual unit corresponding to a home physical rack, and each virtual unit is created under the home physical rack of each virtual unit, and the identifier of each virtual unit is obtained. Providing the identifier of each virtual unit to an application device;
  • the application device 1102 is configured to receive an identifier of each virtual unit, and process a service according to the identifier of each virtual unit.
  • FIG. 12 is a schematic structural diagram of a computer according to an embodiment of the present invention.
  • the computer of the embodiment of the present invention may include:
  • the CPU 1201, the memory 1202, and the communication interface 1205 are connected by the system bus 1204 and complete communication with each other.
  • Processor 1201 may be a single core or multi-core central processing unit, or a particular integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 1202 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
  • Memory 1202 is for computer execution instructions 1203. Specifically, the computer executes the instruction 1203 Can include program code.
  • the processor 1201 executes the computer execution instruction 1203, and the method flow described in any one of FIG. 2, 3, 4 or FIG. 6 can be performed.
  • aspects of the present invention, or possible implementations of various aspects can be embodied as a system, method, or computer program product.
  • aspects of the invention, or possible implementations of various aspects may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects, They are collectively referred to herein as "circuits," “modules,” or “systems.”
  • aspects of the invention, or possible implementations of various aspects may take the form of a computer program product, which is a computer readable program code stored in a computer readable medium.
  • the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
  • the computer readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing, such as a random access memory.
  • RAM Read Only Memory
  • ROM Read Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • CD-ROM Portable Read Only Memory
  • the processor in the computer reads the computer readable program code stored in the computer readable medium, such that the processor can perform the functional actions specified in each step or combination of steps in the flowchart; A device that functions as specified in each block, or combination of blocks.
  • the computer readable program code can execute entirely on the user's computer, partly on the user's computer, as a separate software package, partly on the user's computer and partly on the remote computer, or entirely on the remote computer or server.
  • the functions noted in the various steps of the flowchart, or in the blocks in the block diagrams may not occur in the order noted.
  • two steps, or two blocks, shown in succession may in fact be executed substantially simultaneously, or the blocks may sometimes be executed in the reverse order.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Manipulator (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明实施例提出了一种创建虚拟机的方法、系统和装置,用于为分布式应用创建虚拟机集群,包括:接收虚拟机创建请求,所述虚拟机创建请求用于创建多台虚拟机;确定多个虚拟机组,其中,所述多个虚拟机组由所述多台虚拟机划分得到;为所述每个虚拟机组确定归属物理机架,其中,一个虚拟机组对应一个归属物理机架;在所述每个虚拟机组的归属物理机架下,创建所述每个虚拟机组。由于每个虚拟机组在其归属的物理机架下进行创建,使得每个虚拟机组等同于一个物理机架,这样的虚拟机创建方式,每个虚拟机组中的各虚拟机的部署属性能够满足分布式应用的机架感知属性,从而为分布式应用创建了满足其运行需求的虚拟机集群。

Description

种创建虚拟机的方法和装置
技术领域
本发明实施例涉及计算机技术, 特别是一种创建虚拟机的方法、 系统和
背景技术
云计算系统的主要包括云应用层、 云虚拟化层和物理设备层, 云虚拟化 层根据物理设备层的物理资源构建虚拟机( Virtual Machine, VM ), 云应用层 中的各种应用程序就由这些虚拟机分别进行运行或者提供服务, 一个云应用 程序可能分布在一个或多个虚拟机上,对应于一个云应用程序的一个或多个 虚拟机可以组成一个虚拟机集群。
目前存在一些集群软件, 例如分布式应用, 其主要考虑应用的高可用和 高可靠性, 比如 Hadoop这样的集群软件。 Hadoop能够对大量数据进行分布 式处理, 充分利用集群的威力高速运算和存储。 Hadoop 实现了一个分布式 文件系统(Hadoop Distributed File System ), 筒称 HDFS , 其可以维护多个 工作数据副本, 对于最常见的 3 个数据复制块, HDFS 的规则是将第一个 复制块存储在同一物理机架的不同节点上, 最后一个复制块存储在不同物理 机架的某个节点上。 由于集群软件的高可靠性和高可用性的要求, 为此类集 群软件分配虚拟机以进行业务创建, 以及集群软件根据分配好的虚拟机运行 业务, 是目前将虚拟化技术与集群软件结合实施的难点。
由于集群软件是基于物理机集群进行设计的, 然而在虚拟化技术中, 虚
Figure imgf000002_0001
如, 组成一台虚拟机的物理资源可能来自于不同的物理机架下的不同物理 机, 因此, 现有技术中的云虚拟化层无法创建满足集群软件, 例如分布式应 用的运行要求的虚拟机。 发明内容
本发明实施例提出了一种创建虚拟机的方法、 装置和系统, 能够为分布 式应用创建满足其运行需求的虚拟机。
第一方面, 本发明实施例提出了一种创建虚拟机的方法, 包括: 接收虚拟机创建请求, 所述虚拟机创建请求用于创建多台虚拟机; 确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多台虚拟机划分得 到, 每个虚拟机組包含至少一台虚拟机;
为所述每个虚拟机組确定归属物理机架, 其中, 一个虚拟机組对应一个 归属物理机架;
在所述每个虚拟机組的归属物理机架下, 创建所述每个虚拟机組。 结合第一方面, 在第一种可能的实现方式中, 将所述每个虚拟机組中的 不同虚拟机创建在所述归属物理机架中的不同物理机上。
结合第一方面或者第一方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 根据所述每个虚拟机組的配置信息, 为所述每个虚拟机組确定 一个归属物理机架, 其中, 所述每个虚拟机組的配置信息包括所述每个虚拟 机組包含的虚拟机的数量和各个虚拟机的规格。
结合第一方面的第二种可能的实现方式, 在第三种可能的实现方式中, 确定待分配归属物理机架的当前虚拟机組, 获取物理设备层上的空闲物理机 架, 根据所述每个虚拟机組包含的虚拟机的数量和各个虚拟机的规格, 从所 述空闲物理机架中选择空闲资源满足所述当前虚拟机組所需资源的第一物 理机架, 从所述第一物理机架中选择一个作为所述归属物理机架。
结合第一方面的第三种可能的实现方式, 在第四种可能的实现方式中, 获取虚拟机组的约束信息, 获取归属物理机架的分配记录信息, 所述分配记 录信息包括已分配归属物理机架的虚拟机組与归属物理机架的对应关系, 根 据所述所述分配记录信息和所述虚拟机組约束信息, 从所述第一物理机架中 选择一个作为所述当前虚拟机組的归属物理机架。 结合第一方面或者第一方面的第一种可能的实现方式,在第五种可能的 实现方式中, 获取虚拟机组的约束信息, 所述虚拟机组的约束信息表示所述 多个虚拟机组之间的关联关系或者互斥关系, 根据所述虚拟机组的约束信 息, 为所述每个虚拟机组确定一个所述归属物理机架。
结合第一方面的第四种可能的实现方式或者第一方面的第五种可能的 实现方式, 在第六种可能的实现方式中, 所述虚拟机組约束信息包括: 不同 虚拟机組对应不同的归属物理机架; 则, 为所述每个虚拟机組确定一个不同 的归属物理机架。
结合第一方面或者第一方面的任意一种可能的实现方式,在第七种可能 的实现方式中, 还包括: 获取所述每个虚拟机組的标识, 将所述每个虚拟机 組的标识提供给应用模块, 以使得所述应用模块根据所述每个虚拟机組的标 识处理业务。
第二方面, 本发明实施例提出了一种创建虚拟机的方法, 包括: 接收虚拟机创建请求, 所述虚拟机创建请求用于为分布式应用创建多台 虚拟机;
确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多台虚拟机划分得 到, 每个虚拟机組包含至少一台虚拟机;
获取每个虚拟机組的配置信息, 其中, 所述每个虚拟机組的配置信息包 括所述每个虚拟机組包含的虚拟机的数量和各个虚拟机的规格;
根据所述分布式应用的运行属性, 确定虚拟机組的部署属性; 根据所述每个虚拟机組的配置信息和所述虚拟机組的部署属性, 创建所 述每个虚拟机組。
结合第二方面, 在第一种可能的实现方式中, 根据所述分布式应用的机 架感知属性, 确定所述虚拟机組的虚拟机架属性, 其中, 所述虚拟机架属性 表明一个虚拟机組对应一个归属物理机架;
根据所述虚拟机組的虚拟机架属性, 为所述每个虚拟机組确定一个归属 物理机架; 根据所述每个虚拟机組的配置信息, 在所述每个虚拟机組的归属 物理机架下创建所述每个虚拟机組。
结合第二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 根据所述每个虚拟机組的配置信息, 将所述每个虚拟机組中的不同虚拟机创 建在所述归属物理机架中的不同物理机上。
结合第二方面或者第二方面的第一种可能的实现方式, 在第三种可能的 实现方式中, 根据所述虚拟机組的虚拟机架属性, 为所述每个虚拟机組确定 一个不同的归属物理机架。
第三方面, 本发明实施例提出了一种创建虚拟机的装置, 包括: 接收单元, 用于接收虚拟机创建请求, 所述虚拟机创建请求用于创建多 台虚拟机;
分組单元, 用于确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多 台虚拟机划分得到, 每个虚拟机組包含至少一台虚拟机;
配置单元, 用于为所述每个虚拟机組确定归属物理机架, 其中, 一个虚 拟机組对应一个归属物理机架;
创建单元, 用于在所述每个虚拟机組的归属物理机架下, 创建所述每个 虚拟机組。
结合第三方面, 在第一种可能的实现方式中, 所述创建单元具体用于: 将所述每个虚拟机組中的不同虚拟机创建在所述归属物理机架中的不同物 理机上。
结合第三方面或者第三方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述配置单元具体用于: 根据所述每个虚拟机組的配置信息, 为所述每个虚拟机組确定一个归属物理机架, 其中, 所述每个虚拟机組的配 置信息包括所述每个虚拟机組包含的虚拟机的数量和各个虚拟机的规格。
结合第三方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述配置单元包括: 确定子单元, 用于确定待分配归属物理机架的当前虚拟机組, 获取物理 设备层上的空闲物理机架, 根据所述每个虚拟机組包含的虚拟机的数量和各 个虚拟机的规格, 从所述空闲物理机架中选择空闲资源满足所述当前虚拟机 組所需资源的第一物理机架;
选择子单元, 用于从所述第一物理机架中选择一个作为所述归属物理机 架。
结合第三方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所述选择子单元具体用于: 获取虚拟机组的约束信息, 获取归属物理机架的 分配记录信息, 所述分配记录信息包括已分配归属物理机架的虚拟机組与归 属物理机架的对应关系, 根据所述所述分配记录信息和所述虚拟机組约束信 息, 从所述第一物理机架中选择一个作为所述当前虚拟机組的归属物理机 架。
结合第三方面或者第三方面的第一种可能的实现方式, 在第五种可能的 实现方式中, 所述配置单元具体用于: 获取虚拟机組的约束信息, 所述虚拟 机組的约束信息表示所述多个虚拟机組之间的关联关系或者互斥关系, 根据 所述虚拟机組的约束信息, 为所述每个虚拟机組确定一个所述归属物理机 木。
结合第三方面的第四种可能的实现方式或者第三方面的第五种可能的 实现方式, 在第六种可能的实现方式中, 所述虚拟机組约束信息包括: 不同 虚拟机組对应不同的归属物理机架; 则, 所述配置单元为所述每个虚拟机組 确定一个不同的归属物理机架。
结合第三方面或者第三方面的任意一种可能的实现方式, 在第七种可能 的实现方式中, 还包括: 发送单元, 用于获取所述每个虚拟机組的标识, 将 所述每个虚拟机組的标识提供给应用模块, 以使得所述应用模块根据所述每 个虚拟机組的标识处理业务。
第四方面, 本发明实施例提供一种创建虚拟机的装置, 包括: 接收单元, 用于接收虚拟机创建请求, 所述虚拟机创建请求用于为分布 式应用创建多台虚拟机;
分組单元, 用于确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多 台虚拟机划分得到, 每个虚拟机組包含至少一台虚拟机;
获取单元, 用于获取每个虚拟机組的配置信息, 其中, 所述每个虚拟机 組的配置信息包括所述每个虚拟机組包含的虚拟机的数量和各个虚拟机的 规格;
确定单元, 用于根据所述分布式应用的运行属性, 确定虚拟机組的部署 属性;
创建单元, 用于根据所述每个虚拟机組的配置信息和所述虚拟机組的部 署属性, 创建所述每个虚拟机組。
结合第四方面, 在第一种可能的实现方式中, 所述确定单元具体用于: 根据所述分布式应用的机架感知属性, 确定所述虚拟机組的虚拟机架属性, 其中, 所述虚拟机架属性表明一个虚拟机組对应一个归属物理机架;
所述创建单元, 具体用于: 根据所述虚拟机組的虚拟机架属性, 为所述 每个虚拟机組确定一个归属物理机架, 根据所述每个虚拟机組的配置信息, 在所述每个虚拟机組的归属物理机架下创建所述每个虚拟机組。
第五方面, 本发明实施例提供一种创建虚拟机的系统, 包括: 云虚拟化装置, 用于接收虚拟机创建请求, 所述虚拟机创建请求用于创 建多台虚拟机, 确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多台虚 拟机划分得到, 每个虚拟机組包含至少一台虚拟机, 为所述每个虚拟机組确 定归属物理机架, 其中, 一个虚拟机組对应一个归属物理机架, 在所述每个 虚拟机組的归属物理机架下, 创建所述每个虚拟机組, 获取所述每个虚拟机 組的标识, 将所述每个虚拟机組的标识提供给应用装置;
所述应用装置, 用于接收所述每个虚拟机組的标识, 根据所述每个虚拟 机組的标识处理业务。 本发明实施例中, 在为分布式应用创建多台虚拟机时, 首先确定由所述 多台虚拟机划分得到的多个虚拟机組, 然后为每个虚拟机組指定一个归属物 理机架,再在所述每个虚拟机組的归属物理机架下,创建所述每个虚拟机組, 由于每个虚拟机組在其归属的物理机架下进行创建, 每个虚拟机組中的各虚 拟机的具有相同的归属物理机架, 使得每个虚拟机組等同于一个物理机架, 这样的虚拟机创建方式, 每个虚拟机組中的各虚拟机的部署属性能够满足分 布式应用的机架感知属性, 从而为分布式应用创建了满足其运行需求的虚拟 机集群。 并且, 本发明实施例使得分布式应用不需要改动即可与虚拟化技术 结合实施, 并保证分布式应用的性能不受影响
附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例中所需要 使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的 一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的虚拟机系统架构组成图;
图 2是根据本发明实施例提供的一种方法流程图;
图 3是根据本发明实施例提供的又一种方法流程图;
图 4是根据本发明实施例提供的又一种方法流程图;
图 5是根据本发明实施例所创建的虚拟机群的网络拓朴结构图; 图 6是根据本发明实施例提供的又一种方法流程图;
图 7是根据本发明实施例提供的一种虚拟机创建装置的组成图; 图 8是根据本发明实施例提供的又一种虚拟机创建装置的组成图; 图 9是根据本发明实施例提供的又一种虚拟机创建装置的组成图; 图 10是根据本发明实施例提供的又一种虚拟机创建装置的组成图; 图 11是根据本发明实施例提供的一种虚拟机创建系统的组成图; 图 12是根据本发明实施例提供的一种计算机的组成图。 具体实施方式
本发明实施例提出了一种创建虚拟机的方法、 装置和系统, 所创建的虚 拟机集群可以满足满足分布式应用运行要求。
如图 1所示, 为本发明实施例提供的虚拟机系统架构图的一种示例, 该 示例中的虚拟机系统包括: 云应用层 11、云虚拟化层 12以及物理设备层 13。
所述云应用层 11 上可以运行分布式应用, 所述分布式应用包括但不限 于 Hadoop软件、 HDFS软件等分布式集群软件。 在所述云应用层 11 , 执行 应用的业务处理的模块是应用模块 111。
所述云虚拟化层 12, 用于根据云应用层 11的需求, 将物理设备层 13上 的物理资源抽象成多个虚拟机, 并对虚拟机进行管理。在所述云虚拟化层 12 上进行虚拟机创建 /构建 /抽象工作的模块在本发明实施称为虚拟化模块,如 图所示虚拟化模块 121。
物理设备层 13 包含一台或多台物理机架, 每台物理机架包含一台或多 台物理机。 每台物理机提供的物理资源可以包括 CPU 资源、 内存资源、 存 储资源以及网络资源中的一种或者多种, 物理设备层 13提供的物理资源被 虚拟化模块 121抽象成多台虚拟机, 并提供给相应的分布式应用提供服务。 结合图 1 , 如图 2所示, 为本发明实施例提供的创建虚拟机的流程图, 本发明实施例的方法包括:
步骤 201 : 接收虚拟机创建请求, 所述虚拟机创建请求用于创建多台虚 拟机;
所述创建虚拟机创建请求中可以携带所述多台虚拟机的配置信息。
具体实施中, 可以由虚拟化模块接收所述虚拟机创建请求, 所述虚拟机 创建请求可以是多个虚拟机组的创建请求,每个虚拟机组包含至少一台虚拟 机, 所述虚拟机创建请求还可以是多台虚拟机的创建请求。 其中, 所述多个 虚拟机组的创建请求或者多台虚拟机的创建请求的具体实现方式可以比较 灵活, 可以是通过一个请求来创建多个虚拟机组或者多台虚拟机, 也可以是 通过多个请求来创建多个虚拟机组或者多台虚拟机, 优选地, 通过一个请求 来创建一个虚拟机组或者一台虚拟机, 本发明实施例对具体实现不做限定。 所述每台虚拟机的配置信息可以包含虚拟机的计算资源 (例如 CPU )、 存储资源(例如 memory )或者网络资源(例如网络 IP地址 )等的配置信息, 例如每个虚拟机组的创建请求指明所述每个虚拟机组所包含的虚拟机的数 量和各虚拟机的规格, 或者, 每台虚拟机的创建请求指明所述每台虚拟机的 规格。 步骤 202: 确定多个虚拟机组, 其中, 所述多个虚拟机组由所述多台虚 拟机划分得到, 每个虚拟机组包含至少一台虚拟机; 具体地, 当所述虚拟化模块接收到多个虚拟机组的创建请求, 则可以根 据所述多个虚拟机组的创建请求, 确定所述多个虚拟机组。 当所述虚拟化模 块接收到多台虚拟机的创建请求, 所述虚拟化模块可以先将所述多台虚拟机 划分为多个虚拟机组, 再根据分组结果确定虚拟机组的信息。
步骤 203 : 为所述每个虚拟机組确定归属物理机架, 其中, 一个虚拟机 組对应一个归属物理机架;
基于分布式应用的运行属性的要求, 本发明实施例中的虚拟化模块在为 分布式应用创建虚拟机的时候, 考虑分布式应用的运行属性, 对分布式应用 的运行属性进行适配,产生与所述分布式应用的运行属性相适配的虚拟机组 的部署属性。 例如根据分布式应用的运行属性中的机架感知属性, 与之相适 配, 确定所述虚拟机组的部署属性包括虚拟机架属性, 即每一个虚拟机组可 以模拟为一个虚拟机架, 一个虚拟机架可以等同于一个物理机架。 根据虚拟 机组的虚拟机架属性, 每个虚拟机组对应一个归属物理机架, 每个虚拟机组 创建或者部署在其对应的归属物理机架下。 因此, 所述虚拟化模块为所述每个虚拟机组确定一个归属物理机架。 具 体地, 所述虚拟化模块可以根据每个虚拟机组的配置信息, 为所述每个虚拟 机组确定一个归属物理机架, 也可以任意或者通过轮流的方式为每个虚拟机 组指定一个归属物理机架, 实际部署的时候, 若指定的归属物理机架的物理 资源不能满足虚拟机组的资源需求, 可以重新制定另一个归属物理机架。
步骤 204 : 在所述每个虚拟机組的归属物理机架下, 创建所述每个虚拟 机組。
其中, 具体地, 可以利用所述归属物理机架中的物理机的资源来创建所 述每个虚拟机組中的每台虚拟机。 本发明实施例中, 所述虚拟化模块在为分布式应用创建多台虚拟机时, 首先确定由所述多台虚拟机划分得到的多个虚拟机组, 然后为每个虚拟机组 指定一个归属物理机架, 再在所述每个虚拟机组的归属物理机架下, 创建所 述每个虚拟机组, 由于每个虚拟机组在其归属的物理机架下进行创建, 每个 虚拟机组中的各虚拟机的具有相同的归属物理机架,使得每个虚拟机组等同 于一个物理机架, 这样的虚拟机创建方式, 每个虚拟机组中的各虚拟机的部 署属性能够满足分布式应用的机架感知属性,从而为分布式应用创建了满足 其运行需求的虚拟机集群。 并且, 本发明实施例使得分布式应用不需要改动 即可与虚拟化技术结合实施, 并保证分布式应用的性能不受影响。 另外, 本 发明实施例中, 采用虚拟机组的粒度来创建虚拟机, 此种通过虚拟机组创建 虚拟机的方式也更加高效。 如图 3所示, 为本发明实施例提供的又一个为分布式应用创建虚拟机的 流程图, 本发明实施例的方法包括:
步骤 301 : 接收虚拟机创建请求, 所述虚拟机创建请求用于为分布式应 用创建多台虚拟机;
步骤 302 : 确定多个虚拟机组, 其中, 所述多个虚拟机组由所述多台虚 拟机划分得到, 每个虚拟机組包含至少一台虚拟机; 步骤 303 : 根据所述分布式应用的运行属性, 确定所述每个虚拟机組的 部署属性;
步骤 304 : 根据所述每个虚拟机組的配置信息和所述每个虚拟机組的部 署属性, 创建所述每个虚拟机組。 本实施例为本发明的另一种实现方式, 在步骤 303中, 基于分布式应用 的运行属性的要求, 本发明实施例中的虚拟化模块在为分布式应用创建虚拟 机的时候, 考虑分布式应用的运行属性, 根据分布式应用的运行属性进行适 配, 产生与所述分布式应用的运行属性相适配的虚拟机组的部署属性。 在步 骤 304中, 即可根据每个虚拟机组的配置信息和所述每个虚拟机组的部署属 性, 创建所述每个虚拟机组, 以满足分布式应用运行需求。
具体地, 虚拟化模块可以根据所述分布式应用的机架感知属性, 确定所 述虚拟机組的虚拟机架属性, 所述虚拟机架属性表明一个虚拟机組对应一个 归属物理机架, 所述虚拟化模块根据每个虚拟机組的配置信息, 为所述每个 虚拟机組确定一个归属物理机架, 在所述每个虚拟机組的归属物理机架下, 创建所述每个虚拟机組, 即将同一个虚拟机組中的不同虚拟机创建在同一个 物理机架下。 本发明实施例考虑业界存在多种集群软件和不同集群软件的不同运行 属性, 在虚拟化模块增加适配层来实现创建满足分布式应用的虚拟机集群, 使得分布式应用不需要改动即可与虚拟化技术结合实施, 并保证分布式应用 的性能不受影响。 进一步地, 在本发明的又一个实施例中, 在所述步骤 204或者步骤 304 之后, 还可以执行如下步骤:
步骤 205/305: 获取所述每个虚拟机組的标识;
所述虚拟化模块可以为每个虚拟机組分配一个标识, 以用于代表每个虚 拟机組。
步骤 206/306 : 将所述每个虚拟机組的标识提供给上层的应用模块, 以 使得所述上层的应用模块根据所述每个虚拟机組的标识处理业务。
具体地, 所述虚拟化模块可以向所述上层的应用模块发送每台虚拟机所 在的物理机架号, 其中, 所述每台虚拟机所在的物理机架号为所述每台虚拟 机所在的虚拟机組的标识。 在本实施例中, 由于进一步地将每个虚拟机组的标识提供给了上层的应 用模块, 例如分布式应用模块, 可以使得上层的应用模块在所述多台虚拟机 上运行的时候, 可以获知每台虚拟机所属于的虚拟机组, 由此获取每个节点 的网络拓朴信息, 并根据获取到的虚拟机组的标识进行业务处理, 例如保证 不将相同的业务分配给同一虚拟机组的虚拟机进行处理, 以满足上层应用的 可靠性和可用性的要求。 关于分布式应用的机架感知属性和虚拟机组的虚拟机架属性将在后续 实施例中详细说明。 如图 4所示, 为本发明实施例提供的又一个为分布式应用创建虚拟机的 流程图, 本发明实施例的方法包括:
步骤 401 : 虚拟化模块接收多个虚拟机組的创建请求, 其中, 每个虚拟 机組的创建请求指明所述每个虚拟机組所包含的虚拟机的数量和各虚拟机 的规格;
本实施例中, 虚拟化模块不再提供单个的虚拟机的创建模板, 而是提供 分布式应用的创建模板或者虚拟机组的创建模板, 分布式应用的创建模板中 包括多个虚拟机组, 每个虚拟机组包括至少一台虚拟机, 所述多个虚拟机组 对应一个虚拟机集群, 所述虚拟机集群为分布式应用提供服务。 云管理员或 者用户或者其它分布式应用的管理软件在确定需要为分布式应用创建虚拟 机集群的时候, 将所述虚拟机集群的多台虚拟机进行分组, 每组虚拟机填写 到一个虚拟机组的创建模板, 每个虚拟机组的创建模板即对应一个虚拟机 组, 虚拟化模块接收多个虚拟机组的创建模板, 每个虚拟机组的创建模板中 可以包含虚拟机的数量、 标识以及每台虚拟机的规格。 例如, 某个分布式应 用需要创建 15台虚拟机, 15台虚拟机中的 2台虚拟机需要作为管理节点, 其规格信息为 8CPU、 100G内存, 其他虚拟机作为服务节点, 其规格信息为
2CPU、 40G 内存(服务节点的规格可以一致, 也可以不同, 本实施例以服 务节点的规格一致为例;)。 将所述 15台虚拟机分为 3组, 其中作为管理节点 的虚拟机不能分在同一组中, 因此, 虚拟化模块接收到 3个虚拟机节点组的 创建请求, 即接收到 3个虚拟机组的创建模板, 如下:
第一虚拟机组的创建模板:
VM数量: 5;
VM规格: VM1 (8CPU、 100G内存);
VM2 (2CPU、 40G内存);
VM3 (2CPU、 40G内存);
VM4 (2CPU、 40G内存);
VM5 (2CPU、 40G内存);
第二虚拟机组的创建模板:
VM数量: 5;
VM规格: VM6 (8CPU、 100G内存);
VM7 (2CPU、 40G内存);
VM8 (2CPU、 40G内存);
VM9 (2CPU、 40G内存);
VM10 (2CPU、 40G内存);
第三虚拟机组的创建模板:
VM数量: 5;
VM规格: VM11 (2CPU、 40G内存);
VM12 (2CPU、 40G内存); VM13 ( 2CPU、 40G内存);
VM14 ( 2CPU、 40G内存);
VM15 ( 2CPU、 40G内存)。
步骤 402 : 所述虚拟化模块根据所述多个虚拟机組的创建请求, 确定所 述多个虚拟机組。
例如根据所述 3个虚拟机組的创建请求, 确定 3个虚拟机組。
步骤 403 :所述虚拟化模块为所述每个虚拟机組确定一个归属物理机架; 在本实施例中, 所述虚拟化模块在确定了多个虚拟机組之后, 可以进一 步为每个虚拟机組配置一个归属的物理机架, 每个虚拟机組中的虚拟机^ )夺在 所述归属的的物理机架下进行创建。
本发明实施例旨在为分布式应用创建满足其运行需求的虚拟机, 因此本 发明实施例在创建虚拟机的过程中, 考虑了分布式应用的特性。
大型分布式应用会分布在很多物理机架上。 在这种情况下, 基于可靠性 和可用性的要求, 产生如下要求:
希望不同节点之间的通信能够尽量发生在同一个物理机架之内,而不 是跨物理机架, 目的是使写入数据产生的开销最小化;
管理节点尽可能把数据块的副本放到多个物理机架上, 目的是为了提 高容错能力, 使数据的可靠性和可用性最大化。
基于这两点要求, 分布式应用的运行属性中包含机架感知属性, 在分布 式分布式应用的运行时,通过机架感知属性来获取每个节点的网络拓朴信息 中的物理机架信息, 并根据获取到的物理机架信息进行业务处理。 例如对于 副本放置(Replica Placement ), 数据块的副本放置策略的目的是在上述两点 要求之间取得平衡, 可以遵循以下规则:
- 第 1个副本放置于本地节点;
- 第 2个副本放置于不同的物理机架;
- 第 3个副本放置于本地物理机架的不同物理机; - 其余的副本在遵循以下限制的前提下随机放置:
- 1个节点最多放置 1个副本
- 如果副本数少于 2倍机架数,不可以在同一机架放置超过 2个副 本。
也就是说, 当分布式应用发生数据读写的时候, 管理节点需要获知每个 节点的机架信息以根据上述规则决定数据副本放置在哪个节点上, 并由哪个 节点运行或者处理。 当分布式应用与虚拟化技术结合之后, 执行任务的节点就是虚拟机, 因 此, 分布式应用需要知道每个虚拟机所属于的机架号, 才能进行业务处理, 另外, 执行任务的虚拟机部署在哪台物理机上也需要遵循一定的规则, 才能 满足分布式应用的运行需求。 本发明实施例基于分布式应用的运行属性的要求, 所述虚拟化模块在为 分布式应用创建虚拟机集群的时候, 考虑分布式应用的运行属性, 增加适配 层, 对分布式应用的运行属性进行适配, 产生与所述分布式应用的运行属性 相适配的虚拟机組的部署属性, 以使得创建的虚拟机集群能够满足分布式应 用的运行属性。 例如, 根据根据分布式应用的机架感知属性产生虚拟机組的 虚拟机架属性, 即同一虚拟机組对应一个归属物理机架, 每个虚拟机节点組 中的虚拟机创建在其归属的物理机架下。
在本实施例中, 所述的虚拟机组的虚拟机架属性用于模拟物理机架的属 性, 一个虚拟机架可以等同于一个物理机架, 一个虚拟机架内的虚拟机与一 个物理机架内的物理机具有相同的特性, 例如, 每个物理机架下的各台物理 机的物理和软件资源具有独立性且互不干扰,但却具有相同的电源与基础设 施(例如空调设备等), 因此, 相应地, 每个虚拟机架中的每台虚拟机也具 有独立互不干扰的物理和软件资源, 以及具有相同的电源与基础设施。 具体 来说, 要使得虚拟机组的虚拟机架属性与物理机架具有相同的特性, 则同一 个虚拟机组中的不同虚拟机创建在同一个物理机架下, 也即, 同一个虚拟机 组中的不同虚拟机的物理资源应该来自于同一个物理机架。
步骤 403中为所述每个虚拟机组确定一个归属物理机架的具体实现方式 可以有多种方式, 所述虚拟化模块首先可以根据每个虚拟机组的配置信息, 为所述每个虚拟机组确定一个归属物理机架,也可以为每个虚拟机组任意或 者通过轮流的方式指定一个归属物理机架, 实际部署的时候, 若指定的归属 物理机架的物理资源不能满足虚拟机组的资源需求, 可以重新指定另一个归 属物理机架。 例如, 步骤 403可以包括:
步骤 403-1: 确定待分配归属物理机架的当前虚拟机組;
步骤 403-2: 获取物理设备层上的空闲物理机架;
在本发明实施例中, 空闲物理机架或者空闲物理机, 主要是指那些物理 资源未被完全占用的物理机架或物理机, 可以包含资源完全未被占用的物理 机架或物理机, 也可以指资源只被部分占用的物理机架或物理机。
步骤 403-3 : 根据所述每个虚拟机組包含的虚拟机的数量和各个虚拟机 的规格, 从所述空闲物理机架中选择空闲资源满足所述当前虚拟机組所需资 源的第一物理机架;
步骤 403-4: 从所述第一物理机架中选择一个作为所述归属物理机架。 上述确定归属物理机架的过程中, 所述虚拟化模块考虑了每个虚拟机组 的配置信息,选择空闲资源满足虚拟机组的资源需求的物理机架作为归属物 理机架, 保证了在归属的物理机架下创建虚拟机组能够被成功执行, 提高了 虚拟机组的创建成功率。
进一步地, 在步骤 403-3中, 所述虚拟化模块还可以进一步判断物理机 架中的每台物理机的资源是否满足每台虚拟机的资源需求,对归属物理机架 进行进一步的筛选,使得所确定的归属物理机架的每台物理机都能够创建对 应的虚拟机组的每台虚拟机, 使得虚拟机的成功创建得到进一步的保证, 例 如可以步骤 403-3可以按照如下方式执行:
步骤 403-3-1 : 确定每个所述空闲物理机架上的空闲物理机的数量; 步骤 403-3-2 : 根据所述当前虚拟机組包含的虚拟机的数量, 从所述空 闲物理机架中选择第二物理机架, 其中, 所述第二物理机架的空闲物理机的 数量大于或等于所述当前虚拟机組包含的虚拟机的数量;
步骤 403-3-2 : 根据所述当前虚拟机組包含的各个虚拟机的规格, 从所 述第二物理机架中选择所述第一物理机架, 其中, 所述第一物理机架的空闲 物理机的空闲物理资源满足所述当前虚拟机組中的每台虚拟机的资源需求。 上述步骤 403中为所述每个虚拟机组确定一个归属物理机架, 除了根 据每个虚拟机组的配置信息之外, 还可以进一步考虑虚拟机组的约束信 息, 所述虚拟机组的约束信息指明所述多个虚拟机组之间的关联关系或者 互斥关系。 当然, 所述虚拟化模块也可以只根据虚拟机组的约束信息, 为 所述每个虚拟机组确定一个归属物理机架。
对于分布式应用来说, 一个集群软件往往可能包含很多个互相冗余的软 件实例(对应虚拟机),这些软件实例的拓朴关系比较复杂,例如对于 Hadoop 软件来说,管理节点不能在同一个物理机架中, 以保证业务的可靠性, 因此, 虚拟化模块在为分布式应用创建虚拟机集群时,可以获取虚拟机组的约束信 息, 所述虚拟机组的约束信息用于指明所述多个虚拟机组的创建关联关系或 者创建互斥关系, 例如, 某些虚拟机组需要创建在同一台物理机或同一个物 理机架中, 某些虚拟机组需要创建在同一台物理机或同一个物理机架中。
优选地, 一种具体实现方式是: 步骤 403-4 : 从所述第一物理机架中选 择一个作为所述当前虚拟机組的归属物理机架, 可以具体参照如下方式执 行:
步骤 403-4- 1: 获取虚拟机组的约束信息;
优选地, 本实施例中所述虚拟机组的约束信息可以随同所述多个虚拟机 组的创建请求一起发送到所述虚拟化模块,仍然以上述具体实例为例,例如, 管理节点需要跨物理机架进行创建, 因此所述虚拟化模块接收到如下虚拟机 组的约束信息: 第一虚拟机组与第二虚拟机组不能创建在同一个物理机机架下。
具体实践中, 上述虚拟机组的约束信息可以在所述多个虚拟机组的创建 模板中直接指定, 也可以作为单独的消息发送到所述虚拟化模块, 还可以由 所述虚拟化模块根据分布式应用的属性信息及相应的规则确定出虚拟机组 的约束信息, 本发明实施例对此不做限定。
步骤 403-4-2: 获取归属物理机架的分配记录信息, 所述分配记录信息 包括已分配归属物理机架的虚拟机組与归属物理机架的对应关系;
步骤 403-4-3 : 根据所述所述分配记录信息和所述虚拟机組约束信息, 从所述第一物理机架中选择一个作为所述当前虚拟机組的归属物理机架。
例如, 根据第一虚拟机組与第二虚拟机組不能创建在同一个物理机机架 下的虚拟机組约束信息, 第一虚拟机組的归属物理机架选择第一物理机架, 第二虚拟机組的归属物理机架选择第二物理机架。
另外, 由于分布式应用的更高的可靠性的要求, 例如至少一个相同的数 据副本需要放置在不同的物理机架下, 因此所述虚拟机组约束信息还可以设 置为: 不同虚拟机组对应不同的归属物理机架; 则, 所述虚拟化模块根据所 述虚拟机组的约束信息, 为所述每个虚拟机组确定一个不同的归属物理机 架, 例如第一虚拟机组的归属物理机架为物理机架 3 , 第二虚拟机组的归属 物理机架为物理机架 1 , 第三虚拟机组的归属物理机架为物理机架 2。
步骤 404 : 所述虚拟化模块在所述每个虚拟机組的归属物理机架下, 创 建所述每个虚拟机組;
所述虚拟化模块根据所述每个虚拟机組的配置信息, 例如, 所述每个虚 拟机組包含的虚拟机的数量和各个虚拟机的规格, 在所述每个虚拟机組的归 属物理机架下, 创建所述每个虚拟机組的每台虚拟机。 具体地, 所述虚拟化 模块根据每个虚拟机組中的虚拟机的数量和各个虚拟机的规格, 调度物理设 备层上的物理资源以创建每个虚拟机組中的每台虚拟机。
进一步地, 步骤 404中, 所述虚拟化模块还可以进一步将所述每个虚拟 机組中的不同虚拟机创建在所述归属物理机架中的不同物理机上, 即所述虚 拟化模块将同一个虚拟机組中的不同虚拟机创建在同一个物理机架下的不 同物理机中, 例如:
将第一虚拟机组创建在物理机架 3下, 在物理机架 3的物理机 1上创建 VM1 , 在物理机架 3的物理机 2上创建 VM2, 在物理机架 3的物理机 3上 创建 VM3 , 在物理机架 3的物理机 4上创建 VM4, 在物理机架 3的物理机 5上创建 VM5;
将第二虚拟机组创建在物理机架 1下, 在物理机架 1的物理机 1上创建 VM6, 在物理机架 1的物理机 2上创建 VM7, 在物理机架 1的物理机 3上 创建 VM8, 在物理机架 1的物理机 4上创建 VM9, 在物理机架 1的物理机 5上创建 VM10;
将第三虚拟机组创建在物理机架 2下, 在物理机架 2的物理机 1上创建 VM11 , 在物理机架 2的物理机 2上创建 VM12, 在物理机架 2的物理机 3 上创建 VM13 , 在物理机架 2的物理机 4上创建 VM14, 在物理机架 2的物 理机 5上创建 VM15。
上述虚拟化模块将同一虚拟机组的不同虚拟机创建在同一归属物理机 架的不同物理机上, 能够保证虚拟机组更进一步与物理机架具有相同的属 性, 使得虚拟机组能够满足分布式应用更高可靠性的运行要求。
步骤 405: 所述虚拟化模块获取所述每个虚拟机組的标识; 所述虚拟化模块可以为所述每个虚拟机组分配虚拟机组的标识, 例如, 所述虚拟化模块为第一虚拟机组分配的虚拟机组的标识为 VR1 ( VR, Virtual Rack ); 为第二虚拟机组分配的虚拟机组的标识为 VR2; 为第三虚拟机组分 配的虚拟机组的标识为 VR3。 所述步骤 406可以在虚拟化模块确定多个虚拟机组后即可执行, 本发明 实施例在此处描述并不限定其具体实施时的具体执行顺序。 当然, 所述虚拟化模块也可以不用分配所述虚拟机组的标识, 而获取每 个虚拟机组的创建请求中携带的虚拟机组的标识。
步骤 406 : 所述虚拟化模块将所述每个虚拟机組的标识提供给上层的应 用模块, 以使得所述上层的应用模块根据所述每个虚拟机組的标识处理业 务。
具体地, 所述虚拟化模块将所述每个虚拟机组的标识提供给分布式应 用。
分布式应用对机架的感知并非是自适应的, 首先分布式应用的管理者将 分布式分布式应用的各节点采用树状的网络拓朴结构进行管理, 例如, 分布 式应用由多个数据中心 (Data Center, DC) 組成, 每个数据中心里有多个机 架 (Rack) , 每个机架上有多台物理机。 每个节点可以通过如下形式表述其 在网络拓朴结构中的位置, 例如, R1的位置可以表示为 /D1/R1 , 而 N12的 位置可以表示为 /D2/R4/N12。 再次, 告知管理节点每个服务节点的网络拓 朴关系。 因此, 所述虚拟化模块还可以将每个虚拟机组的标识提供给所述分布式 应用, 以使得所述分布式应用根据所述每个虚拟机组的标识来处理业务。
例如,所述虚拟化模块返回虚拟机的创建结果, 包含 VR1 ( VM1、 VM2、 VM3、 VM4和 VM5 ), VR2 ( VM6、 VM7、 VM8、 VM9和 VM10 )和 VR3 ( VM11、 VM12、 VM13、 VM14和 VM15 )。
优选地, 所述虚拟化模块可以将每台虚拟机所归属的虚拟机组的标识作 为所述每台虚拟机的机架号, 提供给所述分布式应用。
进一步地, 所述虚拟化模块还可以将每个虚拟机组所在的物理机架的信 息提供给分布式应用, 例如所述虚拟化模块返回如下信息: VRl-Rackl , VR2-Rack2和 VR3-Rack3。
所述分布式应用获取到所述每个虚拟机组的标识后, 可以建立每台虚拟 机的网络拓朴结构, 并将所述网络拓朴结果配置到所述分布式应用的管理节 点中, 以使得所述管理节点根据每台虚拟机的网络拓朴结构进行业务处理。 如图 5所示, 为根据本发明实施例应用模块所建立的为分布式应用提供服务 的虚拟机群的网络拓朴结构图。 例如, VM1作为管理节点, 当接收到数据之 后, 根据每台虚拟机的网络拓朴结构, 进行如下处理:
- 第 1个副本放置于本地节点, 如 VM1 ;
第 2个副本放置于不同的物理机架, 如 VMG2中的 VM7;
- 第 3个副本放置于本地物理机架的不同物理机, 如 VMG1中的 VM2。
本发明实施例, 所述虚拟化模块在为分布式应用创建多台虚拟机时, 首 先确定由所述多台虚拟机划分得到的多个虚拟机组, 然后为每个虚拟机组指 定一个归属物理机架, 再在所述每个虚拟机组的归属物理机架下, 创建所述 每个虚拟机组, 由于每个虚拟机组在其归属的物理机架下进行创建, 每个虚 拟机组中的各虚拟机的具有相同的归属物理机架,使得每个虚拟机组等同于 一个物理机架, 这样的虚拟机创建方式, 每个虚拟机组中的各虚拟机的部署 属性能够满足分布式应用的机架感知属性,从而为分布式应用创建了满足其 运行需求的虚拟机集群。 并且, 本发明实施例考虑业界存在多种集群软件和 不同集群软件的不同运行属性,在虚拟化模块增加适配层来实现创建满足分 布式应用的虚拟机集群,使得分布式应用不需要改动即可与虚拟化技术结合 实施, 并保证分布式应用的性能不受影响。 另外, 本发明实施例中, 采用虚 拟机组的粒度来创建虚拟机, 此种通过虚拟机组创建虚拟机的方式也更加高 效。 在本实施例中, 由于进一步地将每个虚拟机组的标识提供给了上层的应 用模块, 例如分布式应用模块, 可以使得上层的应用模块在所述多台虚拟机 上运行的时候, 可以获知每台虚拟机所属于的虚拟机组, 由此获取每个节点 的网络拓朴信息, 并根据获取到的虚拟机组的标识进行业务处理, 例如保证 不将相同的业务分配给同一虚拟机组的虚拟机进行处理, 以满足上层应用的 可靠性和可用性的要求。
另外, 本实施例中, 虚拟化模块进一步考虑虚拟机组的约束信息来创建 虚拟机组, 使得属于一个分布式应用多个虚拟机组不共享物理机架, 即任意 两个虚拟机组都不创建在同一个物理机架下, 如此创建的虚拟机集群, 能够 满足可靠性更高要求的分布式应用的运行需求。
进一步地, 本实施例中, 虚拟化模块将同一虚拟机组的不同虚拟机创建 在同一归属物理机架的不同物理机上, 能够保证虚拟机组更进一步与物理机 架具有相同的属性,使得虚拟机组能够满足分布式应用更高可靠性的运行要 求。
进一步地,本实施例中,虚拟化模块不再提供单个的虚拟机的创建模板, 而是提供分布式应用的创建模板或者虚拟机组的创建模板,提供了更加便利 的虚拟机集群的创建方式。 如图 6所示, 为本发明实施例提供的又一种创建虚拟机集群的流程图, 本发明实施例的方法包括:
步骤 601 : 虚拟化模块接收多台虚拟机的创建请求, 其中, 每台虚拟机 的创建请求指明所述每台虚拟机的数量和规格;
所述多台虚拟机組成一个虚拟机集群, 所述虚拟机集群为分布式应用提 供服务; 在本实施例中, 所述虚拟化模块提供单个的虚拟机的创建模板, 云管理 员或者用户在确定需要为分布式应用创建虚拟机集群的时候,将所述虚拟机 集群的多台虚拟机填写到一个虚拟机的创建模板, 虚拟化模块接收多个虚拟 机的创建模板。 其中, 每个虚拟机的创建模板中可以包含虚拟机的标识、 数 量以及配置信息。 优选地, 所述虚拟化模块接收的虚拟机的创建模板可以是根据虚拟机的 规格进行分类后的创建模板, 例如所需要创建的虚拟机包含两种规格, 则虚 拟化模块可以接收到 2个虚拟机的创建模板, 每一种创建模板中包含了虚拟 机的规格、 标识和数量。 例如, 某个分布式应用需要创建 15台虚拟机, 15台虚拟机中的 2台虚 拟机需要作为管理节点, 其规格信息为 8CPU、 100G内存, 其他虚拟机作为 服务节点, 其规格信息为 2CPU、 40G 内存 (服务节点的规格可以一致, 也 可以不同, 本实施例以服务节点的规格一致为例)。 则所述虚拟化模块接收 到如下虚拟机的创建模板:
模板一 (第一虚拟机创建请求): 虚拟机规格: 8CPU、 100G 内存; 虚 拟机标识: VM1和 VM6 ; 虚拟机数量: 2 ;
模板二 (第二虚拟机创建请求): 虚拟机规格: 2CPU、 40G内存; 虚拟 机标识: VM2、 VM3、 VM4、 VM5、 VM7、 VM8、 VM9、 VM10、 VM1K VM12、 VM13、 VM14和 VM15 ; 虚拟机数量: 13。 步骤 602 :所述虚拟化模块将所述多台虚拟机划分为所述多个虚拟机组; 上一个实施例中, 云管理员或者用户或者其它分布式应用的管理软件在 确定需要为分布式应用创建虚拟机集群的时候, 将所述虚拟机集群的多台虚 拟机进行分組, 然后所述虚拟化模块接收已经分好組的多个虚拟机組的创建 请求, 然而, 在本实施例中, 所述虚拟化模块接收到的是多台虚拟机的创建 请求, 所述虚拟化模块需要将所述多台虚拟机进行分組, 以得到多个虚拟机 組。 所述虚拟化模块在对所述多台虚拟机进行分組的时候, 需要考虑分布式 应用的分布式属性, 例如管理节点分布是创建以满足可靠性, 即作为管理节 点的虚拟机不能分在同一組中, 得到的虚拟机組如下:
第一虚拟机組:
VM数量: 5 ;
成员: VM1、 VM2、 VM3、 VM4和 VM5 ;
第二虚拟机組:
VM数量: 5 ;
成员: VM6、 VM7、 VM8、 VM9和 VM10 ; 第三虚拟机組:
VM数量: 5 ;
成员: VM11、 VM12、 VM13、 VM14和 VM15。
上述虚拟机組的分組中, 每一个虚拟机組中的虚拟机数量是相同的, 但 是, 以上只是本发明的一个具体实施方式, 在其他实施例中, 每个虚拟机組 中的虚拟机的数量可以是任意的。 步骤 603 :所述虚拟化模块为所述每个虚拟机组确定一个归属物理机架; 步骤 604 : 在所述每个虚拟机組的归属物理机架下, 创建所述每个虚拟 机組;
步骤 605: 所述虚拟化模块获取所述每个虚拟机組的标识;
步骤 606 : 所述虚拟化模块将所述每个虚拟机組的标识提供给上层的应 用模块, 以使得所述上层的应用模块根据所述每个虚拟机組的标识处理业 务。
上述步骤 603-606与步骤 403-406的具体实现细节相类似, 本实施例中 就不再赘述。
本发明实施例中, 由于虚拟化模块接收到的是多台虚拟机创建请求, 该 虚拟化模块还将为分布式应用提供服务的多台虚拟机进行分組, 并对分組得 到的虚拟机組确定归属物理机架, 创建所述虚拟机組, 使得所创建的虚拟机 集群能够满足分布式应用的运行需求。
如图 7所示, 为本发明实施例提供的一种创建虚拟机的装置 700, 包括: 接收单元 701, 用于接收虚拟机创建请求, 所述虚拟机创建请求用于创 建多台虚拟机;
分組单元 702, 用于确定多个虚拟机組, 其中, 所述多个虚拟机組由所 述多台虚拟机划分得到, 每个虚拟机組包含至少一台虚拟机;
配置单元 703, 用于为所述每个虚拟机組确定归属物理机架, 其中, 一 个虚拟机組对应一个归属物理机架; 创建单元 704, 用于在所述每个虚拟机組的归属物理机架下, 创建所述 每个虚拟机組。
具体地, 所述创建单元 704具体用于: 将所述每个虚拟机組中的不同虚 拟机创建在所述归属物理机架中的不同物理机上。
具体地, 在本发明实施例的一种具体实现中, 所述配置单元 703具体用 于: 根据所述每个虚拟机組的配置信息, 为所述每个虚拟机組确定一个归属 物理机架, 其中, 所述每个虚拟机組的配置信息包括所述每个虚拟机組包含 的虚拟机的数量和各个虚拟机的规格。
优选地, 如图 8所示, 在本发明实施例的另一个优选实施例中, 所述装 置 800除包括如图 7所示的各組成外, 所述配置单元 703包括:
确定子单元 7031, 用于确定待分配归属物理机架的当前虚拟机組,获取 物理设备层上的空闲物理机架, 根据所述每个虚拟机組包含的虚拟机的数量 和各个虚拟机的规格, 从所述空闲物理机架中选择空闲资源满足所述当前虚 拟机組所需资源的第一物理机架;
选择子单元 7032,用于从所述第一物理机架中选择一个作为所述归属物 理机架。 进一步, 所述确定子单元 7031具体用于: 确定每个所述空闲物理机架 上的空闲物理机的数量, 根据所述当前虚拟机组包含的虚拟机的数量, 从所 述空闲物理机架中选择第二物理机架, 其中, 所述第二物理机架的空闲物理 机的数量大于或等于所述当前虚拟机组包含的虚拟机的数量,根据所述当前 虚拟机组包含的各个虚拟机的规格,从所述第二物理机架中选择所述第一物 理机架, 其中, 所述第一物理机架的空闲物理机的空闲物理资源满足所述当 前虚拟机组中的每台虚拟机的资源需求。
进一步, 所述选择子单元 7032具体用于: 获取虚拟机组的约束信息, 获取归属物理机架的分配记录信息, 所述分配记录信息包括已分配归属物理 机架的虚拟机组与归属物理机架的对应关系,根据所述所述分配记录信息和 所述虚拟机组约束信息,从所述第一物理机架中选择一个作为所述当前虚拟 机组的归属物理机架。 在本发明实施例的另一种具体实现中 ,所述配置单元 703可以具体用于: 获取虚拟机组的约束信息, 所述虚拟机组的约束信息表示所述多个虚拟机组 之间的关联关系或者互斥关系, 根据所述虚拟机组的约束信息, 为所述每个 虚拟机组确定一个所述归属物理机架。
在本发明实施例的另一种具体实现中, 如图 9所示, 所述装置 900除包 括如图 7所示的各組成外, 还包括发送单元 705, 用于获取所述每个虚拟机 組的标识, 将所述每个虚拟机組的标识提供给上层的应用模块, 以使得所述 上层的应用模块根据所述每个虚拟机組的标识处理业务。
优选地, 所述发送单元 705, 具体用于向所述上层的应用模块发送每台 虚拟机所在的机架号, 其中, 所述每台虚拟机所在的机架号为所述每台虚拟 机所在的虚拟机組的标识。
如图 10所示, 为本发明实施例提供的一种创建虚拟机的装置 1000, 包 括:
接收单元 1001, 用于接收虚拟机创建请求,所述虚拟机创建请求用于为 分布式应用创建多台虚拟机;
分組单元 1002, 用于确定多个虚拟机組, 其中, 所述多个虚拟机組由所 述多台虚拟机划分得到, 每个虚拟机組包含至少一台虚拟机;
获取单元 1003, 用于获取每个虚拟机組的配置信息, 其中, 所述每个虚 拟机組的配置信息包括所述每个虚拟机組包含的虚拟机的数量和各个虚拟 机的规格;
确定单元 1004, 用于根据所述分布式应用的运行属性,确定虚拟机組的 部署属性;
创建单元 1005, 用于根据所述获取单元 1003获取的所述每个虚拟机組 的配置信息和所述确定单元 1004确定的所述虚拟机組的部署属性, 创建所 述每个虚拟机組。
具体地, 所述确定单元 1004具体用于: 根据所述分布式应用的机架感 知属性, 确定所述虚拟机組的虚拟机架属性, 其中, 所述虚拟机架属性表明 一个虚拟机組对应一个归属物理机架;
所述创建单元 1005, 具体用于: 根据所述虚拟机組的虚拟机架属性, 为 所述每个虚拟机組确定一个归属物理机架, 根据所述每个虚拟机組的配置信 息, 在所述每个虚拟机組的归属物理机架下创建所述每个虚拟机組。
如图 11所示, 本发明实施例提供的一种创建虚拟机的系统, 包括: 云虚拟化装置 1101, 用于接收虚拟机创建请求, 所述虚拟机创建请求用 于创建多台虚拟机, 确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多 台虚拟机划分得到, 每个虚拟机組包含至少一台虚拟机, 为所述每个虚拟机 組确定归属物理机架, 其中, 一个虚拟机組对应一个归属物理机架, 在所述 每个虚拟机組的归属物理机架下, 创建所述每个虚拟机組, 获取所述每个虚 拟机組的标识, 将所述每个虚拟机組的标识提供给应用装置;
所述应用装置 1102, 用于接收所述每个虚拟机組的标识, 根据所述每个 虚拟机組的标识处理业务。
如图 12, 为本发明实施例的计算机的结构組成示意图。 本发明实施例的 计算机可包括:
处理器 1201、存储器 1202、 系统总线 1204和通信接口 1205。 CPU1201、 存储器 1202和通信接口 1205之间通过系统总线 1204连接并完成相互间的 通信。
处理器 1201可能为单核或多核中央处理单元, 或者为特定集成电路, 或者为被配置成实施本发明实施例的一个或多个集成电路。
存储器 1202可以为高速 RAM存储器, 也可以为非易失性存储器 (non- volatile memory) , 例如至少一个磁盘存储器。
存储器 1202用于计算机执行指令 1203。 具体的, 计算机执行指令 1203 中可以包括程序代码。
当计算机运行时, 处理器 1201运行计算机执行指令 1203, 可以执行图 2、 3、 4或图 6任意之一所述的方法流程。
本领域普通技术人员将会理解, 本发明的各个方面、 或各个方面的可能 实现方式可以被具体实施为系统、 方法或者计算机程序产品。 因此, 本发明 的各方面、 或各个方面的可能实现方式可以采用完全硬件实施例、 完全软件 实施例 (包括固件、驻留软件等等), 或者組合软件和硬件方面的实施例的形 式, 在这里都统称为 "电路" 、 "模块" 或者 "系统" 。 此外, 本发明的各 方面、 或各个方面的可能实现方式可以采用计算机程序产品的形式, 计算机 程序产品是指存储在计算机可读介质中的计算机可读程序代码。
计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。 计算机可读存储介质包含但不限于电子、 磁性、 光学、 电磁、 红外或半导体 系统、 设备或者装置, 或者前述的任意适当組合, 如随机存取存储器
(RAM), 只读存储器 (ROM)、 可擦除可编程只读存储器 (EPROM或者快闪 存储器)、 光纤、 便携式只读存储器 (CD-ROM)。
计算机中的处理器读取存储在计算机可读介质中的计算机可读程序代 码, 使得处理器能够执行在流程图中每个步骤、 或各步骤的組合中规定的功 能动作;生成实施在框图的每一块、或各块的組合中规定的功能动作的装置。
计算机可读程序代码可以完全在用户的计算机上执行、部分在用户的计 算机上执行、 作为单独的软件包、 部分在用户的计算机上并且部分在远程计 算机上, 或者完全在远程计算机或者服务器上执行。 也应该注意, 在某些替 代实施方案中, 在流程图中各步骤、 或框图中各块所注明的功能可能不按图 中注明的顺序发生。 例如, 依赖于所涉及的功能, 接连示出的两个步骤、 或 两个块实际上可能被大致同时执行, 或者这些块有时候可能被以相反顺序执 行。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。

Claims

权利 要 求
1、 一种创建虚拟机的方法, 其特征在于, 包括:
接收虚拟机创建请求, 所述虚拟机创建请求用于创建多台虚拟机; 确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多台虚拟机划分得 到, 每个虚拟机組包含至少一台虚拟机;
为所述每个虚拟机組确定归属物理机架, 其中, 一个虚拟机組对应一个 归属物理机架;
在所述每个虚拟机組的归属物理机架下, 创建所述每个虚拟机組。
2、 如权利要求 1所述的方法, 其特征在于, 在所述每个虚拟机組的归 属物理机架下, 创建所述每个虚拟机組, 包括:
将所述每个虚拟机組中的不同虚拟机创建在所述归属物理机架中的不 同物理机上。
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述为所述每个虚拟 机組确定归属物理机架, 包括:
根据所述每个虚拟机組的配置信息, 为所述每个虚拟机組确定一个归属 物理机架, 其中, 所述每个虚拟机組的配置信息包括所述每个虚拟机組包含 的虚拟机的数量和各个虚拟机的规格。
4、 如权利要求 3所述的方法, 其特征在于, 所述根据每个虚拟机組的 配置信息, 为所述每个虚拟机組确定一个归属物理机架, 包括:
确定待分配归属物理机架的当前虚拟机組;
获取物理设备层上的空闲物理机架;
根据所述每个虚拟机組包含的虚拟机的数量和各个虚拟机的规格, 从所 述空闲物理机架中选择空闲资源满足所述当前虚拟机組所需资源的第一物 理机架;
从所述第一物理机架中选择一个作为所述归属物理机架。
5、 如权利要求 4所述的方法, 其特征在于, 所述根据所述每个虚拟机 組包含的虚拟机的数量和各个虚拟机的规格, 从所述空闲物理机架中选择空 闲资源满足所述当前虚拟机組所需资源的第一物理机架, 包括:
确定每个所述空闲物理机架上的空闲物理机的数量;
根据所述当前虚拟机組包含的虚拟机的数量, 从所述空闲物理机架中选 择第二物理机架, 其中, 所述第二物理机架的空闲物理机的数量大于或等于 所述当前虚拟机組包含的虚拟机的数量;
根据所述当前虚拟机組包含的各个虚拟机的规格, 从所述第二物理机架 中选择所述第一物理机架, 其中, 所述第一物理机架的空闲物理机的空闲物 理资源满足所述当前虚拟机組中的每台虚拟机的资源需求。
6、 如权利要求 4或 5所述的方法, 其特征在于, 所述从所述第一物理 机架中选择一个作为所述归属物理机架, 包括:
获取虚拟机组的约束信息;
获取归属物理机架的分配记录信息, 所述分配记录信息包括已分配归属 物理机架的虚拟机組与归属物理机架的对应关系;
根据所述所述分配记录信息和所述虚拟机組约束信息, 从所述第一物理 机架中选择一个作为所述当前虚拟机組的归属物理机架。
7、 如权利要求 1或 2所述的方法, 其特征在于, 所述为所述每个虚拟 机組确定归属物理机架, 包括: 获取虚拟机组的约束信息, 所述虚拟机组的约束信息表示所述多个虚拟 机组之间的关联关系或者互斥关系;
根据所述虚拟机组的约束信息, 为所述每个虚拟机组确定一个所述归属 物理机架。
8、 如权利要求 6或 7所述的方法, 其特征在于, 所述虚拟机組约束信 息包括: 不同虚拟机組对应不同的归属物理机架;
则, 为所述每个虚拟机組确定一个不同的归属物理机架。
9、 如权利要求 1-8任一项所述的方法, 其特征在于, 还包括: 获取所述每个虚拟机組的标识;
将所述每个虚拟机組的标识提供给应用模块, 以使得所述应用模块根据 所述每个虚拟机組的标识处理业务。
10、 如权利要求 9所述的方法, 其特征在于, 所述^)夺所述每个虚拟机組 的标识提供给应用模块, 包括:
向所述应用模块发送每台虚拟机所在的机架号, 其中, 所述每台虚拟机 所在的机架号为所述每台虚拟机所在的虚拟机組的标识。
11、如权利要求 1-10任一项所述的方法, 其特征在于, 所述接收虚拟机 创建请求包括:
接收多个虚拟机組的创建请求, 其中, 每个虚拟机組的创建请求指明所 述每个虚拟机組所包含的虚拟机的数量和各虚拟机的规格;
相应地, 所述确定多个虚拟机組包括:
根据所述多个虚拟机組的创建请求, 确定所述多个虚拟机組。
12、 如权利要求 1-10任一项所述的方法, 其特征在于, 所述接收虚拟 机创建请求包括:
接收多台虚拟机的创建请求, 其中, 每台虚拟机的创建请求指明所述每 台虚拟机的规格;
相应地, 所述确定多个虚拟机組包括:
将所述多台虚拟机划分为所述多个虚拟机組。
13、 一种创建虚拟机的方法, 其特征在于, 包括:
接收虚拟机创建请求, 所述虚拟机创建请求用于为分布式应用创建多台 虚拟机;
确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多台虚拟机划分得 到, 每个虚拟机組包含至少一台虚拟机;
获取每个虚拟机組的配置信息, 其中, 所述每个虚拟机組的配置信息包 括所述每个虚拟机組包含的虚拟机的数量和各个虚拟机的规格; 根据所述分布式应用的运行属性, 确定虚拟机組的部署属性; 根据所述每个虚拟机組的配置信息和所述虚拟机組的部署属性, 创建所 述每个虚拟机組。
14、 如权利要求 13所述的方法, 其特征在于, 所述根据所述分布式应 用的属性, 确定所述每个虚拟机組的部署属性, 包括:
根据所述分布式应用的机架感知属性, 确定所述虚拟机組的虚拟机架属 性, 其中, 所述虚拟机架属性表明一个虚拟机組对应一个归属物理机架; 相应地, 所述根据所述每个虚拟机組的配置信息和所述虚拟机組的部署 属性, 创建所述每个虚拟机組, 包括:
根据所述虚拟机組的虚拟机架属性, 为所述每个虚拟机組确定一个归属 物理机架;
根据所述每个虚拟机組的配置信息, 在所述每个虚拟机組的归属物理机 架下创建所述每个虚拟机組。
15、 如权利要求 14所述的方法, 其特征在于, 根据所述每个虚拟机組 的配置信息, 在所述每个虚拟机組的归属物理机架下创建所述每个虚拟机 組, 包括:
根据所述每个虚拟机組的配置信息, 将所述每个虚拟机組中的不同虚拟 机创建在所述归属物理机架中的不同物理机上。
16、 如权利要求 14或 15所述的方法, 其特征在于, 所述根据所述虚拟 机組的虚拟机架属性, 为所述每个虚拟机組确定一个归属物理机架, 包括: 根据所述虚拟机組的虚拟机架属性, 为所述每个虚拟机組确定一个不同 的归属物理机架。
17、 一种创建虚拟机的装置, 其特征在于, 包括:
接收单元, 用于接收虚拟机创建请求, 所述虚拟机创建请求用于创建多 台虚拟机;
分組单元, 用于确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多 台虚拟机划分得到, 每个虚拟机組包含至少一台虚拟机;
配置单元, 用于为所述每个虚拟机組确定归属物理机架, 其中, 一个虚 拟机組对应一个归属物理机架;
创建单元, 用于在所述每个虚拟机組的归属物理机架下, 创建所述每个 虚拟机組 o
18、 如权利要求 17所述的装置, 其特征在于, 所述创建单元具体用于: 将所述每个虚拟机組中的不同虚拟机创建在所述归属物理机架中的不同物 理机上。
19、 如权利要求 17或 18所述的装置, 其特征在于, 所述配置单元具体 用于: 根据所述每个虚拟机組的配置信息, 为所述每个虚拟机組确定一个归 属物理机架, 其中, 所述每个虚拟机組的配置信息包括所述每个虚拟机組包 含的虚拟机的数量和各个虚拟机的规格。
20、 如权利要求 19所述的装置, 其特征在于, 所述配置单元包括: 确定子单元, 用于确定待分配归属物理机架的当前虚拟机組, 获取物理 设备层上的空闲物理机架, 根据所述每个虚拟机組包含的虚拟机的数量和各 个虚拟机的规格, 从所述空闲物理机架中选择空闲资源满足所述当前虚拟机 組所需资源的第一物理机架;
选择子单元, 用于从所述第一物理机架中选择一个作为所述归属物理机 木。
21、 如权利要求 20所述的装置, 其特征在于, 所述确定子单元具体用 于: 确定每个所述空闲物理机架上的空闲物理机的数量, 根据所述当前虚拟 机組包含的虚拟机的数量,从所述空闲物理机架中选择第二物理机架,其中, 所述第二物理机架的空闲物理机的数量大于或等于所述当前虚拟机組包含 的虚拟机的数量, 根据所述当前虚拟机組包含的各个虚拟机的规格, 从所述 第二物理机架中选择所述第一物理机架, 其中, 所述第一物理机架的空闲物 理机的空闲物理资源满足所述当前虚拟机組中的每台虚拟机的资源需求。
22、 如权利要求 20或 21所述的装置, 其特征在于, 所述选择子单元具 体用于: 获取虚拟机组的约束信息, 获取归属物理机架的分配记录信息, 所 述分配记录信息包括已分配归属物理机架的虚拟机組与归属物理机架的对 应关系, 根据所述所述分配记录信息和所述虚拟机組约束信息, 从所述第一 物理机架中选择一个作为所述当前虚拟机組的归属物理机架。
23、 如权利要求 17或 18所述的装置, 其特征在于, 所述配置单元具体 用于: 获取虚拟机组的约束信息, 所述虚拟机组的约束信息表示所述多个虚 拟机组之间的关联关系或者互斥关系, 根据所述虚拟机组的约束信息, 为所 述每个虚拟机组确定一个所述归属物理机架。
24、 如权利要求 22或 23所述的装置, 其特征在于, 所述虚拟机組约束 信息包括: 不同虚拟机組对应不同的归属物理机架;
贝 |J, 所述配置单元为所述每个虚拟机組确定一个不同的归属物理机架。
25、 如权利要求 22-24任一项所述的装置, 其特征在于, 还包括: 发送单元, 用于获取所述每个虚拟机組的标识, 将所述每个虚拟机組的 标识提供给应用模块, 以使得所述应用模块根据所述每个虚拟机組的标识处 理业务。
26、 如权利要求 25所述的装置, 其特征在于, 所述发送单元, 具体用 于向所述应用模块发送每台虚拟机所在的机架号, 其中, 所述每台虚拟机所 在的机架号为所述每台虚拟机所在的虚拟机組的标识。
27、 如权利要求 22-26任一项所述的装置, 其特征在于, 所述接收单元 具体用于: 接收多个虚拟机組的创建请求, 其中, 每个虚拟机組的创建请求 指明所述每个虚拟机組所包含的虚拟机的数量和各虚拟机的规格;
所述分組单元具体用于: 根据所述多个虚拟机組的创建请求, 确定所述 多个虚拟机組。
28、 如权利要求 22-26任一项所述的装置, 其特征在于, 所述接收单元 具体用于: 接收多台虚拟机的创建请求, 其中, 每台虚拟机的创建请求指明 所述每台虚拟机的规格;
所述分組单元具体用于: 将所述多台虚拟机划分为所述多个虚拟机組。
29、 一种创建虚拟机的装置, 其特征在于, 包括:
接收单元, 用于接收虚拟机创建请求, 所述虚拟机创建请求用于为分布 式应用创建多台虚拟机;
分組单元, 用于确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多 台虚拟机划分得到, 每个虚拟机組包含至少一台虚拟机;
获取单元, 用于获取每个虚拟机組的配置信息, 其中, 所述每个虚拟机 組的配置信息包括所述每个虚拟机組包含的虚拟机的数量和各个虚拟机的 规格;
确定单元, 用于根据所述分布式应用的运行属性, 确定虚拟机組的部署 属性;
创建单元, 用于根据所述每个虚拟机組的配置信息和所述虚拟机組的部 署属性, 创建所述每个虚拟机組。
30、 如权利要求 29所述的装置, 其特征在于, 所述确定单元具体用于: 根据所述分布式应用的机架感知属性, 确定所述虚拟机組的虚拟机架属性, 其中, 所述虚拟机架属性表明一个虚拟机組对应一个归属物理机架;
所述创建单元, 具体用于: 根据所述虚拟机組的虚拟机架属性, 为所述 每个虚拟机組确定一个归属物理机架, 根据所述每个虚拟机組的配置信息, 在所述每个虚拟机組的归属物理机架下创建所述每个虚拟机組。
31、 一种创建虚拟机的系统, 其特征在于, 包括:
云虚拟化装置, 用于接收虚拟机创建请求, 所述虚拟机创建请求用于创 建多台虚拟机, 确定多个虚拟机組, 其中, 所述多个虚拟机組由所述多台虚 拟机划分得到, 每个虚拟机組包含至少一台虚拟机, 为所述每个虚拟机組确 定归属物理机架, 其中, 一个虚拟机組对应一个归属物理机架, 在所述每个 虚拟机組的归属物理机架下, 创建所述每个虚拟机組, 获取所述每个虚拟机 組的标识, 将所述每个虚拟机組的标识提供给应用装置;
所述应用装置, 用于接收所述每个虚拟机組的标识, 根据所述每个虚拟 机組的标识处理业务。
32、 一种计算机, 其特征在于, 包括: 处理器、 存储器、 总线和通信接 口;
所述存储器用于存储计算机执行指令, 所述处理器与所述存储器通过 所述总线连接, 当所述计算机运行时, 所述处理器执行所述存储器存储的 所述计算机执行指令, 以使所述计算机执行如权利要求 1-12任一项所述的 创建虚拟机的方法。
33、 一种计算机, 其特征在于, 包括: 处理器、 存储器、 总线和通信接 口;
所述存储器用于存储计算机执行指令, 所述处理器与所述存储器通过 所述总线连接, 当所述计算机运行时, 所述处理器执行所述存储器存储的 所述计算机执行指令, 以使所述计算机执行如权利要求 13-16任一项所述 的创建虚拟机的方法。
34、 一种计算机可读介质, 其特征在于, 包括计算机执行指令, 当计 算机的处理器执行所述计算机执行指令时, 所述计算机执行如权利要求 1-12任一项所述的创建虚拟机的方法。
35、 一种计算机可读介质, 其特征在于 包括计算机执行指令, 当计 算机的处理器执行所述计算机执行指令时, 所述计算机执行如权利要求
13-16任一项所述的创建虚拟机的方法。
PCT/CN2013/085820 2013-10-23 2013-10-23 一种创建虚拟机的方法和装置 WO2015058377A1 (zh)

Priority Applications (10)

Application Number Priority Date Filing Date Title
EP13877430.2A EP2879049A4 (en) 2013-10-23 2013-10-23 METHOD, SYSTEM AND DEVICE FOR PRODUCING A VIRTUAL MACHINE
PCT/CN2013/085820 WO2015058377A1 (zh) 2013-10-23 2013-10-23 一种创建虚拟机的方法和装置
CN201610345019.9A CN106055381B (zh) 2013-10-23 2013-10-23 一种创建虚拟机的方法和装置
CN201380002627.4A CN103797462B (zh) 2013-10-23 2013-10-23 一种创建虚拟机的方法和装置
EP22152333.5A EP4071605A1 (en) 2013-10-23 2013-10-23 Method, system and apparatus for creating virtual machine
EP17166743.9A EP3287898A1 (en) 2013-10-23 2013-10-23 Method, system and apparatus for creating virtual machine
US14/492,329 US10489176B2 (en) 2013-10-23 2014-09-22 Method, system and apparatus for creating virtual machine
US14/703,340 US9389903B2 (en) 2013-10-23 2015-05-04 Method, system and apparatus for creating virtual machine
US16/672,504 US11704144B2 (en) 2013-10-23 2019-11-03 Creating virtual machine groups based on request
US17/220,615 US11714671B2 (en) 2013-10-23 2021-04-01 Creating virtual machine groups based on request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/085820 WO2015058377A1 (zh) 2013-10-23 2013-10-23 一种创建虚拟机的方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/492,329 Continuation US10489176B2 (en) 2013-10-23 2014-09-22 Method, system and apparatus for creating virtual machine

Publications (1)

Publication Number Publication Date
WO2015058377A1 true WO2015058377A1 (zh) 2015-04-30

Family

ID=50671622

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/085820 WO2015058377A1 (zh) 2013-10-23 2013-10-23 一种创建虚拟机的方法和装置

Country Status (4)

Country Link
US (4) US10489176B2 (zh)
EP (3) EP2879049A4 (zh)
CN (2) CN103797462B (zh)
WO (1) WO2015058377A1 (zh)

Families Citing this family (61)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10291472B2 (en) 2015-07-29 2019-05-14 AppFormix, Inc. Assessment of operational states of a computing environment
US10581687B2 (en) 2013-09-26 2020-03-03 Appformix Inc. Real-time cloud-infrastructure policy implementation and management
EP2879049A4 (en) * 2013-10-23 2015-07-15 Huawei Tech Co Ltd METHOD, SYSTEM AND DEVICE FOR PRODUCING A VIRTUAL MACHINE
US20150347170A1 (en) * 2014-05-27 2015-12-03 Vmware, Inc. Grouping virtual machines in a cloud application
US9875291B2 (en) * 2014-06-20 2018-01-23 Vmware, Inc. Method for visualizing degree of similarity and difference between a large group of objects and a reference object
US10044795B2 (en) * 2014-07-11 2018-08-07 Vmware Inc. Methods and apparatus for rack deployments for virtual computing environments
CN104461699A (zh) * 2014-12-29 2015-03-25 成都致云科技有限公司 虚拟主机创建方法及装置及分布式存储系统
US10097627B1 (en) * 2015-06-16 2018-10-09 Amazon Technologies, Inc. Computer resource allocation
US10740081B2 (en) 2015-06-30 2020-08-11 Vmware, Inc. Methods and apparatus for software lifecycle management of a virtual computing environment
CN105183588B (zh) * 2015-09-30 2018-10-30 华为技术有限公司 一种虚拟机的重建方法和装置
US10284430B2 (en) * 2015-12-09 2019-05-07 Vmware, Inc. Storage provisioning and configuration of network protocol parameters
US9948566B2 (en) 2015-12-09 2018-04-17 Vmware, Inc. Selective network traffic throttling
US10129201B2 (en) * 2015-12-09 2018-11-13 Bluedata Software, Inc. Management of domain name systems in a large-scale processing environment
WO2017100981A1 (zh) * 2015-12-14 2017-06-22 华为技术有限公司 一种处理业务的方法及系统
CN105630603A (zh) * 2015-12-17 2016-06-01 北京华胜天成科技股份有限公司 部署虚拟服务器的方法和装置
CN108475210B (zh) * 2015-12-23 2021-05-11 华为技术有限公司 机架感知
CN107045452B (zh) * 2016-02-06 2019-12-31 北京京东尚科信息技术有限公司 虚拟机调度方法和装置
CN107665141B (zh) * 2016-07-27 2020-12-29 腾讯科技(深圳)有限公司 一种数据库配置方法及其设备
US10102024B2 (en) * 2016-08-09 2018-10-16 Vmware, Inc. System and methods to create virtual machines with affinity rules and services asymmetry
CN106354544A (zh) * 2016-08-24 2017-01-25 华为技术有限公司 虚拟机创建方法、系统以及主机
CN107800814B (zh) * 2016-09-05 2021-08-13 国网江苏省电力公司信息通信分公司 虚拟机部署方法及装置
WO2018067850A1 (en) 2016-10-05 2018-04-12 Mox Networks, LLC Rfid-based rack inventory management systems
CN108073423B (zh) * 2016-11-09 2020-01-17 华为技术有限公司 一种加速器加载方法、系统和加速器加载装置
CN108268301B (zh) * 2016-12-30 2021-09-03 中国移动通信集团上海有限公司 虚拟网络功能的虚拟机部署方法及装置
US10296367B2 (en) 2017-02-03 2019-05-21 Microsoft Technology Licensing, Llc Resource management for virtual machines in cloud computing systems
US10423455B2 (en) * 2017-02-03 2019-09-24 Microsoft Technology Licensing, Llc Method for deploying virtual machines in cloud computing systems based on predicted lifetime
US10942760B2 (en) 2017-02-03 2021-03-09 Microsoft Technology Licensing, Llc Predictive rightsizing for virtual machines in cloud computing systems
CN108415876B (zh) * 2017-02-28 2020-01-07 杭州龙席网络科技股份有限公司 一种动态计算装置
US11068314B2 (en) 2017-03-29 2021-07-20 Juniper Networks, Inc. Micro-level monitoring, visibility and control of shared resources internal to a processor of a host machine for a virtual environment
US10868742B2 (en) 2017-03-29 2020-12-15 Juniper Networks, Inc. Multi-cluster dashboard for distributed virtualization infrastructure element monitoring and policy control
CN108733449B (zh) * 2017-04-17 2022-01-25 伊姆西Ip控股有限责任公司 用于管理虚拟机的方法、设备和计算机可读存储介质
US11323327B1 (en) 2017-04-19 2022-05-03 Juniper Networks, Inc. Virtualization infrastructure element monitoring and policy control in a cloud environment using profiles
CN109508223A (zh) * 2017-09-14 2019-03-22 顺丰科技有限公司 一种虚拟机批量创建方法、系统及设备
CN109753226A (zh) * 2017-11-07 2019-05-14 阿里巴巴集团控股有限公司 数据处理系统、方法及电子设备
CN109787792B (zh) * 2017-11-10 2022-05-13 阿里巴巴集团控股有限公司 一种管理分布式业务集群的系统
US11036532B2 (en) * 2017-11-29 2021-06-15 Microsoft Technology Licensing, Llc Fast join and leave virtual network
US11595474B2 (en) * 2017-12-28 2023-02-28 Cisco Technology, Inc. Accelerating data replication using multicast and non-volatile memory enabled nodes
US10541928B2 (en) 2018-01-18 2020-01-21 Vmware, Inc. Policy aware framework for application input output management
US11296960B2 (en) * 2018-03-08 2022-04-05 Nicira, Inc. Monitoring distributed applications
CN108614727B (zh) * 2018-03-23 2021-04-20 华为技术有限公司 一种虚拟机创建方法及装置
US10901721B2 (en) 2018-09-20 2021-01-26 Vmware, Inc. Methods and apparatus for version aliasing mechanisms and cumulative upgrades for software lifecycle management
CN109558214B (zh) * 2018-12-05 2021-06-15 腾讯科技(深圳)有限公司 异构环境下宿主机资源管理方法、装置和存储介质
CN109871262A (zh) * 2019-02-28 2019-06-11 北京隆普智能科技有限公司 一种虚拟机创建的方法及其创建装置
CN109885330B (zh) * 2019-02-28 2021-11-16 北京隆普智能科技有限公司 一种虚拟机生成的方法及其装置
CN110286937B (zh) * 2019-07-04 2021-06-15 深圳市指尖互动娱乐有限公司 一种分布式软件运行的方法及其系统
US11340931B2 (en) 2019-07-23 2022-05-24 Vmware, Inc. Recommendation generation based on selection of selectable elements of visual representation
US11398987B2 (en) 2019-07-23 2022-07-26 Vmware, Inc. Host-based flow aggregation
US11140090B2 (en) 2019-07-23 2021-10-05 Vmware, Inc. Analyzing flow group attributes using configuration tags
US11743135B2 (en) 2019-07-23 2023-08-29 Vmware, Inc. Presenting data regarding grouped flows
US11288256B2 (en) 2019-07-23 2022-03-29 Vmware, Inc. Dynamically providing keys to host for flow aggregation
US11188570B2 (en) 2019-07-23 2021-11-30 Vmware, Inc. Using keys to aggregate flow attributes at host
US11436075B2 (en) 2019-07-23 2022-09-06 Vmware, Inc. Offloading anomaly detection from server to host
US11176157B2 (en) 2019-07-23 2021-11-16 Vmware, Inc. Using keys to aggregate flows at appliance
US11349876B2 (en) 2019-07-23 2022-05-31 Vmware, Inc. Security policy recommendation generation
US11321213B2 (en) 2020-01-16 2022-05-03 Vmware, Inc. Correlation key used to correlate flow and con text data
US11785032B2 (en) 2021-01-22 2023-10-10 Vmware, Inc. Security threat detection based on network flow analysis
US11991187B2 (en) 2021-01-22 2024-05-21 VMware LLC Security threat detection based on network flow analysis
US11997120B2 (en) 2021-07-09 2024-05-28 VMware LLC Detecting threats to datacenter based on analysis of anomalous events
US11831667B2 (en) 2021-07-09 2023-11-28 Vmware, Inc. Identification of time-ordered sets of connections to identify threats to a datacenter
CN113326103B (zh) * 2021-08-03 2021-12-10 中电长城网际安全技术研究院(北京)有限公司 虚拟机创建方法及装置
US11792151B2 (en) 2021-10-21 2023-10-17 Vmware, Inc. Detection of threats based on responses to name resolution requests

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267334A (zh) * 2007-03-13 2008-09-17 联想(北京)有限公司 一种动态分配设备的方法及装置
CN101650667A (zh) * 2009-08-31 2010-02-17 曙光信息产业(北京)有限公司 一种虚拟机管理系统及方法
US20100303075A1 (en) * 2009-05-29 2010-12-02 Sun Microsystems, Inc. Managing traffic on virtualized lanes between a network switch and a virtual machine

Family Cites Families (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6711607B1 (en) * 2000-02-04 2004-03-23 Ensim Corporation Dynamic scheduling of task streams in a multiple-resource system to ensure task stream quality of service
US6643672B1 (en) 2000-07-31 2003-11-04 Hewlett-Packard Development Company, Lp. Method and apparatus for asynchronous file writes in a distributed file system
US7801128B2 (en) 2006-03-31 2010-09-21 Amazon Technologies, Inc. Managing communications between computing nodes
US8112527B2 (en) * 2006-05-24 2012-02-07 Nec Corporation Virtual machine management apparatus, and virtual machine management method and program
US8065676B1 (en) * 2007-04-24 2011-11-22 Hewlett-Packard Development Company, L.P. Automated provisioning of virtual machines for a virtual machine buffer pool and production pool
JP5238235B2 (ja) * 2007-12-07 2013-07-17 株式会社日立製作所 管理装置及び管理方法
US8473594B2 (en) * 2008-05-02 2013-06-25 Skytap Multitenant hosted virtual machine infrastructure
US9740533B2 (en) * 2009-08-03 2017-08-22 Oracle International Corporation Altruistic dependable memory overcommit for virtual machines
US9075661B2 (en) * 2010-10-20 2015-07-07 Microsoft Technology Licensing, Llc Placing objects on hosts using hard and soft constraints
US9015710B2 (en) 2011-04-12 2015-04-21 Pivotal Software, Inc. Deployment system for multi-node applications
US8671176B1 (en) 2011-04-29 2014-03-11 Juniper Networks, Inc. Virtual network prototyping environment
US20120287931A1 (en) * 2011-05-13 2012-11-15 International Business Machines Corporation Techniques for securing a virtualized computing environment using a physical network switch
US9317336B2 (en) * 2011-07-27 2016-04-19 Alcatel Lucent Method and apparatus for assignment of virtual resources within a cloud environment
US8909785B2 (en) * 2011-08-08 2014-12-09 International Business Machines Corporation Smart cloud workload balancer
CN103067425B (zh) * 2011-10-20 2016-04-27 中国移动通信集团公司 虚拟机创建方法、虚拟机管理系统及相关设备
CN102426475A (zh) * 2011-11-04 2012-04-25 中国联合网络通信集团有限公司 桌面虚拟化环境下的节能方法、节能管理服务器及系统
US9268590B2 (en) * 2012-02-29 2016-02-23 Vmware, Inc. Provisioning a cluster of distributed computing platform based on placement strategy
US9043786B1 (en) * 2012-06-29 2015-05-26 Emc Corporation Blueprint-driven environment template creation in a virtual infrastructure
US9582221B2 (en) * 2012-08-24 2017-02-28 Vmware, Inc. Virtualization-aware data locality in distributed data processing
CN103036949B (zh) * 2012-11-27 2015-06-17 华中科技大学 一种虚拟化环境下Cassandra系统的优化方法和系统
US9832205B2 (en) * 2013-03-15 2017-11-28 International Business Machines Corporation Cross provider security management functionality within a cloud service brokerage platform
KR101694518B1 (ko) * 2013-08-05 2017-01-23 한국전자통신연구원 가상 노드 배치 관리 시스템 및 방법
EP2879049A4 (en) * 2013-10-23 2015-07-15 Huawei Tech Co Ltd METHOD, SYSTEM AND DEVICE FOR PRODUCING A VIRTUAL MACHINE
US10044795B2 (en) * 2014-07-11 2018-08-07 Vmware Inc. Methods and apparatus for rack deployments for virtual computing environments
US9852035B2 (en) * 2015-08-25 2017-12-26 International Business Machines Corporation High availability dynamic restart priority calculator
US10552221B2 (en) * 2016-12-16 2020-02-04 Turbonomic, Inc. Systems, apparatus and methods for managing resources in computer systems
US10476748B2 (en) * 2017-03-01 2019-11-12 At&T Intellectual Property I, L.P. Managing physical resources of an application
US10756967B2 (en) * 2017-07-20 2020-08-25 Vmware Inc. Methods and apparatus to configure switches of a virtual rack

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267334A (zh) * 2007-03-13 2008-09-17 联想(北京)有限公司 一种动态分配设备的方法及装置
US20100303075A1 (en) * 2009-05-29 2010-12-02 Sun Microsystems, Inc. Managing traffic on virtualized lanes between a network switch and a virtual machine
CN101650667A (zh) * 2009-08-31 2010-02-17 曙光信息产业(北京)有限公司 一种虚拟机管理系统及方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2879049A4 *

Also Published As

Publication number Publication date
CN106055381A (zh) 2016-10-26
EP3287898A1 (en) 2018-02-28
EP2879049A4 (en) 2015-07-15
US10489176B2 (en) 2019-11-26
EP4071605A1 (en) 2022-10-12
CN103797462B (zh) 2016-06-29
EP2879049A1 (en) 2015-06-03
US20200081731A1 (en) 2020-03-12
US11704144B2 (en) 2023-07-18
US20150234674A1 (en) 2015-08-20
US20210224101A1 (en) 2021-07-22
US11714671B2 (en) 2023-08-01
US20150113529A1 (en) 2015-04-23
CN103797462A (zh) 2014-05-14
US9389903B2 (en) 2016-07-12
CN106055381B (zh) 2019-10-22

Similar Documents

Publication Publication Date Title
US11714671B2 (en) Creating virtual machine groups based on request
US11221884B2 (en) Hybrid virtual machine configuration management
US10572290B2 (en) Method and apparatus for allocating a physical resource to a virtual machine
KR101593463B1 (ko) 네트워크 분할을 통한 네이티브 클라우드 컴퓨팅
US9910687B2 (en) Data flow affinity for heterogenous virtual machines
WO2014089976A1 (zh) 虚拟机分配方法及装置
ES2607636T3 (es) Método implementado por ordenador y sistema para proporcionar un servicio de conexión en red y un producto de programa de ordenador adaptado para realizar el método
WO2017000645A1 (zh) 一种分配宿主机资源的方法和装置
US11093288B2 (en) Systems and methods for cluster resource balancing in a hyper-converged infrastructure
Ma et al. vLocality: Revisiting data locality for MapReduce in virtualized clouds
WO2013123650A1 (zh) 虚拟机分配方法和虚拟机分配装置
WO2017075796A1 (zh) 网络功能虚拟化nfv网络中分配虚拟资源的方法和装置
JP6069913B2 (ja) 情報処理システム、情報処理システムの制御方法及び制御プログラム
US11360824B2 (en) Customized partitioning of compute instances
WO2022063273A1 (zh) 一种基于numa属性的资源分配方法及装置
CN109558214A (zh) 异构环境下宿主机资源管理方法、装置和存储介质
KR101634672B1 (ko) 네트워크 인터페이스 가상화 장치, 방법 및 이를 실행하기 위한 컴퓨터 프로그램
JP6339978B2 (ja) リソース割当管理装置およびリソース割当管理方法
KR20160148898A (ko) 테넌트 기반의 동적 프로세서 할당 장치 및 방법

Legal Events

Date Code Title Description
REEP Request for entry into the european phase

Ref document number: 2013877430

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013877430

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE