[go: up one dir, main page]

CN113590272A - Virtual machine deployment method, device, electronic device and storage medium - Google Patents

Virtual machine deployment method, device, electronic device and storage medium Download PDF

Info

Publication number
CN113590272A
CN113590272A CN202111157302.6A CN202111157302A CN113590272A CN 113590272 A CN113590272 A CN 113590272A CN 202111157302 A CN202111157302 A CN 202111157302A CN 113590272 A CN113590272 A CN 113590272A
Authority
CN
China
Prior art keywords
virtual machine
server
target
target virtual
control end
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111157302.6A
Other languages
Chinese (zh)
Inventor
贾坤
魏军
蒋国纬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Sitong Information Service Co ltd
Original Assignee
Wuhan Sitong Information Service Co ltd
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 Wuhan Sitong Information Service Co ltd filed Critical Wuhan Sitong Information Service Co ltd
Priority to CN202111157302.6A priority Critical patent/CN113590272A/en
Publication of CN113590272A publication Critical patent/CN113590272A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a virtual machine deployment method, a virtual machine deployment device, electronic equipment and a storage medium, wherein the method comprises the steps of responding to a virtual machine deployment instruction, determining a target virtual machine template which can be used for a virtualization system in a control terminal in a first server, then obtaining the target virtual machine template, creating a target virtual machine in the virtualization system according to the target virtual machine template, and finally calling a target API (application program interface) of the virtualization system based on configuration information of the control terminal to complete configuration of the target virtual machine.

Description

Virtual machine deployment method, device, electronic device and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for deploying a virtual machine, an electronic device, and a storage medium.
Background
A Virtual Machine (Virtual Machine) refers to a complete computer system with complete hardware system functionality, operating in a completely isolated environment, simulated by software. In the field of virtual machine deployment, it is common to deploy by manual: users search resources in a network environment and deploy virtual machines to implement various services.
However, the resources that can be selected by the user are limited due to the device configuration used by the user, and the efficiency is low by manual deployment.
Disclosure of Invention
The embodiment of the invention aims to provide a virtual machine deployment method, a virtual machine deployment device, electronic equipment and a storage medium, and aims to solve the problem of the virtual machine deployment process caused by a manual deployment mode.
In a first aspect, to achieve the above object, an embodiment of the present invention provides a virtual machine deployment method, which is applied to a control end, where the control end is connected to a first server; the virtual machine deployment method includes:
determining, in the first server, a target virtual machine template available to a virtualization system in the control end in response to a virtual machine deployment instruction;
acquiring the target virtual machine template, and creating a target virtual machine in the virtualization system according to the target virtual machine template;
and calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
Further, the first server is also connected with a second server, and a virtual machine template updated in real time is stored in the second server; the virtual machine deployment method further comprises:
and when the target virtual machine template which can be used for the virtualization system in the control end does not exist in the first server, controlling the first server to acquire the target virtual machine template from the second server.
Further, before the step of determining, in the first server, a target virtual machine template available for the virtualization system in the control end in response to a virtual machine deployment instruction, the virtual machine deployment method further includes:
controlling the first server to pull data from the second server so that the virtual machine template data in the first server is consistent with the virtual machine template data in the second server.
Further, the step of determining, in the first server, a target virtual machine template available for the virtualization system in the control end includes:
when the control end is detected to be in an intranet state, determining a target virtual machine template which can be used for a virtualization system in the control end from the first server.
Further, the step of determining, in the first server, a target virtual machine template available for the virtualization system in the control end further includes:
when the control end is detected to be in an external network connection state, determining a target uniform resource locator of a target virtual machine template which can be used for a virtualization system in the control end in the first server;
and determining a corresponding target virtual machine template in network resources according to the target uniform resource locator.
Further, the virtual machine deployment method further includes:
generating alarm information when the target virtual machine template does not exist in the second server;
and sending the alarm information to a terminal of a preset operation and maintenance worker to remind the operation and maintenance worker to update the target virtual machine template.
In a second aspect, to solve the same technical problem, an embodiment of the present invention provides a virtual machine deployment apparatus, which is applied to a control end, where the control end is connected to a first server; the virtual machine deployment device comprises:
a virtual machine determining module, configured to determine, in response to a virtual machine deployment instruction, a target virtual machine template available for a virtualization system in the control end in the first server;
the virtual machine creating module is used for acquiring the target virtual machine template and creating a target virtual machine in the virtualization system according to the target virtual machine template;
and the virtual machine configuration module is used for calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
Further, the first server is also connected with a second server, and a virtual machine template updated in real time is stored in the second server; the virtual machine deployment device further comprises:
and the template obtaining module is used for controlling the first server to obtain the target virtual machine template from the second server when the target virtual machine template which can be used for the virtualization system in the control end does not exist in the first server.
In a third aspect, to solve the same technical problem, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the memory is coupled to the processor, and the processor implements the steps in the virtual machine deployment method described in any one of the above when executing the computer program.
In a fourth aspect, to solve the same technical problem, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program runs, the apparatus in which the computer-readable storage medium is located is controlled to execute the steps in the virtual machine deployment method according to any one of the above.
The embodiment of the invention provides a virtual machine deployment method, a virtual machine deployment device, electronic equipment and a storage medium, wherein when a virtual machine deployment instruction is received, a target virtual machine template which can be used for a virtualization system in a control terminal can be automatically determined and obtained in a first server, so that the time required for manually searching the virtual machine template can be reduced; the target virtual machine is automatically established according to the target of the target virtual machine, and the target API of the virtualization system is called to complete the configuration of the target virtual machine, so that the virtual machine is quickly established and installed.
Drawings
Fig. 1 is a schematic application scenario diagram of a virtual machine deployment method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a virtual machine deployment method provided by an embodiment of the invention;
FIG. 3 is a schematic flow chart of a virtual machine deployment method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a virtual machine deployment apparatus according to an embodiment of the present invention;
fig. 5 is another schematic structural diagram of a virtual machine deployment apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
In this embodiment, please refer to fig. 1, fig. 1 is a schematic application scenario diagram of a virtual machine deployment method according to an embodiment of the present invention, as shown in fig. 1, the virtual machine deployment method according to the embodiment of the present invention is mainly applied to a control end, and the control end is connected to a first server mounted locally, specifically, as shown in fig. 2, fig. 2 is a schematic flow diagram of the virtual machine deployment method according to the embodiment of the present invention, as shown in fig. 2, the virtual machine deployment method according to the embodiment of the present invention includes steps 101 to 103;
step 101, in response to a virtual machine deployment instruction, determining a target virtual machine template available for a virtualization system in a control end in a first server.
The existing virtual machine deployment scheme is that a user searches corresponding virtual machine templates in internet resources in a manual searching mode, and then completes the deployment of the virtual machine by carrying out installation and configuration step by step. Therefore, the existing virtual machine deployment scheme has the problem of low deployment efficiency.
In this embodiment, the corresponding virtual machine templates of the operating systems are stored in the first server mounted locally, so that after receiving a virtual machine deployment instruction of a user, a target virtual machine template that can be used for a virtualization system in a control end can be responded in time and determined in the first server, thereby solving the problem of low deployment efficiency in the existing virtual machine deployment scheme and realizing rapid deployment of virtual machines.
It should be noted that the virtualization system of this embodiment mainly includes a vmware virtualization system and a kvm virtualization system, and similarly, a virtual machine template corresponding to the vmware virtualization system and the kvm virtualization system is stored in the first server.
Specifically, the first Server may be an FTP Server (File Transfer Protocol Server), the FTP Server is a computer providing File storage and access service on the internet, and the FTP Server provides service according to an FTP Protocol, so that storage of each operating system template of the virtual machine can be realized, data acquisition at the control end is facilitated, and efficiency of acquiring a corresponding virtual machine template at the control end is effectively improved.
In some embodiments, please continue to refer to fig. 1, the first server mounted locally is further connected to a second server, and the second server stores a virtual machine template updated in real time; the virtual machine deployment method provided by the present embodiment further includes: and when the target virtual machine template which can be used for the virtualization system in the control end does not exist in the first server, controlling the first server to acquire the target virtual machine template from the second server.
The second server provided in this embodiment is a general server maintained by operation and maintenance personnel in real time, and the virtual machine templates updated in real time in the server are all the latest templates, so the virtual machine templates required by the user can be generally directly acquired in the second server. Therefore, when the virtual machine template required by the user does not exist in the first server, the first server can be directly controlled to obtain the corresponding virtual machine template from the second server, so that the user does not need to search in internet resources in a manual searching mode, and the efficiency of virtual machine deployment is further improved.
Specifically, please continue to refer to fig. 1, in this embodiment, only one total server, i.e., the second server, is provided, and the second server is connected to the first servers in the plurality of different environments (environment 1, environment 2 … … n) and mounted on the control terminals of different users, so that the virtual machine template updated in real time can be timely sent to the first servers in each environment, and thus, only one total server, i.e., the second server, is needed to be maintained, thereby meeting the service requirements of different users in different environments, and greatly reducing the operation and maintenance cost.
Optionally, before step 101, the virtual machine deployment method further includes: and controlling the first server to pull data from the second server so that the virtual machine template data in the first server is consistent with the virtual machine template data in the second server.
In this embodiment, the first server provided in this embodiment is a mirror image of the second server, and the synchronization agent is installed in the first server, so that before receiving a virtual machine deployment instruction input by a user each time, data synchronization between the first server and the second server needs to be implemented through the synchronization agent installed in the first server, so that the user can directly determine a corresponding virtual machine template in the first server that is locally mounted, the efficiency of virtual machine deployment is improved, and meanwhile, the experience of the user is improved.
Specifically, the synchronization time of data synchronization between the first server and the second server is realized through the synchronization agent in the first server, and the user can set the synchronization time by self-definition, for example, the synchronization time is set at 24 points every night, or the synchronization time is set when the control end does not work at every time, so that the influence on normal work of the control end due to data synchronization can be avoided, and the user experience is further improved.
In one embodiment, the step of determining, in the first server, a target virtual machine template that can be used for the virtualization system in the control end specifically includes: when the control end is detected to be in the intranet state, a target virtual machine template which can be used for a virtualization system in the control end is determined from the first server.
Because the control end of the user can not keep the external network communication state at all times, when the control end is detected to be in the internal network state, the corresponding target virtual machine template is directly determined from the first server, the required virtual machine template resource is provided for the control end in the internal network state, and the situation that the virtual machine cannot be deployed due to the fact that the control end is in the internal network state is avoided.
Further, when the control end is detected to be in an intranet state and a target virtual machine template which can be used for a virtualization system in the control end does not exist in the first server, the IP address of the first server is reconfigured to enable the first server to be in an extranet communication state, then the first server is immediately controlled to run a synchronization agent to perform data synchronization with the second server, so that the first server can pull an updated virtual machine target from the second server, finally the control end can directly determine the corresponding target virtual machine template from the first server, and the problem that the corresponding virtual machine template cannot be obtained from the local place is solved.
In this embodiment, the virtual machine deployment method further includes: and when the target virtual machine template does not exist in the second server, generating alarm information, and sending the alarm information to a terminal of a preset operation and maintenance person to remind the operation and maintenance person to update the target virtual machine template.
By automatically sending alarm information to a terminal of a preset operation and maintenance worker, the operation and maintenance worker can be reminded to update the target virtual machine template in time, so that the problem that the work progress of a user is delayed and the user experience is reduced due to the fact that the target virtual machine cannot be obtained for a long time is avoided.
Specifically, the alarm information may be text information or voice information, where the content of the alarm information may be text or voice data related to "please update the target virtual machine target in time".
In another embodiment, the step of determining, in the first server, a target virtual machine template that can be used for the virtualization system in the control end specifically further includes: when the control end is detected to be in an external network communication state, determining a target uniform resource locator of a target virtual machine template which can be used for a virtualization system in the control end in a first server; and determining a corresponding target virtual machine template in the network resources according to the target uniform resource locator.
When the control end is detected to be in an external network communication state, a Uniform Resource Locator (URL) of a target virtual machine template which can be used for a virtualization system in the control end is determined from the first server, the corresponding target virtual machine template is determined from network resources according to the URL and is downloaded, and compared with the efficiency of transmission through the first server, the target virtual machine template is directly downloaded through the control end, the speed of obtaining the corresponding target virtual machine template can be effectively increased, and the purpose of rapidly deploying the virtual machine is achieved.
Step 102, a target virtual machine template is obtained, and a target virtual machine is created in the virtualization system according to the target virtual machine template.
And 103, calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
In this embodiment, the configuration information includes a name of the virtual machine, a host where the virtual machine is located, a storage where the virtual machine is located, a CPU, a memory, and network configuration information.
In one embodiment, when the virtualization system corresponding to the target virtual machine is a vmware system, the specific installation configuration flow includes (i) - (iv):
firstly, acquiring a unique identifier and a host network label of a required host resource pool according to a pre-stored login name and a pre-stored password of a vmware system, and completing the import work of a template by an OVFtool installed at a control end, wherein the instruction is as follows:
e \ OVFTool \ ovftool.exe-ds = < storage name > -n = < virtual machine name > -nw = < network tag > -noSSLVerify < target virtual machine template URL >;
Figure DEST_PATH_IMAGE002
connecting a VMware management machine by using a VMware API to perform management operation: searching a newly introduced target virtual machine according to the name, calling a reconfigVM _ Task method, and configuring the memory and the CPU of the target virtual machine according to the configuration information;
invoking powerOnVM _ Task method to start the target virtual machine;
invoking the written script in the target virtual machine template through a startProgramInGuest method to realize the configuration of the IP address.
In another embodiment, when the virtualization system corresponding to the target virtual machine is a kvm system, the specific installation configuration flow includes (i) - (iv):
firstly, according to a target virtual machine template URL, connecting a host where a kvm system is located by using a ssh encryption protocol;
secondly, downloading a kvm virtual machine template by using wget:
wget-P < local Address > < template url >;
modifying the virtual machine configuration file:
virsh define %s;
fourthly, modifying the IP address:
virt-edit -d %s /etc/sysconfig/network-scripts/ifcfg-eth0 -e \"s#IPADDR=\".*\"#IPADDR=\"%s\"#\"。
referring to fig. 3, fig. 3 is another flow chart illustrating a virtual machine deployment method according to an embodiment of the present invention, and as shown in fig. 3, the virtual machine deployment method according to the embodiment of the present invention includes steps 201 to 209;
step 201, controlling the first server to pull data from the second server, so that the virtual machine template data in the first server is consistent with the virtual machine template data in the second server.
In this embodiment, when it is detected that the control end is in the intranet state, step 202 is executed; when the control end is detected to be in the extranet connection state, step 203 is executed.
Step 202, in response to the virtual machine deployment instruction, determining a target virtual machine template available for the virtualization system in the control end from the first server.
In this embodiment, when there is a target virtual machine template available for the virtualization system in the control end in the first server, step 208 is executed; when there is no target virtual machine template available for the virtualization system in the control end in the first server, step 205 is executed.
Step 203, in response to the virtual machine deployment instruction, determining a target uniform resource locator of a target virtual machine template available for the virtualization system in the control end in the first server.
And step 204, determining a corresponding target virtual machine template in the network resources according to the target uniform resource locator.
In this embodiment, after the corresponding target virtual machine target is determined from the network resources, step 208 is executed.
Step 205, controlling the first server to obtain the target virtual machine template from the second server.
In this embodiment, when the target virtual machine target exists in the second server, step 208 is executed; when the target virtual machine template does not exist in the second server, step 206 is performed.
At step 206, alarm information is generated.
And step 207, sending alarm information to a terminal of a preset operation and maintenance worker to remind the operation and maintenance worker to update the target virtual machine template.
In this embodiment, after a preset time, for example, 5 minutes, or when the operation and maintenance personnel completes updating the target of the target virtual machine, step 205 is executed.
And 208, acquiring a target virtual machine template, and creating a target virtual machine in the virtualization system according to the target virtual machine template.
And step 209, calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
In summary, the virtual machine deployment method provided in the embodiments of the present invention includes determining, in response to a virtual machine deployment instruction, a target virtual machine template that can be used for a virtualization system in a control end in a first server, then obtaining the target virtual machine template and creating a target virtual machine in the virtualization system according to the target virtual machine template, and finally calling a target API interface of the virtualization system based on configuration information of the control end to complete configuration of the target virtual machine.
According to the method described in the foregoing embodiment, this embodiment will be further described from the perspective of a virtual machine deployment device, which may be specifically implemented as an independent entity, or may be implemented by being integrated in an electronic device, such as a terminal, where the terminal may include a mobile phone, a tablet computer, and the like.
In this embodiment, the virtual machine deployment apparatus provided in this embodiment is mainly applied to a control end, and the control end is connected to a first server, specifically, referring to fig. 4, fig. 4 is a schematic structural diagram of the virtual machine deployment apparatus provided in the embodiment of the present invention, and as shown in fig. 4, the virtual machine deployment apparatus 400 provided in the embodiment of the present invention includes:
the virtual machine determining module 401 is configured to determine, in response to the virtual machine deployment instruction, a target virtual machine template available for the virtualization system in the control end in the first server.
In some embodiments, the virtual machine determination module 401 is specifically configured to: when the control end is detected to be in the intranet state, a target virtual machine template which can be used for a virtualization system in the control end is determined from the first server.
In other embodiments, the virtual machine determining module 401 is further specifically configured to: when the control end is detected to be in an external network communication state, determining a target uniform resource locator of a target virtual machine template which can be used for a virtualization system in the control end in a first server; and determining a corresponding target virtual machine template in the network resources according to the target uniform resource locator.
The virtual machine creating module 402 is configured to obtain a target virtual machine template, and create a target virtual machine in the virtualization system according to the target virtual machine template.
The virtual machine configuration module 403 is configured to call a target API interface of the virtualization system based on the configuration information of the control end, and complete configuration of the target virtual machine.
In this embodiment, the first server is further connected to a second server, and the second server stores a virtual machine template updated in real time; referring to fig. 5, fig. 5 is another schematic structural diagram of a virtual machine deployment device according to an embodiment of the present invention, and as shown in fig. 5, a virtual machine deployment device 400 according to an embodiment of the present invention further includes:
the template obtaining module 404 is configured to control the first server to obtain a target virtual machine template from the second server when the target virtual machine template available for the virtualization system in the control end does not exist in the first server.
And a data synchronization module 405, configured to control the first server to pull data from the second server, so that the virtual machine template data in the first server is consistent with the virtual machine template data in the second server.
An alert generating module 406, configured to generate alert information when the target virtual machine template does not exist in the second server.
And the information sending module 407 is configured to send alarm information to a terminal of a preset operation and maintenance worker to remind the operation and maintenance worker to update the target virtual machine template.
In a specific implementation, each of the modules and/or units may be implemented as an independent entity, or may be implemented as one or several entities by any combination, where the specific implementation of each of the modules and/or units may refer to the foregoing method embodiment, and specific achievable beneficial effects also refer to the beneficial effects in the foregoing method embodiment, which are not described herein again.
In addition, referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device may be a mobile terminal such as a smart phone and a tablet computer. As shown in fig. 6, the electronic device 600 includes a processor 601, a memory 602. The processor 601 is electrically connected to the memory 602.
The processor 601 is a control center of the electronic device 600, connects various parts of the whole electronic device using various interfaces and lines, and performs various functions of the electronic device 600 and processes data by running or loading an application stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the electronic device 600.
In this embodiment, the processor 601 in the electronic device 600 loads instructions corresponding to processes of one or more application programs into the memory 602 according to the following steps, and the processor 601 runs the application programs stored in the memory 602, thereby implementing various functions:
in response to a virtual machine deployment instruction, determining a target virtual machine template available for a virtualization system in a control end in a first server;
acquiring a target virtual machine template, and creating a target virtual machine in a virtualization system according to the target virtual machine template;
and calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
The electronic device 600 may implement the steps in any embodiment of the virtual machine deployment method provided in the embodiment of the present invention, and therefore, the beneficial effects that can be achieved by any virtual machine deployment method provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiment and will not be described herein again.
Referring to fig. 7, fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 7, fig. 7 is a specific structural block diagram of the electronic device according to the embodiment of the present invention, where the electronic device may be used to implement the virtual machine deployment method provided in the foregoing embodiment. The electronic device 700 may be a mobile terminal such as a smart phone or a notebook computer.
The RF circuit 710 is used for receiving and transmitting electromagnetic waves, and performing interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. The RF circuitry 710 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, Subscriber Identity Module (SIM) cards, memory, and so forth. The RF circuit 710 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (e.g., IEEE802.11 a, IEEE802.11 b, IEEE802.11g and/or IEEE802.11 n), Voice over Internet Protocol (VoIP), world wide Internet Protocol (Microwave Access for micro), and other short message protocols for instant messaging, as well as any other suitable communication protocols, and may even include those that have not yet been developed.
The memory 720 may be used for storing software programs and modules, such as program instructions/modules corresponding to the virtual machine deployment method in the above-mentioned embodiment, and the processor 780 executes various functional applications and virtual machine deployments by executing the software programs and modules stored in the memory 720, so as to implement the following functions:
in response to a virtual machine deployment instruction, determining a target virtual machine template available for a virtualization system in a control end in a first server;
acquiring a target virtual machine template, and creating a target virtual machine in a virtualization system according to the target virtual machine template;
and calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
The memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 720 may further include memory located remotely from processor 780, which may be connected to electronic device 700 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 730 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 730 may include a touch-sensitive surface 731 as well as other input devices 732. Touch-sensitive surface 731, also referred to as a touch display screen or touch pad, can collect touch operations by a user on or near touch-sensitive surface 731 (e.g., operations by a user on or near touch-sensitive surface 731 using a finger, stylus, or any other suitable object or attachment) and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 731 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 780, and can receive and execute commands from the processor 780. In addition, the touch-sensitive surface 731 can be implemented in a variety of types, including resistive, capacitive, infrared, and surface acoustic wave. The input unit 730 may also include other input devices 732 in addition to the touch-sensitive surface 731. In particular, other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 740 may be used to display information input by or provided to the user and various graphical user interfaces of the electronic device 700, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 740 may include a Display panel 741, and optionally, the Display panel 741 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 731 can overlay display panel 741, such that when touch-sensitive surface 731 detects a touch event thereon or nearby, processor 780 can determine the type of touch event, and processor 780 can then provide a corresponding visual output on display panel 741 based on the type of touch event. Although in the figure the touch-sensitive surface 731 and the display panel 741 are shown as two separate components to implement input and output functions, in some embodiments the touch-sensitive surface 731 and the display panel 741 may be integrated to implement input and output functions.
The electronic device 700 may also include at least one sensor 750, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 741 according to the brightness of ambient light, and a proximity sensor that may generate an interrupt when the folder is closed or closed. As one of the motion sensors, the gravity acceleration sensor may detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile phone is stationary, and may be used for applications of recognizing gestures of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and tapping), and other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor that are further configured to the electronic device 700, and are not described herein again.
The audio circuit 760, speaker 761, and microphone 762 may provide an audio interface between a user and the electronic device 700. The audio circuit 760 can transmit the electrical signal converted from the received audio data to the speaker 761, and the electrical signal is converted into a sound signal by the speaker 761 and output; on the other hand, the microphone 762 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 760, processes the audio data by the audio data output processor 780, and transmits the processed audio data to, for example, another terminal via the RF circuit 710, or outputs the audio data to the memory 720 for further processing. The audio circuitry 760 may also include an earbud jack to provide communication of a peripheral headset with the electronic device 700.
The electronic device 700, via the transport module 770 (e.g., a Wi-Fi module), may assist the user in receiving requests, sending information, etc., which provides the user with wireless broadband internet access. Although the transmission module 770 is illustrated in the drawings, it is understood that it does not belong to the essential constitution of the electronic device 700 and may be omitted entirely within the scope not changing the essence of the invention as needed.
The processor 780 is a control center of the electronic device 700, connects various parts of the entire cellular phone using various interfaces and lines, and performs various functions of the electronic device 700 and processes data by operating or executing software programs and/or modules stored in the memory 720 and calling data stored in the memory 720, thereby integrally monitoring the electronic device. Optionally, processor 780 may include one or more processing cores; in some embodiments, processor 780 may integrate an application processor that handles primarily the operating system, user interface, applications, etc. and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 780.
The electronic device 700 also includes a power supply 790 (e.g., a battery) that provides power to various components, and in some embodiments may be logically coupled to the processor 780 via a power management system that may perform functions such as managing charging, discharging, and power consumption. The power supply 790 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the electronic device 700 further includes a camera (e.g., a front camera, a rear camera), a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, the mobile terminal further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
in response to a virtual machine deployment instruction, determining a target virtual machine template available for a virtualization system in a control end in a first server;
acquiring a target virtual machine template, and creating a target virtual machine in a virtualization system according to the target virtual machine template;
and calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, the embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps of any embodiment of the virtual machine deployment method provided by the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any embodiment of the virtual machine deployment method provided by the embodiment of the present invention, the beneficial effects that can be achieved by any virtual machine deployment method provided by the embodiment of the present invention can be achieved, and the detailed description is omitted here for the sake of detail in the foregoing embodiment.
The foregoing detailed description has provided a virtual machine deployment method, apparatus, electronic device, and storage medium according to embodiments of the present application, and the principles and implementations of the present application have been described herein using specific examples, and the foregoing descriptions of the embodiments are only used to help understand the method and the core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application. Moreover, it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the invention, and such modifications and adaptations are intended to be within the scope of the invention.

Claims (10)

1. The virtual machine deployment method is applied to a control end, and the control end is connected with a first server; the virtual machine deployment method includes:
determining, in the first server, a target virtual machine template available to a virtualization system in the control end in response to a virtual machine deployment instruction;
acquiring the target virtual machine template, and creating a target virtual machine in the virtualization system according to the target virtual machine template;
and calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
2. The method of virtual machine deployment as claimed in claim 1, wherein said first server is further connected to a second server, said second server having stored thereon real-time updated virtual machine templates; the virtual machine deployment method further comprises:
and when the target virtual machine template which can be used for the virtualization system in the control end does not exist in the first server, controlling the first server to acquire the target virtual machine template from the second server.
3. The virtual machine deployment method of claim 2, wherein prior to said step of determining in said first server, responsive to virtual machine deployment instructions, target virtual machine templates available to a virtualization system in said control peer, said virtual machine deployment method further comprises:
controlling the first server to pull data from the second server so that the virtual machine template data in the first server is consistent with the virtual machine template data in the second server.
4. The virtual machine deployment method of claim 3 wherein said step of determining in said first server target virtual machine templates available to a virtualization system in said control peer comprises:
when the control end is detected to be in an intranet state, determining a target virtual machine template which can be used for a virtualization system in the control end from the first server.
5. The virtual machine deployment method of claim 4 wherein said step of determining in said first server target virtual machine templates available to a virtualization system in said control peer further comprises:
when the control end is detected to be in an external network connection state, determining a target uniform resource locator of a target virtual machine template which can be used for a virtualization system in the control end in the first server;
and determining a corresponding target virtual machine template in network resources according to the target uniform resource locator.
6. The virtual machine deployment method as claimed in claim 2, further comprising:
generating alarm information when the target virtual machine template does not exist in the second server;
and sending the alarm information to a terminal of a preset operation and maintenance worker to remind the operation and maintenance worker to update the target virtual machine template.
7. The virtual machine deployment device is applied to a control end, and the control end is connected with a first server; the virtual machine deployment device comprises:
a virtual machine determining module, configured to determine, in response to a virtual machine deployment instruction, a target virtual machine template available for a virtualization system in the control end in the first server;
the virtual machine creating module is used for acquiring the target virtual machine template and creating a target virtual machine in the virtualization system according to the target virtual machine template;
and the virtual machine configuration module is used for calling a target API (application program interface) of the virtualization system based on the configuration information of the control end to complete the configuration of the target virtual machine.
8. The virtual machine deployment device of claim 7 wherein the first server is further connected to a second server having stored thereon real-time updated virtual machine templates; the virtual machine deployment device further comprises:
and the template obtaining module is used for controlling the first server to obtain the target virtual machine template from the second server when the target virtual machine template which can be used for the virtualization system in the control end does not exist in the first server.
9. An electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor, and the processor, when executing the computer program, implementing the steps in the virtual machine deployment method as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, wherein when the computer program runs, the computer-readable storage medium controls an apparatus to execute the steps in the virtual machine deployment method according to any one of claims 1 to 6.
CN202111157302.6A 2021-09-30 2021-09-30 Virtual machine deployment method, device, electronic device and storage medium Pending CN113590272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111157302.6A CN113590272A (en) 2021-09-30 2021-09-30 Virtual machine deployment method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111157302.6A CN113590272A (en) 2021-09-30 2021-09-30 Virtual machine deployment method, device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN113590272A true CN113590272A (en) 2021-11-02

Family

ID=78242645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111157302.6A Pending CN113590272A (en) 2021-09-30 2021-09-30 Virtual machine deployment method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113590272A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114625485A (en) * 2022-05-12 2022-06-14 武汉四通信息服务有限公司 Virtual machine template management system, method and device, and service cloud and storage medium
CN120560786A (en) * 2025-08-01 2025-08-29 数字广东网络建设有限公司 Virtual machine configuration method, device, program product and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090254990A1 (en) * 2008-04-05 2009-10-08 Mcgee William Gerald System and method for intelligent coordination of host and guest intrusion prevention in virtualized environment
CN102799464A (en) * 2012-06-25 2012-11-28 北京奇虎科技有限公司 Virtual machine creation method, virtual machine creation system, virtual machine resetting method and virtual machine resetting system
WO2014117533A1 (en) * 2013-01-31 2014-08-07 Hangzhou H3C Technologies Co., Ltd. Creating virtual machines
CN106775946A (en) * 2016-12-16 2017-05-31 无锡华云数据技术服务有限公司 A kind of virtual machine Method of Creation Process
CN109032765A (en) * 2018-09-05 2018-12-18 郑州云海信息技术有限公司 A kind of virtual machine two-node cluster hot backup dispositions method, device and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090254990A1 (en) * 2008-04-05 2009-10-08 Mcgee William Gerald System and method for intelligent coordination of host and guest intrusion prevention in virtualized environment
CN102799464A (en) * 2012-06-25 2012-11-28 北京奇虎科技有限公司 Virtual machine creation method, virtual machine creation system, virtual machine resetting method and virtual machine resetting system
WO2014117533A1 (en) * 2013-01-31 2014-08-07 Hangzhou H3C Technologies Co., Ltd. Creating virtual machines
CN106775946A (en) * 2016-12-16 2017-05-31 无锡华云数据技术服务有限公司 A kind of virtual machine Method of Creation Process
CN109032765A (en) * 2018-09-05 2018-12-18 郑州云海信息技术有限公司 A kind of virtual machine two-node cluster hot backup dispositions method, device and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114625485A (en) * 2022-05-12 2022-06-14 武汉四通信息服务有限公司 Virtual machine template management system, method and device, and service cloud and storage medium
CN120560786A (en) * 2025-08-01 2025-08-29 数字广东网络建设有限公司 Virtual machine configuration method, device, program product and storage medium

Similar Documents

Publication Publication Date Title
CN111142711B (en) Firmware configuration method and device, storage medium and mobile terminal
US10768881B2 (en) Multi-screen interaction method and system in augmented reality scene
CN108039963B (en) Container configuration method and device and storage medium
WO2018077041A1 (en) Method and apparatus for running application
CN113489630A (en) Network distribution method, device, storage medium and electronic terminal
CN112199246A (en) Terminal testing method and device, storage medium and mobile terminal
CN114518718A (en) Device control method, device, storage medium and electronic device
CN109284144A (en) A fast application processing method and mobile terminal
CN109067751B (en) ARP spoofing detection method and device under non-Root environment and terminal
CN113590272A (en) Virtual machine deployment method, device, electronic device and storage medium
CN111273955A (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
CN112308947A (en) Animation generation method and device and storage medium
EP4130983B1 (en) Method and apparatus for installing application program, and terminal device and storage medium
CN111026457B (en) Hardware configuration method and device, storage medium and terminal equipment
CN111615101B (en) IMS registration method, device, storage medium and electronic terminal
CN110225106B (en) Data transmission method, device and storage medium
CN111046215A (en) Image processing method and device, storage medium and mobile terminal
CN106209601B (en) State update message pushing method and device
CN105320532A (en) Interactive interface display method and device as well as terminal
CN111163221B (en) Group address book updating method and device, storage medium and terminal equipment
CN110365842B (en) A terminal control method and terminal device
CN106357513A (en) Message processing method, device, server and message processing system
CN106033358B (en) Batch installation method and device of application programs
CN114721785B (en) Configuration method, device, equipment and storage medium of software application library of virtual machine
CN110618798A (en) Multi-screen display method, multi-screen device, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20211102

RJ01 Rejection of invention patent application after publication