WO2019100589A1 - Virtual machine rapid capacity expansion method, apparatus and device, and storage medium - Google Patents

Virtual machine rapid capacity expansion method, apparatus and device, and storage medium Download PDF

Info

Publication number
WO2019100589A1
WO2019100589A1 PCT/CN2018/075049 CN2018075049W WO2019100589A1 WO 2019100589 A1 WO2019100589 A1 WO 2019100589A1 CN 2018075049 W CN2018075049 W CN 2018075049W WO 2019100589 A1 WO2019100589 A1 WO 2019100589A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
copy
target
clone
machine
Prior art date
Application number
PCT/CN2018/075049
Other languages
French (fr)
Chinese (zh)
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 平安科技(深圳)有限公司
Publication of WO2019100589A1 publication Critical patent/WO2019100589A1/en

Links

Images

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/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/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • 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/45583Memory management, e.g. access or allocation

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for rapidly expanding a virtual machine.
  • the user's requirements for the virtual machine are purchased on demand.
  • the configuration of the initial virtual machine cannot meet the needs of the user.
  • the user upgrades the configuration and expands the capacity.
  • the process of upgrading the configuration is relatively simple, and the process of the application system is relatively complicated. For example, for a JAVA application, the general operation and maintenance personnel will first find a new physical machine or virtual machine to copy all the jar packages on node A to node B for redeployment, and require testers to conduct comprehensive tests. As a result, the deployment process of the entire virtual machine takes a long time, which increases the workload of the operation and maintenance personnel.
  • the embodiments of the present application provide a method, a device, a device, and a storage medium for rapidly expanding a virtual machine, so as to implement a rapid deployment of the virtual machine to reduce the workload of the operation and maintenance personnel.
  • the embodiment of the present application provides a method for rapidly expanding a virtual machine, where the method includes:
  • the operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
  • the embodiment of the present application provides a virtual machine rapid expansion device, and the device includes:
  • a cloning unit for cloning a virtual machine to obtain a virtual machine copy
  • a synchronization unit configured to synchronize the virtual machine copy to the global storage
  • a first copy unit configured to copy the virtual machine copy to a target physical machine or a target virtual machine
  • An execution unit configured to perform an operation of the virtual machine copy in the target physical machine or a target virtual machine.
  • the embodiment of the present application further provides a virtual machine rapid expansion device, including:
  • a memory for storing a program for implementing a virtual machine rapid expansion method
  • a processor configured to run a program for implementing a virtual machine fast expansion method stored in the memory, to perform the following operations:
  • the operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
  • an embodiment of the present application further provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors Execute to implement the following steps:
  • the operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
  • the virtual machine is cloned; the cloned virtual machine copy is obtained and synchronized to the global storage; the virtual machine copy is copied to the target physical machine or the target virtual machine; and the target physical machine or target is The operation of the virtual machine copy is performed in the virtual machine to implement rapid deployment of the virtual machine, and the workload of the operation and maintenance personnel can be reduced.
  • FIG. 1 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart of a method for rapidly expanding a virtual machine according to another embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a method for rapidly expanding a virtual machine according to another embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a virtual machine rapid expansion device according to an embodiment of the present application.
  • FIG. 7 is another schematic block diagram of a virtual machine fast expansion device according to an embodiment of the present application.
  • FIG. 8 is another schematic block diagram of a virtual machine rapid expansion device according to an embodiment of the present application.
  • FIG. 9 is another schematic block diagram of a virtual machine rapid expansion device according to an embodiment of the present disclosure.
  • FIG. 10 is another schematic block diagram of a virtual machine fast expansion device according to an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a virtual machine rapid expansion device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present disclosure.
  • the method can be run on terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices.
  • the method for rapidly expanding a virtual machine according to the embodiment of the present invention can implement rapid deployment of a virtual machine and reduce the workload of the operation and maintenance personnel.
  • FIG. 1 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present application. The method includes steps S101 to S104.
  • the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring.
  • the original state in the virtual machine includes each application in the virtual machine.
  • the software, each script, and each application plug-in, etc. thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
  • cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged.
  • a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
  • step S101 includes steps S201 to S205.
  • S201 Receive an instruction to open the target virtual machine, and open the target virtual machine according to the received instruction.
  • the virtual machine selected by the user is opened by the hardware device, and the virtual machine selected by the user is used as the target virtual machine.
  • the preset clone platform is VMware 8.0 virtual machine software
  • the virtual machine software integrates powerful desktop virtual computer software, and provides a user to run the virtual machine on a single desktop at the same time.
  • Software, through the virtual machine software can also run different operating systems at the same time, as well as cloning, testing, development and other operations for different operating systems.
  • the hardware device Open the target virtual machine on the VMware 8.0 virtual machine software platform and start the cloning of the target virtual machine by clicking VM-Manage--Clone in the menu.
  • the cloning state refers to that the original virtual machine may be selected to be cloned as the current state of the parent, or the snapshot of the original virtual machine may be selected for cloning, and the cloned state may be in the click menu.
  • VM--Manage--Clone is selected, for example, if the virtual machine selected by the user is the original virtual machine, then the original virtual machine is selected as the parent to be cloned. If the virtual machine selected by the user is a virtual machine snapshot, then the selection is made. The virtual machine snapshot is cloned.
  • the clone type includes a contact clone or a comprehensive clone, wherein the contact clone refers to a clone performed from a snapshot of the parent, and the full clone refers to the clone from the current state of the parent.
  • the linked clone is usually displayed as a contact clone.
  • the full clone represents a full clone.
  • the current display interface displays two columns, linked clone and full clone, respectively.
  • the clone points to the original virtual machine and takes up a lot of disk space. It does not need to be cloned independently of the original virtual machine.
  • Full clone refers to a completely independent clone, and can point to the original virtual machine and the virtual machine snapshot respectively. Will take up a lot of disk space, and the speed of cloning is slower than linked clone.
  • the target virtual machine is cloned according to the selected clone type.
  • the VMware 8.0 virtual machine software after determining the selected clone type, automatically enters the cloning operation, and the automatic cloning operation is: first, a new virtual machine name page is popped up for the user to fill in the cloned operation. The name of the virtual machine, then determine the installation location of the new virtual machine, and finally complete the cloning of the original virtual machine or virtual machine snapshot through the cloning step.
  • the global storage is a global storage across the available area
  • the available area refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs.
  • the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application.
  • embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
  • the virtual machine copy on the VMware 8.0 virtual machine software can be regarded as a vmdk file, that is, a cloned virtual machine is a vmdk file, because of the linked clone or full clone in the clone type. Both have the function of copying the virtual machine copy. Therefore, for the global storage of two AZs, if you need to copy the virtual machine copy to another available area, the user can select the linked clone or full clone method to copy the virtual machine from the virtual machine copy. One free area is copied to another available area, where the available area of the target copy is taken as the target physical machine or the target virtual machine.
  • step S103 includes steps S301 to S302.
  • S301 Call an elastic expansion interface of the preset cloud environment platform.
  • the VMware 8.0 virtual machine software invokes a preset cloud environment platform (for example, OpenStack platform).
  • the elastic expansion interface adds a virtual machine or a physical machine through the elastic expansion interface, and the target virtual machine or the target physical machine is determined through the elastic expansion interface. If the virtual machine or the physical machine is added through the elastic expansion interface, the virtual machine or the physical machine is added.
  • the virtual machine or physical machine is regarded as the target virtual machine or the target physical machine.
  • the virtual machine copy is copied to the target physical machine or the target virtual through the elastic expansion interface by using linked clone or full clone. on board.
  • the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine.
  • the process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
  • the embodiment of the present application obtains a virtual machine copy by cloning the virtual machine; synchronizing the virtual machine copy to the global storage; copying the virtual machine copy to the target physical machine or the target virtual machine; The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine to implement rapid deployment of the virtual machine, and the workload of the operation and maintenance personnel can be reduced.
  • FIG. 4 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present disclosure.
  • the method can be run on terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices.
  • terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices.
  • the method includes steps S401 to S406.
  • the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring.
  • the original state in the virtual machine includes each application in the virtual machine.
  • the software, each script, and each application plug-in, etc. thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
  • cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged.
  • a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
  • the global storage is a global storage across the available area
  • the available area refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs.
  • the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application.
  • embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
  • the client predetermines the target physical machine or the target virtual machine to be copied, and associates the target virtual machine or the target physical machine with the global storage, if the target physical machine or the target virtual The machine needs to obtain a copy of the virtual machine for running, and the target physical machine or the target virtual machine may send a copy request to the global storage by using the global storage association relationship with the target virtual machine or the target physical machine to request virtual Machine copy.
  • the global storage receives a copy instruction corresponding to the copy request, and the copy instruction also corresponds to the copy request. Obtained from a target physical machine or a target virtual machine that replicates a virtual machine copy on the global storage according to the copy instruction.
  • the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine.
  • the process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
  • FIG. 5 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present disclosure.
  • the method can be run on terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices.
  • the method includes steps S501 to S506.
  • the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring.
  • the original state in the virtual machine includes each application in the virtual machine.
  • the software, each script, and each application plug-in, etc. thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
  • cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged.
  • a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
  • the global storage is a global storage across the available area
  • the available area refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs.
  • the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application.
  • embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
  • the virtual machine copy on the VMware 8.0 virtual machine software can be regarded as a vmdk file, that is, a cloned virtual machine is a vmdk file, because of the linked clone or full clone in the clone type. Both have the function of copying the virtual machine copy. Therefore, for the global storage of two AZs, if you need to copy the virtual machine copy to another available area, the user can select the linked clone or full clone method to copy the virtual machine from the virtual machine copy. One free area is copied to another available area, where the available area of the target copy is taken as the target physical machine or the target virtual machine.
  • the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine.
  • the process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
  • the working state abnormality of the virtual machine copy includes abnormal shutdown, failure to run a virtual machine, and the like. If the working state of the virtual machine copy is abnormally closed, an alarm is triggered, specifically triggering a buzzer alarm in the target physical machine or the target virtual machine; or if the working state of the virtual machine copy is abnormally inoperable The virtual machine triggers an alarm, specifically triggering the alarm of the light source device in the target physical machine or the target virtual machine.
  • the embodiment of the present application further provides a virtual machine rapid expansion device, where the device 100 includes: a cloning unit 101, a synchronization unit 102, a first replication unit 103, and an execution unit. 104.
  • the cloning unit 101 is configured to clone a virtual machine to obtain a virtual machine copy.
  • the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring.
  • the original state in the virtual machine includes each application in the virtual machine.
  • the software, each script, and each application plug-in, etc. thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
  • cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged.
  • a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
  • the synchronization unit 102 is configured to synchronize the virtual machine copy to the global storage.
  • the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs.
  • the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application.
  • embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
  • the first copy unit 103 is configured to copy the virtual machine copy to the target physical machine or the target virtual machine.
  • the virtual machine copy on the VMware 8.0 virtual machine software can be regarded as a vmdk file, that is, a cloned virtual machine is a vmdk file, because of the linked clone or full clone in the clone type. Both have the function of copying the virtual machine copy. Therefore, for the global storage of two AZs, if you need to copy the virtual machine copy to another available area, the user can select the linked clone or full clone method to copy the virtual machine from the virtual machine copy. One free area is copied to another available area, where the available area of the target copy is taken as the target physical machine or the target virtual machine.
  • the executing unit 104 is configured to perform an operation of the virtual machine copy in the target physical machine or the target virtual machine.
  • the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine.
  • the process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
  • the embodiment of the present application obtains a virtual machine copy by cloning the virtual machine; synchronizing the virtual machine copy to the global storage; copying the virtual machine copy to the target physical machine or the target virtual machine; The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine to implement rapid deployment of the virtual machine, and the workload of the operation and maintenance personnel can be reduced.
  • the cloning unit 101 includes:
  • the opening unit 1011 is configured to receive an instruction to open the target virtual machine, and open the target virtual machine according to the received instruction.
  • the virtual machine selected by the user is opened by the hardware device, and the virtual machine selected by the user is used as the target virtual machine.
  • the startup unit 1012 is configured to start a clone of the virtual machine if the operation of clicking the preset clone virtual button on the preset clone platform is detected.
  • the preset clone platform is VMware 8.0 virtual machine software
  • the virtual machine software integrates powerful desktop virtual computer software, and provides a user to run the virtual machine on a single desktop at the same time.
  • Software, through the virtual machine software can also run different operating systems at the same time, as well as cloning, testing, development and other operations for different operating systems.
  • the hardware device Open the target virtual machine on the VMware 8.0 virtual machine software platform and start the cloning of the target virtual machine by clicking VM-Manage--Clone in the menu.
  • the first selecting unit 1013 is configured to select a clone status of the target virtual machine in the current display interface.
  • the cloning state refers to that the original virtual machine may be selected to be cloned as the current state of the parent, or the snapshot of the original virtual machine may be selected for cloning, and the cloned state may be in the click menu.
  • VM--Manage--Clone is selected, for example, if the virtual machine selected by the user is the original virtual machine, then the original virtual machine is selected as the parent to be cloned. If the virtual machine selected by the user is a virtual machine snapshot, then the selection is made. The virtual machine snapshot is cloned.
  • the second selecting unit 1014 is configured to select a clone type on the current display interface according to the clone status of the selected target virtual machine.
  • the clone type includes a contact clone or a comprehensive clone, wherein the contact clone refers to a clone performed from a snapshot of the parent, and the full clone refers to the clone from the current state of the parent.
  • the linked clone is usually displayed as a contact clone.
  • the full clone represents a full clone. After the user selects the clone status, the current display interface displays two columns, linked clone and full clone, respectively.
  • the clone points to the original virtual machine and takes up a lot of disk space. It does not need to be cloned independently of the original virtual machine.
  • Full clone refers to a completely independent clone, and can point to the original virtual machine and the virtual machine snapshot respectively. Will take up a lot of disk space, and the speed of cloning is slower than linked clone.
  • the cloning subunit 1015 is configured to clone the target virtual machine according to the selected clone type.
  • the VMware 8.0 virtual machine software automatically enters the cloning operation, and the automatic cloning operation is: first, a new virtual machine name page is popped up for the user to fill in the cloned operation. The name of the virtual machine, then determine the installation location of the new virtual machine, and finally complete the cloning of the original virtual machine or virtual machine snapshot through the cloning step.
  • the first copying unit 103 includes:
  • the calling unit 1031 is configured to invoke an elastic expansion interface of the preset cloud environment platform.
  • the VMware 8.0 virtual machine software invokes a preset cloud environment platform (for example, OpenStack platform).
  • the elastic expansion interface adds a virtual machine or a physical machine through the elastic expansion interface, and the target virtual machine or the target physical machine is determined through the elastic expansion interface. If the virtual machine or the physical machine is added through the elastic expansion interface, the virtual machine or the physical machine is added.
  • the virtual machine or physical machine is regarded as the target virtual machine or the target physical machine.
  • the second copy unit 1032 is configured to copy the virtual machine copy to the target physical machine or the target virtual machine by using the elastic expansion interface.
  • the virtual machine copy is copied to the target physical machine or the target virtual through the elastic expansion interface by using linked clone or full clone. on board.
  • the embodiment of the present application further provides a virtual machine rapid expansion device.
  • the device 200 includes: a cloning unit 201, a synchronization unit 202, a receiving unit 203, and a third copy unit. 204.
  • the cloning unit 201 is configured to clone a virtual machine to obtain a virtual machine copy.
  • the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring.
  • the original state in the virtual machine includes each application in the virtual machine.
  • the software, each script, and each application plug-in, etc. thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
  • cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged.
  • a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
  • the synchronization unit 202 is configured to synchronize the virtual machine copy to the global storage.
  • the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs.
  • the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application.
  • embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
  • the receiving unit 203 is configured to receive a copy request sent by the target physical machine or the target virtual machine.
  • the client predetermines the target physical machine or the target virtual machine to be copied, and associates the target virtual machine or the target physical machine with the global storage, if the target physical machine or the target virtual The machine needs to obtain a copy of the virtual machine for running, and the target physical machine or the target virtual machine may send a copy request to the global storage by using the global storage association relationship with the target virtual machine or the target physical machine to request virtual Machine copy.
  • the third copy unit 204 is configured to copy the virtual machine copy on the global storage according to the copy request.
  • the global storage receives a copy instruction corresponding to the copy request, and the copy instruction also corresponds to the copy request. Obtained from a target physical machine or a target virtual machine that replicates a virtual machine copy on the global storage according to the copy instruction.
  • the sending unit 205 is configured to send the copied virtual machine copy to the target physical machine or the target virtual machine.
  • the target physical machine or the target virtual machine After copying the virtual machine copy on the global storage according to the copy instruction, another virtual machine copy identical to the virtual machine copy is obtained, and the copied virtual machine copy is sent to the target. Physical machine or target virtual machine.
  • the executing unit 206 is configured to perform an operation of the virtual machine copy in the target physical machine or the target virtual machine.
  • the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine.
  • the process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
  • the embodiment of the present application further provides a virtual machine rapid expansion device, which includes: a cloning unit 301, a synchronization unit 302, a first replication unit 303, and an execution unit. 304, monitoring unit 305, alarm unit 306.
  • the cloning unit 301 is configured to clone a virtual machine to obtain a virtual machine copy.
  • the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring.
  • the original state in the virtual machine includes each application in the virtual machine.
  • the software, each script, and each application plug-in, etc. thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
  • cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged.
  • a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
  • the synchronization unit 302 is configured to synchronize the virtual machine copy to the global storage.
  • the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs.
  • the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application.
  • embodiments of the present application employ global storage across the Availability Zone, which can be shared by two or more Availability Zones to facilitate rapid migration of cloned virtual machines from one Availability Zone to another Availability Zone.
  • the first copy unit 303 is configured to copy the virtual machine copy to the target physical machine or the target virtual machine.
  • the virtual machine copy on the VMware 8.0 virtual machine software can be regarded as a vmdk file, that is, a cloned virtual machine is a vmdk file, because of the linked clone or full clone in the clone type. Both have the function of copying the virtual machine copy. Therefore, for the global storage of two AZs, if you need to copy the virtual machine copy to another available area, the user can select the linked clone or full clone method to copy the virtual machine from the virtual machine copy. One free area is copied to another available area, where the available area of the target copy is taken as the target physical machine or the target virtual machine.
  • the executing unit 304 is configured to perform an operation of the virtual machine copy in the target physical machine or the target virtual machine.
  • the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine.
  • the process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
  • the monitoring unit 305 is configured to monitor an working state of the virtual machine copy.
  • the alarm unit 306 is configured to send an alarm message if the working status of the virtual machine copy is abnormal.
  • the working state abnormality of the virtual machine copy includes abnormal shutdown, failure to run a virtual machine, and the like. If the working state of the virtual machine copy is abnormally closed, an alarm is triggered, specifically triggering a buzzer alarm in the target physical machine or the target virtual machine; or if the working state of the virtual machine copy is abnormally inoperable The virtual machine triggers an alarm, specifically triggering the alarm of the light source device in the target physical machine or the target virtual machine.
  • the above cloning unit 101, the synchronization unit 102, the first copy unit 103, the execution unit 104, and the like may be embedded in or independent of the data processing device in hardware, or may be stored in the data processing device in software.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • the above virtual machine rapid expansion device can be implemented in the form of a computer program that can be run on a computer device as shown in FIG.
  • FIG. 11 is a schematic structural diagram of a virtual machine rapid expansion device according to the present application.
  • the device may be a terminal or a server, wherein the terminal may be a communication device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
  • the server can be a stand-alone server or a server cluster of multiple servers.
  • the computer device 500 includes a processor 502, a non-volatile storage medium 503, an internal memory 504, and a network interface 505 connected by a system bus 501.
  • the non-volatile storage medium 503 of the computer device 500 can store an operating system 5031 and a computer program 5032.
  • the processor 502 can be caused to execute a virtual machine rapid expansion method.
  • the processor 502 of the computer device 500 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, which when executed by the processor, causes the processor 502 to perform a virtual machine rapid expansion method.
  • the network interface 505 of the computer device 500 is used to perform network communications, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG. 11 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
  • the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • the processor 502 performs the following operations:
  • the operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
  • the copying the virtual machine copy to the target physical machine or the target virtual machine includes:
  • the cloning the virtual machine includes:
  • the target virtual machine is cloned according to the selected clone type.
  • the copying the virtual machine copy to the target physical machine or the target virtual machine includes:
  • the processor 502 also performs the following operations:
  • the embodiment of the virtual machine rapid expansion device shown in FIG. 11 does not constitute a limitation on the specific configuration of the virtual machine rapid expansion device.
  • the virtual machine rapid expansion device may include a comparison diagram. Show more or fewer parts, or combine some parts, or different parts.
  • the virtual machine rapidly expands the device to include only the memory and the processor. In such an embodiment, the structure and function of the memory and the processor are the same as those in the embodiment shown in FIG. .
  • the application provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
  • the operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
  • the copying the virtual machine copy to the target physical machine or the target virtual machine includes:
  • the cloning the virtual machine includes:
  • the target virtual machine is cloned according to the selected clone type.
  • the copying the virtual machine copy to the target physical machine or the target virtual machine includes:
  • the foregoing storage medium of the present application includes: a magnetic disk, an optical disk, a read-only memory (ROM), and the like, which can store various program codes.
  • the units in all the embodiments of the present application may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
  • a general-purpose integrated circuit such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
  • the steps in the method for rapidly expanding a virtual machine in the embodiment of the present application may be sequentially adjusted, merged, and deleted according to actual needs.
  • the units in the virtual machine rapid expansion device of the embodiment of the present application may be combined, divided, and deleted according to actual needs.

Abstract

Disclosed by an embodiment of the present invention are a virtual machine rapid capacity expansion method, apparatus and device, and a storage medium, method comprising: cloning a virtual machine to obtain a copy of the virtual machine; synchronizing the copy of the virtual machine to a global storage; duplicating the copy of the virtual machine in a target physical machine or a target virtual machine; executing an operation of the copy of the virtual machine in the target physical machine or the target virtual machine, thus achieving the rapid deployment of the virtual machine, while reducing the workload of operation and maintenance personnel.

Description

虚拟机快速扩容方法、装置、设备以及存储介质Virtual machine rapid expansion method, device, device and storage medium
本申请要求于2017年11月23日提交中国专利局、申请号为CN 201711184378.1、申请名称为“虚拟机快速扩容方法、装置、设备以及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on November 23, 2017, the Chinese Patent Office, the application number is CN 201711184378.1, and the application name is “Virtual Machine Rapid Expansion Method, Device, Equipment, and Storage Media”. The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种虚拟机快速扩容方法、装置、设备以及存储介质。The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for rapidly expanding a virtual machine.
背景技术Background technique
通常用户对于虚拟机的需求都是按需购买,但是随着业务应用的增加,刚开始的虚拟机的配置就满足不了用户的需要,这个时候用户就会升级配置以及扩容。升级配置的过程相对简单,相对而言对于应用系统的过程比较复杂。例如,对于一个JAVA应用来说,一般运维人员会先找一个新的物理机或者虚拟机将节点A上的所有jar包,拷贝到节点B上重新部署,并需要测试人员进行全面的测试。导致整个虚拟机的部署过程时间比较长,进而增加了运维人员的工作负担。Usually, the user's requirements for the virtual machine are purchased on demand. However, as the application of the service increases, the configuration of the initial virtual machine cannot meet the needs of the user. At this time, the user upgrades the configuration and expands the capacity. The process of upgrading the configuration is relatively simple, and the process of the application system is relatively complicated. For example, for a JAVA application, the general operation and maintenance personnel will first find a new physical machine or virtual machine to copy all the jar packages on node A to node B for redeployment, and require testers to conduct comprehensive tests. As a result, the deployment process of the entire virtual machine takes a long time, which increases the workload of the operation and maintenance personnel.
发明内容Summary of the invention
有鉴于此,本申请实施例提供一种虚拟机快速扩容方法、装置、设备以及存储介质,实现虚拟机的快速部署,以减轻运维人员的工作负担。In view of this, the embodiments of the present application provide a method, a device, a device, and a storage medium for rapidly expanding a virtual machine, so as to implement a rapid deployment of the virtual machine to reduce the workload of the operation and maintenance personnel.
第一方面,本申请实施例提供了一种虚拟机快速扩容方法,该方法包括:In a first aspect, the embodiment of the present application provides a method for rapidly expanding a virtual machine, where the method includes:
对虚拟机进行克隆,得到虚拟机副本;Clone the virtual machine to get a copy of the virtual machine;
将所述虚拟机副本同步至全局存储上;Synchronizing the virtual machine copy to the global storage;
将所述虚拟机副本复制到目标物理机或者目标虚拟机上;Copying the virtual machine copy to the target physical machine or the target virtual machine;
在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
另一方面,本申请实施例提供了一种虚拟机快速扩容装置,所述装置包括:On the other hand, the embodiment of the present application provides a virtual machine rapid expansion device, and the device includes:
克隆单元,用于对虚拟机进行克隆,得到虚拟机副本;a cloning unit for cloning a virtual machine to obtain a virtual machine copy;
同步单元,用于将所述虚拟机副本同步至全局存储上;a synchronization unit, configured to synchronize the virtual machine copy to the global storage;
第一复制单元,用于将所述虚拟机副本复制到目标物理机或者目标虚拟机上;a first copy unit, configured to copy the virtual machine copy to a target physical machine or a target virtual machine;
执行单元,用于在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。An execution unit, configured to perform an operation of the virtual machine copy in the target physical machine or a target virtual machine.
又一方面,本申请实施例还提供了一种虚拟机快速扩容设备,包括:In another aspect, the embodiment of the present application further provides a virtual machine rapid expansion device, including:
存储器,用于存储实现虚拟机快速扩容方法的程序;以及a memory for storing a program for implementing a virtual machine rapid expansion method;
处理器,用于运行所述存储器中存储的实现虚拟机快速扩容方法的程序,以执行以下操作:And a processor, configured to run a program for implementing a virtual machine fast expansion method stored in the memory, to perform the following operations:
对虚拟机进行克隆,得到虚拟机副本;Clone the virtual machine to get a copy of the virtual machine;
将所述虚拟机副本同步至全局存储上;Synchronizing the virtual machine copy to the global storage;
将所述虚拟机副本复制到目标物理机或者目标虚拟机上;Copying the virtual machine copy to the target physical machine or the target virtual machine;
在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
再一方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现以下步骤:In still another aspect, an embodiment of the present application further provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors Execute to implement the following steps:
对虚拟机进行克隆,得到虚拟机副本;Clone the virtual machine to get a copy of the virtual machine;
将所述虚拟机副本同步至全局存储上;Synchronizing the virtual machine copy to the global storage;
将所述虚拟机副本复制到目标物理机或者目标虚拟机上;Copying the virtual machine copy to the target physical machine or the target virtual machine;
在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
本申请实施例通过对虚拟机进行克隆;获取克隆后的虚拟机副本并同步至全局存储上;将所述虚拟机副本复制到目标物理机或者目标虚拟机上;在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作,实现虚拟机的快速部署,同时可以减轻运维人员的工作负担。In this embodiment, the virtual machine is cloned; the cloned virtual machine copy is obtained and synchronized to the global storage; the virtual machine copy is copied to the target physical machine or the target virtual machine; and the target physical machine or target is The operation of the virtual machine copy is performed in the virtual machine to implement rapid deployment of the virtual machine, and the workload of the operation and maintenance personnel can be reduced.
附图说明DRAWINGS
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are some embodiments of the present application, For the ordinary technicians, other drawings can be obtained based on these drawings without any creative work.
图1是本申请实施例提供的一种虚拟机快速扩容方法的示意流程图;1 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present application;
图2是本申请实施例提供的一种虚拟机快速扩容方法的示意流程图;2 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present application;
图3是本申请实施例提供的一种虚拟机快速扩容方法的示意流程图;3 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present application;
图4是本申请另一实施例提供的一种虚拟机快速扩容方法的示意流程图;4 is a schematic flowchart of a method for rapidly expanding a virtual machine according to another embodiment of the present application;
图5是本申请另一实施例提供的一种虚拟机快速扩容方法的示意流程图;FIG. 5 is a schematic flowchart of a method for rapidly expanding a virtual machine according to another embodiment of the present application;
图6是本申请实施例提供的一种虚拟机快速扩容装置的示意性框图;FIG. 6 is a schematic block diagram of a virtual machine rapid expansion device according to an embodiment of the present application; FIG.
图7是本申请实施例提供的一种虚拟机快速扩容装置的另一示意性框图;FIG. 7 is another schematic block diagram of a virtual machine fast expansion device according to an embodiment of the present application; FIG.
图8是本申请实施例提供的一种虚拟机快速扩容装置的另一示意性框图;FIG. 8 is another schematic block diagram of a virtual machine rapid expansion device according to an embodiment of the present application; FIG.
图9是本申请实施例提供的一种虚拟机快速扩容装置的另一示意性框图;FIG. 9 is another schematic block diagram of a virtual machine rapid expansion device according to an embodiment of the present disclosure;
图10是本申请实施例提供的一种虚拟机快速扩容装置的另一示意性框图;FIG. 10 is another schematic block diagram of a virtual machine fast expansion device according to an embodiment of the present application; FIG.
图11是本申请实施例提供的一种虚拟机快速扩容设备的结构组成示意图。FIG. 11 is a schematic structural diagram of a virtual machine rapid expansion device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。The use of the terms "comprising", "comprising", "","," The presence or addition of a plurality of other features, integers, steps, operations, elements, components, and/or collections thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。The terminology used herein is for the purpose of describing particular embodiments and is not intended to be limiting. As used in the specification and the appended claims, the claims
请参阅图1,图1为本申请实施例提供的一种虚拟机快速扩容方法的示意流程图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等终端中。本申请实施例所述的虚拟机快速扩容方法,能够实现虚拟机的快速部署,同时可以减轻运维人员的工作负担。图1是本申请实施例提供的虚拟机快速扩容方法的示意流程图。该方法包括步骤S101~S104。Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present disclosure. The method can be run on terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices. The method for rapidly expanding a virtual machine according to the embodiment of the present invention can implement rapid deployment of a virtual machine and reduce the workload of the operation and maintenance personnel. FIG. 1 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present application. The method includes steps S101 to S104.
S101,对虚拟机进行克隆,得到虚拟机副本。S101: clone the virtual machine to obtain a virtual machine copy.
在本申请实施例中,一般情况下,所述克隆指的是在VMware软件中对虚拟机的原始状态进行拷贝,或者进行镜像等复制操作,所谓虚拟机中的原始状态包括虚拟机中各应用软件、各脚本以及各应用插件等,因此,完成对虚拟机进行克隆的操作,即完成对虚拟机中的各应用软件、各脚本以及各应用插件等克隆的操作。In the embodiment of the present application, in general, the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring. The original state in the virtual machine includes each application in the virtual machine. The software, each script, and each application plug-in, etc., thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
需要说明的是,对虚拟机进行克隆并不会影响虚拟机本身,也就是说对虚拟机进行克隆只是进行了如拷贝、镜像的操作,并不会损坏原始虚拟机中的应用软件、脚本等软件程序,并且将克隆后得到的虚拟机称为虚拟机副本,该虚拟机副本可以脱离原始虚拟机而独立存在,该虚拟机副本具备原始虚拟机的所有应用软件、所有脚本以及所有应用插件等。It should be noted that cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged. a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
进一步地,如图2所示,步骤S101包括步骤S201~S205。Further, as shown in FIG. 2, step S101 includes steps S201 to S205.
S201,接收打开目标虚拟机的指令,并根据所接收的指令打开目标虚拟机。S201. Receive an instruction to open the target virtual machine, and open the target virtual machine according to the received instruction.
在本申请实施例中,用户选择一个虚拟机后,通过硬件设备打开用户所选择的虚拟机,将用户所选择的虚拟机作为目标虚拟机。In the embodiment of the present application, after the user selects a virtual machine, the virtual machine selected by the user is opened by the hardware device, and the virtual machine selected by the user is used as the target virtual machine.
S202,若检测到在预设的克隆平台上单击预设的克隆虚拟按键的操作,启动虚拟机的克隆。S202. If the operation of clicking the preset clone virtual button is detected on the preset clone platform, start the cloning of the virtual machine.
在本申请实施例中,所述预设的克隆平台为VMware8.0虚拟机软件,该虚拟机软件集成了功能强大的桌面虚拟计算机软件,并提供用户可在单一的桌面上同时运行该虚拟机软件,通过该虚拟机软件也可以同时运行不同的操作系统,以及针对不同操作系统进行克隆、测试、开发等操作。In the embodiment of the present application, the preset clone platform is VMware 8.0 virtual machine software, the virtual machine software integrates powerful desktop virtual computer software, and provides a user to run the virtual machine on a single desktop at the same time. Software, through the virtual machine software can also run different operating systems at the same time, as well as cloning, testing, development and other operations for different operating systems.
在VMware8.0虚拟机软件平台上,存在预设的克隆虚拟按键,例如菜单VM、子菜单Manage、以及子菜单Clone,当用户选择了所要克隆的虚拟机作为目标虚拟机后,通过硬件设备在VMware8.0虚拟机软件平台上打开目标虚拟机,通过单击菜单的VM--Manage--Clone以启动对目标虚拟机的克隆。On the VMware 8.0 virtual machine software platform, there are preset clone virtual keys, such as menu VM, submenu Manage, and submenu Clone. When the user selects the virtual machine to be cloned as the target virtual machine, the hardware device Open the target virtual machine on the VMware 8.0 virtual machine software platform and start the cloning of the target virtual machine by clicking VM-Manage--Clone in the menu.
S203,在当前显示界面中选择目标虚拟机的克隆状态。S203. Select a clone status of the target virtual machine in the current display interface.
在本申请实施例中,所述克隆状态指的是可以选择将原始虚拟机作为父本的当前状态进行克隆,也可以选择原始虚拟机的快照进行克隆,并且所述克隆状态可以在单击菜单VM--Manage--Clone之后进行选择,例如,若用户选择的虚拟机是原始虚拟机,则选择将原始虚拟机作为父本进行克隆,若用户选择的 虚拟机是虚拟机快照,则选择将虚拟机快照进行克隆。In the embodiment of the present application, the cloning state refers to that the original virtual machine may be selected to be cloned as the current state of the parent, or the snapshot of the original virtual machine may be selected for cloning, and the cloned state may be in the click menu. After VM--Manage--Clone is selected, for example, if the virtual machine selected by the user is the original virtual machine, then the original virtual machine is selected as the parent to be cloned. If the virtual machine selected by the user is a virtual machine snapshot, then the selection is made. The virtual machine snapshot is cloned.
S204,根据所选择的目标虚拟机的克隆状态在当前显示界面选择克隆类型。S204. Select a clone type on the current display interface according to the clone status of the selected target virtual machine.
在本申请实施例中,所述克隆类型包括联系克隆或者全面克隆,其中,联系克隆指的是从父本的一个快照中进行的克隆,全面克隆指的是从父本的当前状态进行的克隆;在当前显示页面中通常会显示linked clone代表联系克隆,显示full clone代表全面克隆,在用户选择完克隆状态之后,在当前显示界面会显示两个栏目分别为linked clone和full clone,其中,linked clone指向原始虚拟机,并且占用很多的磁盘空间,并不用脱离原始的虚拟机而独立进行克隆操作,full clone指的是完全独立的克隆,并可以分别指向原始虚拟机以及虚拟机快照,其同样会占用很多的磁盘空间,并且克隆的速度相对于linked clone要慢。In the embodiment of the present application, the clone type includes a contact clone or a comprehensive clone, wherein the contact clone refers to a clone performed from a snapshot of the parent, and the full clone refers to the clone from the current state of the parent. In the current display page, the linked clone is usually displayed as a contact clone. The full clone represents a full clone. After the user selects the clone status, the current display interface displays two columns, linked clone and full clone, respectively. The clone points to the original virtual machine and takes up a lot of disk space. It does not need to be cloned independently of the original virtual machine. Full clone refers to a completely independent clone, and can point to the original virtual machine and the virtual machine snapshot respectively. Will take up a lot of disk space, and the speed of cloning is slower than linked clone.
S205,根据所选择的克隆类型对所述目标虚拟机进行克隆。S205. The target virtual machine is cloned according to the selected clone type.
在本申请实施例中,当确定所选择的克隆类型之后,VMware8.0虚拟机软件会自动进入克隆操作,该自动的克隆操作为:首先会弹出新虚拟机名页面以供用户填入所克隆的虚拟机的名称,然后确定新的虚拟机的安装位置,最后通过克隆步骤完成原始虚拟机或者虚拟机快照的克隆。In the embodiment of the present application, after determining the selected clone type, the VMware 8.0 virtual machine software automatically enters the cloning operation, and the automatic cloning operation is: first, a new virtual machine name page is popped up for the user to fill in the cloned operation. The name of the virtual machine, then determine the installation location of the new virtual machine, and finally complete the cloning of the original virtual machine or virtual machine snapshot through the cloning step.
S102,将所述虚拟机副本同步至全局存储上。S102. Synchronize the virtual machine copy to the global storage.
在本申请实施例中,所述全局存储为跨可用区的全局存储,所谓可用区(Available Zone,AZ)指的是由多个交换机组成的区域,其中,全局存储可以是全局存储器,也可以是全局存储空间,还可以是全局云存储空间;在云环境中,有很多可用区存在,一个可用区有很多系统管理程序,其中,如果将应用部署在两个AZ上,代表这个应用的多个实例一定不是在一个交换机上;如果将应用跨AZ部署,那么一个AZ上的交换机有问题,我们就可以立即启动另外一个AZ上的应用实例,保证应用的高可用性。因此,本申请实施例采用跨可用区的全局存储,该全局存储可以被两个或者两个以上可用区共享,以便于快速将克隆的虚拟机从一个可用区到另一个可用区。In the embodiment of the present application, the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs. If the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application. Thus, embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
S103,将所述虚拟机副本复制到目标物理机或者目标虚拟机上。S103. Copy the virtual machine copy to a target physical machine or a target virtual machine.
在本申请实施例中,在VMware8.0虚拟机软件上的虚拟机副本可以视为一个vmdk文件,也就是说一个克隆的虚拟机即为一个vmdk文件,由于克隆类型中的linked clone或者full clone均具有拷贝虚拟机副本的功能,因此,对于两个AZ的全局存储,若需要将虚拟机副本复制到另一个可用区中,用户可以选择 linked clone或者full clone的方法将所述虚拟机副本从一个可用区拷贝至另一个可用区中,其中,将目标拷贝的可用区作为目标物理机或者目标虚拟机。In the embodiment of the present application, the virtual machine copy on the VMware 8.0 virtual machine software can be regarded as a vmdk file, that is, a cloned virtual machine is a vmdk file, because of the linked clone or full clone in the clone type. Both have the function of copying the virtual machine copy. Therefore, for the global storage of two AZs, if you need to copy the virtual machine copy to another available area, the user can select the linked clone or full clone method to copy the virtual machine from the virtual machine copy. One free area is copied to another available area, where the available area of the target copy is taken as the target physical machine or the target virtual machine.
进一步地,如图3所示,步骤S103包括步骤S301~S302。Further, as shown in FIG. 3, step S103 includes steps S301 to S302.
S301,调用预设云环境平台的弹性伸缩接口。S301: Call an elastic expansion interface of the preset cloud environment platform.
在本申请实施例中,若全局存储收到要求将虚拟机副本复制到目标物理机或者目标虚拟机上的指令,VMware8.0虚拟机软件会调用预设云环境平台(例如,OpenStack平台)的弹性伸缩接口,通过该弹性伸缩接口增加虚拟机或者物理机,也可以通过该弹性伸缩接口确定目标虚拟机或者目标物理机,其中,若通过该弹性伸缩接口增加虚拟机或者物理机,将所增加的虚拟机或者物理机视为目标虚拟机或者目标物理机。In the embodiment of the present application, if the global storage receives an instruction to copy the virtual machine copy to the target physical machine or the target virtual machine, the VMware 8.0 virtual machine software invokes a preset cloud environment platform (for example, OpenStack platform). The elastic expansion interface adds a virtual machine or a physical machine through the elastic expansion interface, and the target virtual machine or the target physical machine is determined through the elastic expansion interface. If the virtual machine or the physical machine is added through the elastic expansion interface, the virtual machine or the physical machine is added. The virtual machine or physical machine is regarded as the target virtual machine or the target physical machine.
S302,通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。S302. Copy the virtual machine copy to the target physical machine or the target virtual machine by using the elastic expansion interface.
在本申请实施例中,若确定虚拟机副本所要复制的目标物理机或者目标虚拟机,利用linked clone或者full clone并通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。In the embodiment of the present application, if the target physical machine or the target virtual machine to be copied by the virtual machine copy is determined, the virtual machine copy is copied to the target physical machine or the target virtual through the elastic expansion interface by using linked clone or full clone. on board.
S104,在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。S104. Perform an operation of the virtual machine copy in the target physical machine or the target virtual machine.
在本申请实施例中,所述VM操作指的是在目标物理机或者目标虚拟机上,执行所复制的虚拟机副本,即在目标物理机或者目标虚拟机上运行所克隆的虚拟机副本,在执行VM操作时,所述虚拟机副本在目标物理机或者目标虚拟机中被运行的过程,与所述虚拟机副本对应的原始虚拟机或者虚拟机快照执行的VM操作完全一致,并且两者互不影响、互相独立。In the embodiment of the present application, the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine. The process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
由以上可见,本申请实施例通过对虚拟机进行克隆,得到虚拟机副本;将所述虚拟机副本同步至全局存储上;将所述虚拟机副本复制到目标物理机或者目标虚拟机上;在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作,实现虚拟机的快速部署,同时可以减轻运维人员的工作负担。It can be seen from the above that the embodiment of the present application obtains a virtual machine copy by cloning the virtual machine; synchronizing the virtual machine copy to the global storage; copying the virtual machine copy to the target physical machine or the target virtual machine; The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine to implement rapid deployment of the virtual machine, and the workload of the operation and maintenance personnel can be reduced.
请参阅图4,图4是本申请实施例提供的一种虚拟机快速扩容方法的示意流程图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等终端中。如图4所示,该方法包括步骤S401~S406。Referring to FIG. 4, FIG. 4 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present disclosure. The method can be run on terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices. As shown in FIG. 4, the method includes steps S401 to S406.
S401,对虚拟机进行克隆,得到虚拟机副本。S401: clone the virtual machine to obtain a virtual machine copy.
在本申请实施例中,一般情况下,所述克隆指的是在VMware软件中对虚 拟机的原始状态进行拷贝,或者进行镜像等复制操作,所谓虚拟机中的原始状态包括虚拟机中各应用软件、各脚本以及各应用插件等,因此,完成对虚拟机进行克隆的操作,即完成对虚拟机中的各应用软件、各脚本以及各应用插件等克隆的操作。In the embodiment of the present application, in general, the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring. The original state in the virtual machine includes each application in the virtual machine. The software, each script, and each application plug-in, etc., thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
需要说明的是,对虚拟机进行克隆并不会影响虚拟机本身,也就是说对虚拟机进行克隆只是进行了如拷贝、镜像的操作,并不会损坏原始虚拟机中的应用软件、脚本等软件程序,并且将克隆后得到的虚拟机称为虚拟机副本,该虚拟机副本可以脱离原始虚拟机而独立存在,该虚拟机副本具备原始虚拟机的所有应用软件、所有脚本以及所有应用插件等。It should be noted that cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged. a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
S402,将所述虚拟机副本同步至全局存储上。S402. Synchronize the virtual machine copy to the global storage.
在本申请实施例中,所述全局存储为跨可用区的全局存储,所谓可用区(Available Zone,AZ)指的是由多个交换机组成的区域,其中,全局存储可以是全局存储器,也可以是全局存储空间,还可以是全局云存储空间;在云环境中,有很多可用区存在,一个可用区有很多系统管理程序,其中,如果将应用部署在两个AZ上,代表这个应用的多个实例一定不是在一个交换机上;如果将应用跨AZ部署,那么一个AZ上的交换机有问题,我们就可以立即启动另外一个AZ上的应用实例,保证应用的高可用性。因此,本申请实施例采用跨可用区的全局存储,该全局存储可以被两个或者两个以上可用区共享,以便于快速将克隆的虚拟机从一个可用区到另一个可用区。In the embodiment of the present application, the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs. If the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application. Thus, embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
S403,接收目标物理机或者目标虚拟机发送的复制请求。S403. Receive a copy request sent by the target physical machine or the target virtual machine.
在本申请实施例中,客户预先确定所要复制的所述目标物理机或者目标虚拟机,并将目标虚拟机或者目标物理机将与所述全局存储进行关联,若所述目标物理机或者目标虚拟机需要获取虚拟机副本进行运行,所述目标物理机或者目标虚拟机可以通过所述全局存储与所述目标虚拟机或者目标物理机的关联关系将复制请求发送给所述全局存储以要求获得虚拟机副本。In the embodiment of the present application, the client predetermines the target physical machine or the target virtual machine to be copied, and associates the target virtual machine or the target physical machine with the global storage, if the target physical machine or the target virtual The machine needs to obtain a copy of the virtual machine for running, and the target physical machine or the target virtual machine may send a copy request to the global storage by using the global storage association relationship with the target virtual machine or the target physical machine to request virtual Machine copy.
S404,根据所述复制请求在所述全局存储上对所述虚拟机副本进行复制。S404. Copy the virtual machine copy on the global storage according to the copy request.
在本申请实施例中,若接收到目标物理机或者目标虚拟机发送的复制请求,所述全局存储便会接收到与所述复制请求相对应的复制指令,该复制指令也复制请求相对应并从目标物理机或者目标虚拟机获得,所述全局存储根据该复制指令对全局存储上的虚拟机副本进行复制。In the embodiment of the present application, if a copy request sent by the target physical machine or the target virtual machine is received, the global storage receives a copy instruction corresponding to the copy request, and the copy instruction also corresponds to the copy request. Obtained from a target physical machine or a target virtual machine that replicates a virtual machine copy on the global storage according to the copy instruction.
S405,将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。S405. Send the copied virtual machine copy to the target physical machine or the target virtual machine.
在本申请实施例中,根据该复制指令对全局存储上的虚拟机副本进行复制后,得到与所述虚拟机副本完全相同的另一虚拟机副本,并将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。In this embodiment, after copying the virtual machine copy on the global storage according to the copy instruction, another virtual machine copy identical to the virtual machine copy is obtained, and the copied virtual machine copy is sent to the target. Physical machine or target virtual machine.
S406,在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。S406. Perform an operation of the virtual machine copy in the target physical machine or the target virtual machine.
在本申请实施例中,所述VM操作指的是在目标物理机或者目标虚拟机上,执行所复制的虚拟机副本,即在目标物理机或者目标虚拟机上运行所克隆的虚拟机副本,在执行VM操作时,所述虚拟机副本在目标物理机或者目标虚拟机中被运行的过程,与所述虚拟机副本对应的原始虚拟机或者虚拟机快照执行的VM操作完全一致,并且两者互不影响、互相独立。In the embodiment of the present application, the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine. The process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
请参阅图5,图5是本申请实施例提供的一种虚拟机快速扩容方法的示意流程图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等终端中。如图5所示,该方法包括步骤S501~S506。Referring to FIG. 5, FIG. 5 is a schematic flowchart of a method for rapidly expanding a virtual machine according to an embodiment of the present disclosure. The method can be run on terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices. As shown in FIG. 5, the method includes steps S501 to S506.
S501,对虚拟机进行克隆,得到虚拟机副本。S501: clone the virtual machine to obtain a virtual machine copy.
在本申请实施例中,一般情况下,所述克隆指的是在VMware软件中对虚拟机的原始状态进行拷贝,或者进行镜像等复制操作,所谓虚拟机中的原始状态包括虚拟机中各应用软件、各脚本以及各应用插件等,因此,完成对虚拟机进行克隆的操作,即完成对虚拟机中的各应用软件、各脚本以及各应用插件等克隆的操作。In the embodiment of the present application, in general, the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring. The original state in the virtual machine includes each application in the virtual machine. The software, each script, and each application plug-in, etc., thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
需要说明的是,对虚拟机进行克隆并不会影响虚拟机本身,也就是说对虚拟机进行克隆只是进行了如拷贝、镜像的操作,并不会损坏原始虚拟机中的应用软件、脚本等软件程序,并且将克隆后得到的虚拟机称为虚拟机副本,该虚拟机副本可以脱离原始虚拟机而独立存在,该虚拟机副本具备原始虚拟机的所有应用软件、所有脚本以及所有应用插件等。It should be noted that cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged. a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
S502,将所述虚拟机副本同步至全局存储上。S502. Synchronize the virtual machine copy to the global storage.
在本申请实施例中,所述全局存储为跨可用区的全局存储,所谓可用区(Available Zone,AZ)指的是由多个交换机组成的区域,其中,全局存储可以是全局存储器,也可以是全局存储空间,还可以是全局云存储空间;在云环境中,有很多可用区存在,一个可用区有很多系统管理程序,其中,如果将应用部署在两个AZ上,代表这个应用的多个实例一定不是在一个交换机上;如果将 应用跨AZ部署,那么一个AZ上的交换机有问题,我们就可以立即启动另外一个AZ上的应用实例,保证应用的高可用性。因此,本申请实施例采用跨可用区的全局存储,该全局存储可以被两个或者两个以上可用区共享,以便于快速将克隆的虚拟机从一个可用区到另一个可用区。In the embodiment of the present application, the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs. If the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application. Thus, embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
S503,将所述虚拟机副本复制到目标物理机或者目标虚拟机上。S503. Copy the virtual machine copy to the target physical machine or the target virtual machine.
在本申请实施例中,在VMware8.0虚拟机软件上的虚拟机副本可以视为一个vmdk文件,也就是说一个克隆的虚拟机即为一个vmdk文件,由于克隆类型中的linked clone或者full clone均具有拷贝虚拟机副本的功能,因此,对于两个AZ的全局存储,若需要将虚拟机副本复制到另一个可用区中,用户可以选择linked clone或者full clone的方法将所述虚拟机副本从一个可用区拷贝至另一个可用区中,其中,将目标拷贝的可用区作为目标物理机或者目标虚拟机。In the embodiment of the present application, the virtual machine copy on the VMware 8.0 virtual machine software can be regarded as a vmdk file, that is, a cloned virtual machine is a vmdk file, because of the linked clone or full clone in the clone type. Both have the function of copying the virtual machine copy. Therefore, for the global storage of two AZs, if you need to copy the virtual machine copy to another available area, the user can select the linked clone or full clone method to copy the virtual machine from the virtual machine copy. One free area is copied to another available area, where the available area of the target copy is taken as the target physical machine or the target virtual machine.
S504,在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。S504. Perform an operation of the virtual machine copy in the target physical machine or the target virtual machine.
在本申请实施例中,所述VM操作指的是在目标物理机或者目标虚拟机上,执行所复制的虚拟机副本,即在目标物理机或者目标虚拟机上运行所克隆的虚拟机副本,在执行VM操作时,所述虚拟机副本在目标物理机或者目标虚拟机中被运行的过程,与所述虚拟机副本对应的原始虚拟机或者虚拟机快照执行的VM操作完全一致,并且两者互不影响、互相独立。In the embodiment of the present application, the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine. The process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
S505,监控所述虚拟机副本的工作状态。S505. Monitor an operating status of the virtual machine copy.
S506,若监测到所述虚拟机副本工作状态异常,发出告警信息。S506. If it is detected that the working state of the virtual machine copy is abnormal, an alarm message is sent.
在本申请实施例中,所述虚拟机副本的工作状态异常包括非正常关闭、无法运行虚拟机等等。若所述虚拟机副本的工作状态异常为非正常关闭,触发告警,具体为触发目标物理机或者目标虚拟机中的蜂鸣器告警;或者,若所述虚拟机副本的工作状态异常为无法运行虚拟机,触发告警,具体为触发目标物理机或者目标虚拟机中的光源装置告警。In the embodiment of the present application, the working state abnormality of the virtual machine copy includes abnormal shutdown, failure to run a virtual machine, and the like. If the working state of the virtual machine copy is abnormally closed, an alarm is triggered, specifically triggering a buzzer alarm in the target physical machine or the target virtual machine; or if the working state of the virtual machine copy is abnormally inoperable The virtual machine triggers an alarm, specifically triggering the alarm of the light source device in the target physical machine or the target virtual machine.
请参阅图6,对应上述一种虚拟机快速扩容方法,本申请实施例还提出一种虚拟机快速扩容装置,该装置100包括:克隆单元101、同步单元102、第一复制单元103、执行单元104。Referring to FIG. 6 , corresponding to the method for quickly expanding a virtual machine, the embodiment of the present application further provides a virtual machine rapid expansion device, where the device 100 includes: a cloning unit 101, a synchronization unit 102, a first replication unit 103, and an execution unit. 104.
其中,所述克隆单元101,用于对虚拟机进行克隆,得到虚拟机副本。在本申请实施例中,一般情况下,所述克隆指的是在VMware软件中对虚拟机的原始状态进行拷贝,或者进行镜像等复制操作,所谓虚拟机中的原始状态包括虚 拟机中各应用软件、各脚本以及各应用插件等,因此,完成对虚拟机进行克隆的操作,即完成对虚拟机中的各应用软件、各脚本以及各应用插件等克隆的操作。The cloning unit 101 is configured to clone a virtual machine to obtain a virtual machine copy. In the embodiment of the present application, in general, the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring. The original state in the virtual machine includes each application in the virtual machine. The software, each script, and each application plug-in, etc., thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
需要说明的是,对虚拟机进行克隆并不会影响虚拟机本身,也就是说对虚拟机进行克隆只是进行了如拷贝、镜像的操作,并不会损坏原始虚拟机中的应用软件、脚本等软件程序,并且将克隆后得到的虚拟机称为虚拟机副本,该虚拟机副本可以脱离原始虚拟机而独立存在,该虚拟机副本具备原始虚拟机的所有应用软件、所有脚本以及所有应用插件等。It should be noted that cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged. a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
同步单元102,用于将所述虚拟机副本同步至全局存储上。在本申请实施例中,所述全局存储为跨可用区的全局存储,所谓可用区(Available Zone,AZ)指的是由多个交换机组成的区域,其中,全局存储可以是全局存储器,也可以是全局存储空间,还可以是全局云存储空间;在云环境中,有很多可用区存在,一个可用区有很多系统管理程序,其中,如果将应用部署在两个AZ上,代表这个应用的多个实例一定不是在一个交换机上;如果将应用跨AZ部署,那么一个AZ上的交换机有问题,我们就可以立即启动另外一个AZ上的应用实例,保证应用的高可用性。因此,本申请实施例采用跨可用区的全局存储,该全局存储可以被两个或者两个以上可用区共享,以便于快速将克隆的虚拟机从一个可用区到另一个可用区。The synchronization unit 102 is configured to synchronize the virtual machine copy to the global storage. In the embodiment of the present application, the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs. If the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application. Thus, embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
第一复制单元103,用于将所述虚拟机副本复制到目标物理机或者目标虚拟机上。在本申请实施例中,在VMware8.0虚拟机软件上的虚拟机副本可以视为一个vmdk文件,也就是说一个克隆的虚拟机即为一个vmdk文件,由于克隆类型中的linked clone或者full clone均具有拷贝虚拟机副本的功能,因此,对于两个AZ的全局存储,若需要将虚拟机副本复制到另一个可用区中,用户可以选择linked clone或者full clone的方法将所述虚拟机副本从一个可用区拷贝至另一个可用区中,其中,将目标拷贝的可用区作为目标物理机或者目标虚拟机。The first copy unit 103 is configured to copy the virtual machine copy to the target physical machine or the target virtual machine. In the embodiment of the present application, the virtual machine copy on the VMware 8.0 virtual machine software can be regarded as a vmdk file, that is, a cloned virtual machine is a vmdk file, because of the linked clone or full clone in the clone type. Both have the function of copying the virtual machine copy. Therefore, for the global storage of two AZs, if you need to copy the virtual machine copy to another available area, the user can select the linked clone or full clone method to copy the virtual machine from the virtual machine copy. One free area is copied to another available area, where the available area of the target copy is taken as the target physical machine or the target virtual machine.
执行单元104,用于在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。在本申请实施例中,所述VM操作指的是在目标物理机或者目标虚拟机上,执行所复制的虚拟机副本,即在目标物理机或者目标虚拟机上运行所克隆的虚拟机副本,在执行VM操作时,所述虚拟机副本在目标物理机或者目标虚拟机中被运行的过程,与所述虚拟机副本对应的原始虚拟机或者虚拟机快 照执行的VM操作完全一致,并且两者互不影响、互相独立。The executing unit 104 is configured to perform an operation of the virtual machine copy in the target physical machine or the target virtual machine. In the embodiment of the present application, the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine. The process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
由以上可见,本申请实施例通过对虚拟机进行克隆,得到虚拟机副本;将所述虚拟机副本同步至全局存储上;将所述虚拟机副本复制到目标物理机或者目标虚拟机上;在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作,实现虚拟机的快速部署,同时可以减轻运维人员的工作负担。It can be seen from the above that the embodiment of the present application obtains a virtual machine copy by cloning the virtual machine; synchronizing the virtual machine copy to the global storage; copying the virtual machine copy to the target physical machine or the target virtual machine; The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine to implement rapid deployment of the virtual machine, and the workload of the operation and maintenance personnel can be reduced.
如图7所示,所述克隆单元101,包括:As shown in FIG. 7, the cloning unit 101 includes:
打开单元1011,用于接收打开目标虚拟机的指令,并根据所接收的指令打开目标虚拟机。在本申请实施例中,用户选择一个虚拟机后,通过硬件设备打开用户所选择的虚拟机,将用户所选择的虚拟机作为目标虚拟机。The opening unit 1011 is configured to receive an instruction to open the target virtual machine, and open the target virtual machine according to the received instruction. In the embodiment of the present application, after the user selects a virtual machine, the virtual machine selected by the user is opened by the hardware device, and the virtual machine selected by the user is used as the target virtual machine.
启动单元1012,用于若检测到在预设的克隆平台上单击预设的克隆虚拟按键的操作,启动虚拟机的克隆。在本申请实施例中,所述预设的克隆平台为VMware8.0虚拟机软件,该虚拟机软件集成了功能强大的桌面虚拟计算机软件,并提供用户可在单一的桌面上同时运行该虚拟机软件,通过该虚拟机软件也可以同时运行不同的操作系统,以及针对不同操作系统进行克隆、测试、开发等操作。The startup unit 1012 is configured to start a clone of the virtual machine if the operation of clicking the preset clone virtual button on the preset clone platform is detected. In the embodiment of the present application, the preset clone platform is VMware 8.0 virtual machine software, the virtual machine software integrates powerful desktop virtual computer software, and provides a user to run the virtual machine on a single desktop at the same time. Software, through the virtual machine software can also run different operating systems at the same time, as well as cloning, testing, development and other operations for different operating systems.
在VMware8.0虚拟机软件平台上,存在预设的克隆虚拟按键,例如菜单VM、子菜单Manage、以及子菜单Clone,当用户选择了所要克隆的虚拟机作为目标虚拟机后,通过硬件设备在VMware8.0虚拟机软件平台上打开目标虚拟机,通过单击菜单的VM--Manage--Clone以启动对目标虚拟机的克隆。On the VMware 8.0 virtual machine software platform, there are preset clone virtual keys, such as menu VM, submenu Manage, and submenu Clone. When the user selects the virtual machine to be cloned as the target virtual machine, the hardware device Open the target virtual machine on the VMware 8.0 virtual machine software platform and start the cloning of the target virtual machine by clicking VM-Manage--Clone in the menu.
第一选择单元1013,用于在当前显示界面中选择目标虚拟机的克隆状态。在本申请实施例中,所述克隆状态指的是可以选择将原始虚拟机作为父本的当前状态进行克隆,也可以选择原始虚拟机的快照进行克隆,并且所述克隆状态可以在单击菜单VM--Manage--Clone之后进行选择,例如,若用户选择的虚拟机是原始虚拟机,则选择将原始虚拟机作为父本进行克隆,若用户选择的虚拟机是虚拟机快照,则选择将虚拟机快照进行克隆。The first selecting unit 1013 is configured to select a clone status of the target virtual machine in the current display interface. In the embodiment of the present application, the cloning state refers to that the original virtual machine may be selected to be cloned as the current state of the parent, or the snapshot of the original virtual machine may be selected for cloning, and the cloned state may be in the click menu. After VM--Manage--Clone is selected, for example, if the virtual machine selected by the user is the original virtual machine, then the original virtual machine is selected as the parent to be cloned. If the virtual machine selected by the user is a virtual machine snapshot, then the selection is made. The virtual machine snapshot is cloned.
第二选择单元1014,用于根据所选择的目标虚拟机的克隆状态在当前显示界面选择克隆类型。在本申请实施例中,所述克隆类型包括联系克隆或者全面克隆,其中,联系克隆指的是从父本的一个快照中进行的克隆,全面克隆指的是从父本的当前状态进行的克隆;在当前显示页面中通常会显示linked clone代表联系克隆,显示full clone代表全面克隆,在用户选择完克隆状态之后,在当 前显示界面会显示两个栏目分别为linked clone和full clone,其中,linked clone指向原始虚拟机,并且占用很多的磁盘空间,并不用脱离原始的虚拟机而独立进行克隆操作,full clone指的是完全独立的克隆,并可以分别指向原始虚拟机以及虚拟机快照,其同样会占用很多的磁盘空间,并且克隆的速度相对于linked clone要慢。The second selecting unit 1014 is configured to select a clone type on the current display interface according to the clone status of the selected target virtual machine. In the embodiment of the present application, the clone type includes a contact clone or a comprehensive clone, wherein the contact clone refers to a clone performed from a snapshot of the parent, and the full clone refers to the clone from the current state of the parent. In the current display page, the linked clone is usually displayed as a contact clone. The full clone represents a full clone. After the user selects the clone status, the current display interface displays two columns, linked clone and full clone, respectively. The clone points to the original virtual machine and takes up a lot of disk space. It does not need to be cloned independently of the original virtual machine. Full clone refers to a completely independent clone, and can point to the original virtual machine and the virtual machine snapshot respectively. Will take up a lot of disk space, and the speed of cloning is slower than linked clone.
克隆子单元1015,用于根据所选择的克隆类型对所述目标虚拟机进行克隆。在本申请实施例中,当确定所选择的克隆类型之后,VMware8.0虚拟机软件会自动进入克隆操作,该自动的克隆操作为:首先会弹出新虚拟机名页面以供用户填入所克隆的虚拟机的名称,然后确定新的虚拟机的安装位置,最后通过克隆步骤完成原始虚拟机或者虚拟机快照的克隆。The cloning subunit 1015 is configured to clone the target virtual machine according to the selected clone type. In the embodiment of the present application, after determining the selected clone type, the VMware 8.0 virtual machine software automatically enters the cloning operation, and the automatic cloning operation is: first, a new virtual machine name page is popped up for the user to fill in the cloned operation. The name of the virtual machine, then determine the installation location of the new virtual machine, and finally complete the cloning of the original virtual machine or virtual machine snapshot through the cloning step.
如图8所示,所述第一复制单元103,包括:As shown in FIG. 8, the first copying unit 103 includes:
调用单元1031,用于调用预设云环境平台的弹性伸缩接口。在本申请实施例中,若全局存储收到要求将虚拟机副本复制到目标物理机或者目标虚拟机上的指令,VMware8.0虚拟机软件会调用预设云环境平台(例如,OpenStack平台)的弹性伸缩接口,通过该弹性伸缩接口增加虚拟机或者物理机,也可以通过该弹性伸缩接口确定目标虚拟机或者目标物理机,其中,若通过该弹性伸缩接口增加虚拟机或者物理机,将所增加的虚拟机或者物理机视为目标虚拟机或者目标物理机。The calling unit 1031 is configured to invoke an elastic expansion interface of the preset cloud environment platform. In the embodiment of the present application, if the global storage receives an instruction to copy the virtual machine copy to the target physical machine or the target virtual machine, the VMware 8.0 virtual machine software invokes a preset cloud environment platform (for example, OpenStack platform). The elastic expansion interface adds a virtual machine or a physical machine through the elastic expansion interface, and the target virtual machine or the target physical machine is determined through the elastic expansion interface. If the virtual machine or the physical machine is added through the elastic expansion interface, the virtual machine or the physical machine is added. The virtual machine or physical machine is regarded as the target virtual machine or the target physical machine.
第二复制单元1032,用于通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。在本申请实施例中,若确定虚拟机副本所要复制的目标物理机或者目标虚拟机,利用linked clone或者full clone并通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。The second copy unit 1032 is configured to copy the virtual machine copy to the target physical machine or the target virtual machine by using the elastic expansion interface. In the embodiment of the present application, if the target physical machine or the target virtual machine to be copied by the virtual machine copy is determined, the virtual machine copy is copied to the target physical machine or the target virtual through the elastic expansion interface by using linked clone or full clone. on board.
请参阅图9,对应上述一种虚拟机快速扩容方法,本申请实施例还提出一种虚拟机快速扩容装置,该装置200包括:克隆单元201、同步单元202、接收单元203、第三复制单元204、发送单元205、执行单元206。Referring to FIG. 9 , a fast expansion method of a virtual machine is provided. The embodiment of the present application further provides a virtual machine rapid expansion device. The device 200 includes: a cloning unit 201, a synchronization unit 202, a receiving unit 203, and a third copy unit. 204. The transmitting unit 205 and the executing unit 206.
其中,所述克隆单元201,用于对虚拟机进行克隆,得到虚拟机副本。在本申请实施例中,一般情况下,所述克隆指的是在VMware软件中对虚拟机的原始状态进行拷贝,或者进行镜像等复制操作,所谓虚拟机中的原始状态包括虚拟机中各应用软件、各脚本以及各应用插件等,因此,完成对虚拟机进行克隆的操作,即完成对虚拟机中的各应用软件、各脚本以及各应用插件等克隆的操 作。The cloning unit 201 is configured to clone a virtual machine to obtain a virtual machine copy. In the embodiment of the present application, in general, the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring. The original state in the virtual machine includes each application in the virtual machine. The software, each script, and each application plug-in, etc., thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
需要说明的是,对虚拟机进行克隆并不会影响虚拟机本身,也就是说对虚拟机进行克隆只是进行了如拷贝、镜像的操作,并不会损坏原始虚拟机中的应用软件、脚本等软件程序,并且将克隆后得到的虚拟机称为虚拟机副本,该虚拟机副本可以脱离原始虚拟机而独立存在,该虚拟机副本具备原始虚拟机的所有应用软件、所有脚本以及所有应用插件等。It should be noted that cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged. a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
同步单元202,用于将所述虚拟机副本同步至全局存储上。在本申请实施例中,所述全局存储为跨可用区的全局存储,所谓可用区(Available Zone,AZ)指的是由多个交换机组成的区域,其中,全局存储可以是全局存储器,也可以是全局存储空间,还可以是全局云存储空间;在云环境中,有很多可用区存在,一个可用区有很多系统管理程序,其中,如果将应用部署在两个AZ上,代表这个应用的多个实例一定不是在一个交换机上;如果将应用跨AZ部署,那么一个AZ上的交换机有问题,我们就可以立即启动另外一个AZ上的应用实例,保证应用的高可用性。因此,本申请实施例采用跨可用区的全局存储,该全局存储可以被两个或者两个以上可用区共享,以便于快速将克隆的虚拟机从一个可用区到另一个可用区。The synchronization unit 202 is configured to synchronize the virtual machine copy to the global storage. In the embodiment of the present application, the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs. If the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application. Thus, embodiments of the present application employ global storage across Availability Zones that can be shared by two or more Availability Zones to facilitate rapid cloning of virtual machines from one Availability Zone to another Availability Zone.
接收单元203,用于接收目标物理机或者目标虚拟机发送的复制请求。在本申请实施例中,客户预先确定所要复制的所述目标物理机或者目标虚拟机,并将目标虚拟机或者目标物理机将与所述全局存储进行关联,若所述目标物理机或者目标虚拟机需要获取虚拟机副本进行运行,所述目标物理机或者目标虚拟机可以通过所述全局存储与所述目标虚拟机或者目标物理机的关联关系将复制请求发送给所述全局存储以要求获得虚拟机副本。The receiving unit 203 is configured to receive a copy request sent by the target physical machine or the target virtual machine. In the embodiment of the present application, the client predetermines the target physical machine or the target virtual machine to be copied, and associates the target virtual machine or the target physical machine with the global storage, if the target physical machine or the target virtual The machine needs to obtain a copy of the virtual machine for running, and the target physical machine or the target virtual machine may send a copy request to the global storage by using the global storage association relationship with the target virtual machine or the target physical machine to request virtual Machine copy.
第三复制单元204,用于根据所述复制请求在所述全局存储上对所述虚拟机副本进行复制。在本申请实施例中,若接收到目标物理机或者目标虚拟机发送的复制请求,所述全局存储便会接收到与所述复制请求相对应的复制指令,该复制指令也复制请求相对应并从目标物理机或者目标虚拟机获得,所述全局存储根据该复制指令对全局存储上的虚拟机副本进行复制。The third copy unit 204 is configured to copy the virtual machine copy on the global storage according to the copy request. In the embodiment of the present application, if a copy request sent by the target physical machine or the target virtual machine is received, the global storage receives a copy instruction corresponding to the copy request, and the copy instruction also corresponds to the copy request. Obtained from a target physical machine or a target virtual machine that replicates a virtual machine copy on the global storage according to the copy instruction.
发送单元205,用于将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。在本申请实施例中,根据该复制指令对全局存储上的虚拟机副本进行复制后,得到与所述虚拟机副本完全相同的另一虚拟机副本,并将复制后的虚拟 机副本发送至目标物理机或者目标虚拟机上。The sending unit 205 is configured to send the copied virtual machine copy to the target physical machine or the target virtual machine. In this embodiment, after copying the virtual machine copy on the global storage according to the copy instruction, another virtual machine copy identical to the virtual machine copy is obtained, and the copied virtual machine copy is sent to the target. Physical machine or target virtual machine.
执行单元206,用于在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。在本申请实施例中,所述VM操作指的是在目标物理机或者目标虚拟机上,执行所复制的虚拟机副本,即在目标物理机或者目标虚拟机上运行所克隆的虚拟机副本,在执行VM操作时,所述虚拟机副本在目标物理机或者目标虚拟机中被运行的过程,与所述虚拟机副本对应的原始虚拟机或者虚拟机快照执行的VM操作完全一致,并且两者互不影响、互相独立。The executing unit 206 is configured to perform an operation of the virtual machine copy in the target physical machine or the target virtual machine. In the embodiment of the present application, the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine. The process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
请参阅图10,对应上述一种虚拟机快速扩容方法,本申请实施例还提出一种虚拟机快速扩容装置,该装置300包括:克隆单元301、同步单元302、第一复制单元303、执行单元304、监控单元305、告警单元306。Referring to FIG. 10, in conjunction with the above method for rapidly expanding a virtual machine, the embodiment of the present application further provides a virtual machine rapid expansion device, which includes: a cloning unit 301, a synchronization unit 302, a first replication unit 303, and an execution unit. 304, monitoring unit 305, alarm unit 306.
其中,所述克隆单元301,用于对虚拟机进行克隆,得到虚拟机副本。在本申请实施例中,一般情况下,所述克隆指的是在VMware软件中对虚拟机的原始状态进行拷贝,或者进行镜像等复制操作,所谓虚拟机中的原始状态包括虚拟机中各应用软件、各脚本以及各应用插件等,因此,完成对虚拟机进行克隆的操作,即完成对虚拟机中的各应用软件、各脚本以及各应用插件等克隆的操作。The cloning unit 301 is configured to clone a virtual machine to obtain a virtual machine copy. In the embodiment of the present application, in general, the cloning refers to copying the original state of the virtual machine in the VMware software, or performing a copy operation such as mirroring. The original state in the virtual machine includes each application in the virtual machine. The software, each script, and each application plug-in, etc., thus complete the operation of cloning the virtual machine, that is, completing the operation of cloning each application software, each script, and each application plug-in in the virtual machine.
需要说明的是,对虚拟机进行克隆并不会影响虚拟机本身,也就是说对虚拟机进行克隆只是进行了如拷贝、镜像的操作,并不会损坏原始虚拟机中的应用软件、脚本等软件程序,并且将克隆后得到的虚拟机称为虚拟机副本,该虚拟机副本可以脱离原始虚拟机而独立存在,该虚拟机副本具备原始虚拟机的所有应用软件、所有脚本以及所有应用插件等。It should be noted that cloning a virtual machine does not affect the virtual machine itself. That is to say, the virtual machine is cloned only for copying and mirroring, and the application software, scripts, etc. in the original virtual machine are not damaged. a software program, and the virtual machine obtained after the clone is called a virtual machine copy, the virtual machine copy can exist independently from the original virtual machine, the virtual machine copy has all the application software of the original virtual machine, all scripts, and all application plug-ins, etc. .
同步单元302,用于将所述虚拟机副本同步至全局存储上。在本申请实施例中,所述全局存储为跨可用区的全局存储,所谓可用区(Available Zone,AZ)指的是由多个交换机组成的区域,其中,全局存储可以是全局存储器,也可以是全局存储空间,还可以是全局云存储空间;在云环境中,有很多可用区存在,一个可用区有很多系统管理程序,其中,如果将应用部署在两个AZ上,代表这个应用的多个实例一定不是在一个交换机上;如果将应用跨AZ部署,那么一个AZ上的交换机有问题,我们就可以立即启动另外一个AZ上的应用实例,保证应用的高可用性。因此,本申请实施例采用跨可用区的全局存储,该全局存储可以被两个或者两个以上可用区共享,以便于快速将克隆的虚拟机从一个可用 区到另一个可用区。The synchronization unit 302 is configured to synchronize the virtual machine copy to the global storage. In the embodiment of the present application, the global storage is a global storage across the available area, and the available area (AZ) refers to an area composed of multiple switches, where the global storage may be a global storage, or It is a global storage space, or it can be a global cloud storage space; in a cloud environment, there are many available areas, and an available area has many system management programs. If the application is deployed on two AZs, it represents many applications. The instance must not be on a switch; if the application is deployed across AZ, then there is a problem with the switch on one AZ, and we can immediately start another application instance on the AZ to ensure high availability of the application. Thus, embodiments of the present application employ global storage across the Availability Zone, which can be shared by two or more Availability Zones to facilitate rapid migration of cloned virtual machines from one Availability Zone to another Availability Zone.
第一复制单元303,用于将所述虚拟机副本复制到目标物理机或者目标虚拟机上。在本申请实施例中,在VMware8.0虚拟机软件上的虚拟机副本可以视为一个vmdk文件,也就是说一个克隆的虚拟机即为一个vmdk文件,由于克隆类型中的linked clone或者full clone均具有拷贝虚拟机副本的功能,因此,对于两个AZ的全局存储,若需要将虚拟机副本复制到另一个可用区中,用户可以选择linked clone或者full clone的方法将所述虚拟机副本从一个可用区拷贝至另一个可用区中,其中,将目标拷贝的可用区作为目标物理机或者目标虚拟机。The first copy unit 303 is configured to copy the virtual machine copy to the target physical machine or the target virtual machine. In the embodiment of the present application, the virtual machine copy on the VMware 8.0 virtual machine software can be regarded as a vmdk file, that is, a cloned virtual machine is a vmdk file, because of the linked clone or full clone in the clone type. Both have the function of copying the virtual machine copy. Therefore, for the global storage of two AZs, if you need to copy the virtual machine copy to another available area, the user can select the linked clone or full clone method to copy the virtual machine from the virtual machine copy. One free area is copied to another available area, where the available area of the target copy is taken as the target physical machine or the target virtual machine.
执行单元304,用于在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。在本申请实施例中,所述VM操作指的是在目标物理机或者目标虚拟机上,执行所复制的虚拟机副本,即在目标物理机或者目标虚拟机上运行所克隆的虚拟机副本,在执行VM操作时,所述虚拟机副本在目标物理机或者目标虚拟机中被运行的过程,与所述虚拟机副本对应的原始虚拟机或者虚拟机快照执行的VM操作完全一致,并且两者互不影响、互相独立。The executing unit 304 is configured to perform an operation of the virtual machine copy in the target physical machine or the target virtual machine. In the embodiment of the present application, the VM operation refers to executing a copy of the copied virtual machine on the target physical machine or the target virtual machine, that is, running the cloned virtual machine copy on the target physical machine or the target virtual machine. The process of executing the VM operation in the target physical machine or the target virtual machine is exactly the same as the VM operation performed by the original virtual machine or virtual machine snapshot corresponding to the virtual machine copy, and both They do not affect each other and are independent of each other.
监控单元305,用于监控所述虚拟机副本的工作状态。The monitoring unit 305 is configured to monitor an working state of the virtual machine copy.
告警单元306,用于若监测到所述虚拟机副本工作状态异常,发出告警信息。在本申请实施例中,所述虚拟机副本的工作状态异常包括非正常关闭、无法运行虚拟机等等。若所述虚拟机副本的工作状态异常为非正常关闭,触发告警,具体为触发目标物理机或者目标虚拟机中的蜂鸣器告警;或者,若所述虚拟机副本的工作状态异常为无法运行虚拟机,触发告警,具体为触发目标物理机或者目标虚拟机中的光源装置告警。The alarm unit 306 is configured to send an alarm message if the working status of the virtual machine copy is abnormal. In the embodiment of the present application, the working state abnormality of the virtual machine copy includes abnormal shutdown, failure to run a virtual machine, and the like. If the working state of the virtual machine copy is abnormally closed, an alarm is triggered, specifically triggering a buzzer alarm in the target physical machine or the target virtual machine; or if the working state of the virtual machine copy is abnormally inoperable The virtual machine triggers an alarm, specifically triggering the alarm of the light source device in the target physical machine or the target virtual machine.
在硬件实现上,以上克隆单元101、同步单元102、第一复制单元103、执行单元104等可以以硬件形式内嵌于或独立于数据处理的装置中,也可以以软件形式存储于数据处理装置的存储器中,以便处理器调用执行以上各个单元对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。In hardware implementation, the above cloning unit 101, the synchronization unit 102, the first copy unit 103, the execution unit 104, and the like may be embedded in or independent of the data processing device in hardware, or may be stored in the data processing device in software. In the memory, so that the processor calls to perform the operations corresponding to the above units. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
上述虚拟机快速扩容装置可以实现为一种计算机程序的形式,计算机程序可以在如图11所示的计算机设备上运行。The above virtual machine rapid expansion device can be implemented in the form of a computer program that can be run on a computer device as shown in FIG.
图11为本申请一种虚拟机快速扩容设备的结构组成示意图。该设备可以是终端,也可以是服务器,其中,终端可以是智能手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式装置等具有通信功能的电子装置。服务器可 以是独立的服务器,也可以是多个服务器组成的服务器集群。参照图11,该计算机设备500包括通过系统总线501连接的处理器502、非易失性存储介质503、内存储器504和网络接口505。其中,该计算机设备500的非易失性存储介质503可存储操作系统5031和计算机程序5032,该计算机程序5032被执行时,可使得处理器502执行一种虚拟机快速扩容方法。该计算机设备500的处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序被处理器执行时,可使得处理器502执行一种虚拟机快速扩容方法。计算机设备500的网络接口505用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图11中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。FIG. 11 is a schematic structural diagram of a virtual machine rapid expansion device according to the present application. The device may be a terminal or a server, wherein the terminal may be a communication device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be a stand-alone server or a server cluster of multiple servers. Referring to FIG. 11, the computer device 500 includes a processor 502, a non-volatile storage medium 503, an internal memory 504, and a network interface 505 connected by a system bus 501. The non-volatile storage medium 503 of the computer device 500 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can be caused to execute a virtual machine rapid expansion method. The processor 502 of the computer device 500 is used to provide computing and control capabilities to support the operation of the entire computer device 500. The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, which when executed by the processor, causes the processor 502 to perform a virtual machine rapid expansion method. The network interface 505 of the computer device 500 is used to perform network communications, such as sending assigned tasks and the like. It will be understood by those skilled in the art that the structure shown in FIG. 11 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied. The specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
其中,所述处理器502执行如下操作:The processor 502 performs the following operations:
对虚拟机进行克隆,得到虚拟机副本;Clone the virtual machine to get a copy of the virtual machine;
将所述虚拟机副本同步至全局存储上;Synchronizing the virtual machine copy to the global storage;
将所述虚拟机副本复制到目标物理机或者目标虚拟机上;Copying the virtual machine copy to the target physical machine or the target virtual machine;
在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
在一个实施例中,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:In one embodiment, the copying the virtual machine copy to the target physical machine or the target virtual machine includes:
接收目标物理机或者目标虚拟机发送的复制请求;Receiving a copy request sent by the target physical machine or the target virtual machine;
根据所述复制请求在所述全局存储上对所述虚拟机副本进行复制;Copying the virtual machine copy on the global storage according to the copy request;
将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。Send the copied copy of the virtual machine to the target physical machine or target virtual machine.
在一个实施例中,所述对虚拟机进行克隆,包括:In one embodiment, the cloning the virtual machine includes:
接收打开目标虚拟机的指令,并根据所接收的指令打开目标虚拟机;Receiving an instruction to open the target virtual machine, and opening the target virtual machine according to the received instruction;
若检测到在预设的克隆平台上单击预设的克隆虚拟按键的操作,启动虚拟机的克隆;If the operation of clicking the preset clone virtual button on the preset clone platform is detected, the clone of the virtual machine is started;
在当前显示界面中选择目标虚拟机的克隆状态;Select the clone status of the target virtual machine in the current display interface;
根据所选择的目标虚拟机的克隆状态在当前显示界面选择克隆类型;Selecting a clone type on the current display interface according to the clone status of the selected target virtual machine;
根据所选择的克隆类型对所述目标虚拟机进行克隆。The target virtual machine is cloned according to the selected clone type.
在一个实施例中,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:In one embodiment, the copying the virtual machine copy to the target physical machine or the target virtual machine includes:
调用预设云环境平台的弹性伸缩接口;Calling the elastic expansion interface of the preset cloud environment platform;
通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。Copying the virtual machine copy to the target physical machine or the target virtual machine through the elastic expansion interface.
所述处理器502还执行如下操作:The processor 502 also performs the following operations:
监控所述虚拟机副本的工作状态;Monitoring the working state of the virtual machine copy;
若监测到所述虚拟机副本工作状态异常,发出告警信息。If the working status of the virtual machine copy is abnormal, an alarm message is sent.
本领域技术人员可以理解,图11中示出的虚拟机快速扩容设备的实施例并不构成对虚拟机快速扩容设备具体构成的限定,在其他实施例中,虚拟机快速扩容设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,虚拟机快速扩容设备以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图11所示实施例一致,在此不再赘述。A person skilled in the art can understand that the embodiment of the virtual machine rapid expansion device shown in FIG. 11 does not constitute a limitation on the specific configuration of the virtual machine rapid expansion device. In other embodiments, the virtual machine rapid expansion device may include a comparison diagram. Show more or fewer parts, or combine some parts, or different parts. For example, in some embodiments, the virtual machine rapidly expands the device to include only the memory and the processor. In such an embodiment, the structure and function of the memory and the processor are the same as those in the embodiment shown in FIG. .
本申请提供了一种计算机可读存储介质,计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现以下步骤:The application provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
对虚拟机进行克隆,得到虚拟机副本;Clone the virtual machine to get a copy of the virtual machine;
将所述虚拟机副本同步至全局存储上;Synchronizing the virtual machine copy to the global storage;
将所述虚拟机副本复制到目标物理机或者目标虚拟机上;Copying the virtual machine copy to the target physical machine or the target virtual machine;
在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
在一个实施例中,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:In one embodiment, the copying the virtual machine copy to the target physical machine or the target virtual machine includes:
接收目标物理机或者目标虚拟机发送的复制请求;Receiving a copy request sent by the target physical machine or the target virtual machine;
根据所述复制请求在所述全局存储上对所述虚拟机副本进行复制;Copying the virtual machine copy on the global storage according to the copy request;
将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。Send the copied copy of the virtual machine to the target physical machine or target virtual machine.
在一个实施例中,所述对虚拟机进行克隆,包括:In one embodiment, the cloning the virtual machine includes:
接收打开目标虚拟机的指令,并根据所接收的指令打开目标虚拟机;Receiving an instruction to open the target virtual machine, and opening the target virtual machine according to the received instruction;
若检测到在预设的克隆平台上单击预设的克隆虚拟按键的操作,启动虚拟机的克隆;If the operation of clicking the preset clone virtual button on the preset clone platform is detected, the clone of the virtual machine is started;
在当前显示界面中选择目标虚拟机的克隆状态;Select the clone status of the target virtual machine in the current display interface;
根据所选择的目标虚拟机的克隆状态在当前显示界面选择克隆类型;Selecting a clone type on the current display interface according to the clone status of the selected target virtual machine;
根据所选择的克隆类型对所述目标虚拟机进行克隆。The target virtual machine is cloned according to the selected clone type.
在一个实施例中,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:In one embodiment, the copying the virtual machine copy to the target physical machine or the target virtual machine includes:
调用预设云环境平台的弹性伸缩接口;Calling the elastic expansion interface of the preset cloud environment platform;
通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。Copying the virtual machine copy to the target physical machine or the target virtual machine through the elastic expansion interface.
在一个实施例中,还实现以下步骤:In one embodiment, the following steps are also implemented:
监控所述虚拟机副本的工作状态;Monitoring the working state of the virtual machine copy;
若监测到所述虚拟机副本工作状态异常,发出告警信息。If the working status of the virtual machine copy is abnormal, an alarm message is sent.
本申请前述的存储介质包括:磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等各种可以存储程序代码的介质。The foregoing storage medium of the present application includes: a magnetic disk, an optical disk, a read-only memory (ROM), and the like, which can store various program codes.
本申请所有实施例中的单元可以通过通用集成电路,例如CPU(Central Processing Unit,中央处理器),或通过ASIC(Application Specific Integrated Circuit,专用集成电路)来实现。The units in all the embodiments of the present application may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
本申请实施例虚拟机快速扩容方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method for rapidly expanding a virtual machine in the embodiment of the present application may be sequentially adjusted, merged, and deleted according to actual needs.
本申请实施例虚拟机快速扩容装置中的单元可以根据实际需要进行合并、划分和删减。The units in the virtual machine rapid expansion device of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any equivalents can be easily conceived by those skilled in the art within the technical scope disclosed in the present application. Modifications or substitutions are intended to be included within the scope of the present application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.

Claims (20)

  1. 一种虚拟机快速扩容方法,其特征在于,所述方法包括:A method for rapidly expanding a virtual machine, the method comprising:
    对虚拟机进行克隆,得到虚拟机副本;Clone the virtual machine to get a copy of the virtual machine;
    将所述虚拟机副本同步至全局存储上;Synchronizing the virtual machine copy to the global storage;
    将所述虚拟机副本复制到目标物理机或者目标虚拟机上;Copying the virtual machine copy to the target physical machine or the target virtual machine;
    在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
  2. 如权利要求1所述的方法,其特征在于,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:The method of claim 1, wherein the copying the virtual machine copy to a target physical machine or a target virtual machine comprises:
    接收目标物理机或者目标虚拟机发送的复制请求;Receiving a copy request sent by the target physical machine or the target virtual machine;
    根据所述复制请求在所述全局存储上对所述虚拟机副本进行复制;Copying the virtual machine copy on the global storage according to the copy request;
    将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。Send the copied copy of the virtual machine to the target physical machine or target virtual machine.
  3. 如权利要求1所述的方法,其特征在于,所述对虚拟机进行克隆,包括:The method of claim 1 wherein said cloning the virtual machine comprises:
    接收打开目标虚拟机的指令,并根据所接收的指令打开目标虚拟机;Receiving an instruction to open the target virtual machine, and opening the target virtual machine according to the received instruction;
    若检测到在预设的克隆平台上单击预设的克隆虚拟按键的操作,启动虚拟机的克隆;If the operation of clicking the preset clone virtual button on the preset clone platform is detected, the clone of the virtual machine is started;
    在当前显示界面中选择目标虚拟机的克隆状态;Select the clone status of the target virtual machine in the current display interface;
    根据所选择的目标虚拟机的克隆状态在当前显示界面选择克隆类型;Selecting a clone type on the current display interface according to the clone status of the selected target virtual machine;
    根据所选择的克隆类型对所述目标虚拟机进行克隆。The target virtual machine is cloned according to the selected clone type.
  4. 如权利要求1所述的方法,其特征在于,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:The method of claim 1, wherein the copying the virtual machine copy to a target physical machine or a target virtual machine comprises:
    调用预设云环境平台的弹性伸缩接口;Calling the elastic expansion interface of the preset cloud environment platform;
    通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。Copying the virtual machine copy to the target physical machine or the target virtual machine through the elastic expansion interface.
  5. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 wherein the method further comprises:
    监控所述虚拟机副本的工作状态;Monitoring the working state of the virtual machine copy;
    若监测到所述虚拟机副本工作状态异常,发出告警信息。If the working status of the virtual machine copy is abnormal, an alarm message is sent.
  6. 一种虚拟机快速扩容装置,其特征在于,所述装置包括:A virtual machine rapid expansion device, characterized in that the device comprises:
    克隆单元,用于对虚拟机进行克隆,得到虚拟机副本;a cloning unit for cloning a virtual machine to obtain a virtual machine copy;
    同步单元,用于将所述虚拟机副本同步至全局存储上;a synchronization unit, configured to synchronize the virtual machine copy to the global storage;
    第一复制单元,用于将所述虚拟机副本复制到目标物理机或者目标虚拟机上;a first copy unit, configured to copy the virtual machine copy to a target physical machine or a target virtual machine;
    执行单元,用于在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。An execution unit, configured to perform an operation of the virtual machine copy in the target physical machine or a target virtual machine.
  7. 如权利要求6所述的装置,其特征在于,所述第一复制单元,包括:The apparatus of claim 6, wherein the first copying unit comprises:
    接收单元,用于接收目标物理机或者目标虚拟机发送的复制请求;a receiving unit, configured to receive a copy request sent by the target physical machine or the target virtual machine;
    第三复制单元,用于根据所述复制请求在所述全局存储上对所述虚拟机副本进行复制;a third copy unit, configured to copy the virtual machine copy on the global storage according to the copy request;
    发送单元,用于将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。A sending unit, configured to send the copied virtual machine copy to the target physical machine or the target virtual machine.
  8. 如权利要求6所述的装置,其特征在于,所述克隆单元,包括:The apparatus according to claim 6, wherein said cloning unit comprises:
    打开单元,用于接收打开目标虚拟机的指令,并根据所接收的指令打开目标虚拟机;Opening a unit, configured to receive an instruction to open the target virtual machine, and open the target virtual machine according to the received instruction;
    启动单元,用于若检测到在预设的克隆平台上单击预设的克隆虚拟按键的操作,启动虚拟机的克隆;The startup unit is configured to start a clone of the virtual machine if the operation of clicking the preset clone virtual button on the preset clone platform is detected;
    第一选择单元,用于在当前显示界面中选择目标虚拟机的克隆状态;a first selection unit, configured to select a clone status of the target virtual machine in the current display interface;
    第二选择单元,用于根据所选择的目标虚拟机的克隆状态在当前显示界面选择克隆类型;a second selecting unit, configured to select a clone type on the current display interface according to the cloning state of the selected target virtual machine;
    克隆子单元,用于根据所选择的克隆类型对所述目标虚拟机进行克隆。Cloning a subunit for cloning the target virtual machine according to the selected clone type.
  9. 如权利要求6所述的装置,其特征在于,所述第一复制单元,包括:The apparatus of claim 6, wherein the first copying unit comprises:
    调用单元,用于调用预设云环境平台的弹性伸缩接口。The calling unit is used to invoke the elastic expansion interface of the preset cloud environment platform.
    第二复制单元,用于通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。And a second copy unit, configured to copy the virtual machine copy to the target physical machine or the target virtual machine by using the elastic expansion interface.
  10. 如权利要求6所述的装置,其特征在于,所述装置还包括:The device of claim 6 wherein said device further comprises:
    监控单元,用于监控所述虚拟机副本的工作状态。A monitoring unit is configured to monitor an operating status of the virtual machine copy.
    告警单元,用于若监测到所述虚拟机副本工作状态异常,发出告警信息。The alarm unit is configured to send an alarm message if the working status of the virtual machine copy is abnormal.
  11. 一种虚拟机快速扩容设备,其特征在于,包括:A virtual machine rapid expansion device, comprising:
    存储器,用于存储实现虚拟机快速扩容方法的程序;以及a memory for storing a program for implementing a virtual machine rapid expansion method;
    处理器,用于运行所述存储器中存储的实现虚拟机快速扩容方法的程序,以执行以下操作:And a processor, configured to run a program for implementing a virtual machine fast expansion method stored in the memory, to perform the following operations:
    对虚拟机进行克隆,得到虚拟机副本;Clone the virtual machine to get a copy of the virtual machine;
    将所述虚拟机副本同步至全局存储上;Synchronizing the virtual machine copy to the global storage;
    将所述虚拟机副本复制到目标物理机或者目标虚拟机上;Copying the virtual machine copy to the target physical machine or the target virtual machine;
    在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
  12. 如权利要求11所述的设备,其特征在于,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:The device according to claim 11, wherein the copying the virtual machine copy to the target physical machine or the target virtual machine comprises:
    接收目标物理机或者目标虚拟机发送的复制请求;Receiving a copy request sent by the target physical machine or the target virtual machine;
    根据所述复制请求在所述全局存储上对所述虚拟机副本进行复制;Copying the virtual machine copy on the global storage according to the copy request;
    将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。Send the copied copy of the virtual machine to the target physical machine or target virtual machine.
  13. 如权利要求11所述的设备,其特征在于,所述对虚拟机进行克隆,包括:The device of claim 11, wherein the cloning the virtual machine comprises:
    接收打开目标虚拟机的指令,并根据所接收的指令打开目标虚拟机;Receiving an instruction to open the target virtual machine, and opening the target virtual machine according to the received instruction;
    若检测到在预设的克隆平台上单击预设的克隆虚拟按键的操作,启动虚拟机的克隆;If the operation of clicking the preset clone virtual button on the preset clone platform is detected, the clone of the virtual machine is started;
    在当前显示界面中选择目标虚拟机的克隆状态;Select the clone status of the target virtual machine in the current display interface;
    根据所选择的目标虚拟机的克隆状态在当前显示界面选择克隆类型;Selecting a clone type on the current display interface according to the clone status of the selected target virtual machine;
    根据所选择的克隆类型对所述目标虚拟机进行克隆。The target virtual machine is cloned according to the selected clone type.
  14. 如权利要求11所述的设备,其特征在于,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:The device according to claim 11, wherein the copying the virtual machine copy to the target physical machine or the target virtual machine comprises:
    调用预设云环境平台的弹性伸缩接口;Calling the elastic expansion interface of the preset cloud environment platform;
    通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。Copying the virtual machine copy to the target physical machine or the target virtual machine through the elastic expansion interface.
  15. 如权利要求11所述的设备,其特征在于,所述处理器还执行以下操作:The device of claim 11 wherein said processor further performs the following operations:
    监控所述虚拟机副本的工作状态;Monitoring the working state of the virtual machine copy;
    若监测到所述虚拟机副本工作状态异常,发出告警信息。If the working status of the virtual machine copy is abnormal, an alarm message is sent.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现以下步骤:A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
    对虚拟机进行克隆,得到虚拟机副本;Clone the virtual machine to get a copy of the virtual machine;
    将所述虚拟机副本同步至全局存储上;Synchronizing the virtual machine copy to the global storage;
    将所述虚拟机副本复制到目标物理机或者目标虚拟机上;Copying the virtual machine copy to the target physical machine or the target virtual machine;
    在所述目标物理机或者目标虚拟机中执行所述虚拟机副本的操作。The operation of the virtual machine copy is performed in the target physical machine or the target virtual machine.
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:The computer readable storage medium of claim 16, wherein the copying the virtual machine copy to a target physical machine or a target virtual machine comprises:
    接收目标物理机或者目标虚拟机发送的复制请求;Receiving a copy request sent by the target physical machine or the target virtual machine;
    根据所述复制请求在所述全局存储上对所述虚拟机副本进行复制;Copying the virtual machine copy on the global storage according to the copy request;
    将复制后的虚拟机副本发送至目标物理机或者目标虚拟机上。Send the copied copy of the virtual machine to the target physical machine or target virtual machine.
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,所述对虚拟机进行克隆,包括:The computer readable storage medium of claim 16, wherein the cloning the virtual machine comprises:
    接收打开目标虚拟机的指令,并根据所接收的指令打开目标虚拟机;Receiving an instruction to open the target virtual machine, and opening the target virtual machine according to the received instruction;
    若检测到在预设的克隆平台上单击预设的克隆虚拟按键的操作,启动虚拟机的克隆;If the operation of clicking the preset clone virtual button on the preset clone platform is detected, the clone of the virtual machine is started;
    在当前显示界面中选择目标虚拟机的克隆状态;Select the clone status of the target virtual machine in the current display interface;
    根据所选择的目标虚拟机的克隆状态在当前显示界面选择克隆类型;Selecting a clone type on the current display interface according to the clone status of the selected target virtual machine;
    根据所选择的克隆类型对所述目标虚拟机进行克隆。The target virtual machine is cloned according to the selected clone type.
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,所述将所述虚拟机副本复制到目标物理机或者目标虚拟机上,包括:The computer readable storage medium of claim 16, wherein the copying the virtual machine copy to a target physical machine or a target virtual machine comprises:
    调用预设云环境平台的弹性伸缩接口;Calling the elastic expansion interface of the preset cloud environment platform;
    通过所述弹性伸缩接口将所述虚拟机副本复制到目标物理机或者目标虚拟机上。Copying the virtual machine copy to the target physical machine or the target virtual machine through the elastic expansion interface.
  20. 如权利要求16所述的计算机可读存储介质,其特征在于,所述步骤还包括:The computer readable storage medium of claim 16 wherein said step further comprises:
    监控所述虚拟机副本的工作状态;Monitoring the working state of the virtual machine copy;
    若监测到所述虚拟机副本工作状态异常,发出告警信息。If the working status of the virtual machine copy is abnormal, an alarm message is sent.
PCT/CN2018/075049 2017-11-23 2018-02-02 Virtual machine rapid capacity expansion method, apparatus and device, and storage medium WO2019100589A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711184378.1A CN107908460A (en) 2017-11-23 2017-11-23 Virtual machine rapid volume-expanding method, device, equipment and storage medium
CN201711184378.1 2017-11-23

Publications (1)

Publication Number Publication Date
WO2019100589A1 true WO2019100589A1 (en) 2019-05-31

Family

ID=61847682

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/075049 WO2019100589A1 (en) 2017-11-23 2018-02-02 Virtual machine rapid capacity expansion method, apparatus and device, and storage medium

Country Status (2)

Country Link
CN (1) CN107908460A (en)
WO (1) WO2019100589A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111435299B (en) * 2019-01-14 2023-06-20 阿里巴巴集团控股有限公司 Application processing method and device
CN111435302B (en) * 2019-01-14 2023-06-20 阿里巴巴集团控股有限公司 Application processing method and device
CN110290172B (en) * 2019-05-17 2022-02-11 平安科技(深圳)有限公司 Container application cloning method and device, computer equipment and storage medium
CN110262876A (en) * 2019-06-28 2019-09-20 浪潮电子信息产业股份有限公司 A kind of virtual machine method for reconstructing, device, equipment and readable storage medium storing program for executing
CN113672333B (en) * 2020-05-15 2024-04-05 顺丰科技有限公司 Virtual machine hot cloning method, device, system, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268252A (en) * 2013-05-12 2013-08-28 南京载玄信息科技有限公司 Virtualization platform system based on distributed storage and achieving method thereof
WO2015138704A1 (en) * 2014-03-12 2015-09-17 Nutanix, Inc. Method and system for implementing virtual machine images
CN105653348A (en) * 2015-12-30 2016-06-08 深圳市创想天空科技股份有限公司 Virtual machine clone method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104407916A (en) * 2014-12-15 2015-03-11 北京国双科技有限公司 Cloning method and device of virtual machine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268252A (en) * 2013-05-12 2013-08-28 南京载玄信息科技有限公司 Virtualization platform system based on distributed storage and achieving method thereof
WO2015138704A1 (en) * 2014-03-12 2015-09-17 Nutanix, Inc. Method and system for implementing virtual machine images
CN105653348A (en) * 2015-12-30 2016-06-08 深圳市创想天空科技股份有限公司 Virtual machine clone method and system

Also Published As

Publication number Publication date
CN107908460A (en) 2018-04-13

Similar Documents

Publication Publication Date Title
WO2019100589A1 (en) Virtual machine rapid capacity expansion method, apparatus and device, and storage medium
US10114834B2 (en) Exogenous virtual machine synchronization and replication
JP5032191B2 (en) Cluster system configuration method and cluster system in server virtualization environment
US10740197B2 (en) Quick recovery method, device and system of a virtual machine
US20130091376A1 (en) Self-repairing database system
CN105468717B (en) Database operation method and device
EP3550436A1 (en) Method and apparatus for detecting and recovering fault of virtual machine
CN111669284B (en) OpenStack automatic deployment method, electronic device, storage medium and system
AU2014256371A1 (en) Systems And Methods For Protecting Virtualized Assets
US9329953B2 (en) Reducing application downtime during failover
CN110795278B (en) System and method for providing file-level recovery
CN110574006B (en) System and method for automatically synchronizing responses and conditions on a device
CN114328097A (en) File monitoring method and device, electronic equipment and storage medium
US10642713B1 (en) Object-based monitoring and remediation system
CN109257235B (en) Network anomaly recovery method, device, equipment and computer readable storage medium
WO2023184875A1 (en) Bare metal disk backup method and device, and computer-readable storage medium
US11875175B2 (en) Providing physical host hardware state information to virtual machines deployed on the physical host
US11327824B2 (en) Using a web server to obtain service data for a failed software application
US9836315B1 (en) De-referenced package execution
JP5598089B2 (en) Program, information processing apparatus and information processing method
CN112035295A (en) Virtual machine crash event processing method, system, terminal and storage medium
CN107783855B (en) Fault self-healing control device and method for virtual network element
CN112751693A (en) Data processing method and device of distributed storage system and electronic equipment
CN117395263B (en) Data synchronization method, device, equipment and storage medium
CN116860515A (en) Virtual machine backup method, computing device and computer storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18882220

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 05.10.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18882220

Country of ref document: EP

Kind code of ref document: A1