Movatterモバイル変換


[0]ホーム

URL:


CN109271179B - Virtual machine application program management method, device, equipment and readable storage medium - Google Patents

Virtual machine application program management method, device, equipment and readable storage medium
Download PDF

Info

Publication number
CN109271179B
CN109271179BCN201811208867.0ACN201811208867ACN109271179BCN 109271179 BCN109271179 BCN 109271179BCN 201811208867 ACN201811208867 ACN 201811208867ACN 109271179 BCN109271179 BCN 109271179B
Authority
CN
China
Prior art keywords
virtual machine
application program
application
management
software
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.)
Active
Application number
CN201811208867.0A
Other languages
Chinese (zh)
Other versions
CN109271179A (en
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.)
Sichuan Zhongdian Aostar Information Technologies Co ltd
State Grid Information and Telecommunication Group Co Ltd
Original Assignee
Sichuan Zhongdian Aostar Information Technologies Co ltd
State Grid Information and Telecommunication Group 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 Sichuan Zhongdian Aostar Information Technologies Co ltd, State Grid Information and Telecommunication Group Co LtdfiledCriticalSichuan Zhongdian Aostar Information Technologies Co ltd
Publication of CN109271179ApublicationCriticalpatent/CN109271179A/en
Application grantedgrantedCritical
Publication of CN109271179BpublicationCriticalpatent/CN109271179B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种虚拟机应用程序管理方法,该方法包括以下步骤:对获取的kubernetes软件进行镜像处理,生成镜像文件,将镜像文件刻录到各待安装虚拟机中,利用kubernetes软件对各虚拟机的应用程序进行管理操作。应用本发明实施例所提供的技术方案,通过镜像的方式安装kubernetes软件,相较于用户手动操作命令行对kubernetes软件进行安装,简单易行,较大地提高了虚拟机对应用程序的管理操作执行效率,提升了用户体验。本发明还公开了一种虚拟机应用程序管理装置、设备及存储介质,具有相应技术效果。

Figure 201811208867

The invention discloses a virtual machine application management method. The method includes the following steps: performing image processing on acquired kubernetes software, generating image files, burning the image files into virtual machines to be installed, and using kubernetes software to perform image processing on each virtual machine. machine application for management operations. By applying the technical solutions provided by the embodiments of the present invention, the kubernetes software is installed by mirroring, which is simple and easy to install compared to the user manually operating the command line to install the kubernetes software, which greatly improves the management operation execution of the application program by the virtual machine. Efficiency and improved user experience. The invention also discloses a virtual machine application program management device, equipment and storage medium, which have corresponding technical effects.

Figure 201811208867

Description

Translated fromChinese
虚拟机应用程序管理方法、装置、设备及可读存储介质Virtual machine application management method, apparatus, device and readable storage medium

技术领域technical field

本发明涉及虚拟化技术领域,特别是涉及一种虚拟机应用程序管理方法、装置、设备及计算机可读存储介质。The present invention relates to the field of virtualization technology, and in particular, to a virtual machine application management method, apparatus, device, and computer-readable storage medium.

背景技术Background technique

近年来云计算技术在我国已经在很多行业领域进行了广泛的运用,云计算的关键技术是虚拟化技术,这是一种资源管理技术,是将计算机的各种实体资源,如CPU、网络、内存及磁盘等,予以抽象、转换后呈现出来,清除实体结构间的不可切割的障碍,使用户可以比原来更好、更便利地使用这些资源。在节约硬件成本、人力成本、运维成本、提高资源利用率等方面都起到了非常重要的作用。In recent years, cloud computing technology has been widely used in many industries in my country. The key technology of cloud computing is virtualization technology, which is a resource management technology. Memory and disk, etc. are abstracted and transformed, and the inseparable barriers between entity structures are removed, so that users can use these resources better and more conveniently than before. It has played a very important role in saving hardware costs, labor costs, operation and maintenance costs, and improving resource utilization.

一个物理机可以虚拟化出多个虚拟机,虚拟机对应用程序进行管理操作需要安装kubernetes软件。现有的给虚拟机安装kubernetes软件的方式是用户手动操作命令行给各虚拟机一一进行安装,重复的安装步骤需要多次重复执行,操作步骤繁琐,虚拟机对应用程序的管理操作执行效率低,用户体验差。A physical machine can virtualize multiple virtual machines, and kubernetes software needs to be installed for virtual machines to manage applications. The existing method of installing kubernetes software for virtual machines is that users manually operate the command line to install each virtual machine one by one. Repeated installation steps need to be repeated many times, the operation steps are cumbersome, and the management operations of virtual machines to applications are performed efficiently. Low, poor user experience.

综上所述,如何有效地解决手动操作命令行进行kubernetes软件安装,操作步骤繁琐,虚拟机对应用程序的管理操作执行效率低,用户体验差等问题,是目前本领域技术人员急需解决的问题。To sum up, how to effectively solve the problems of manually operating the command line to install kubernetes software, complicated operation steps, inefficient execution of virtual machine management operations on applications, and poor user experience, is an urgent problem for those skilled in the art. .

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种虚拟机应用程序管理方法,该方法简单易行,较大地提高了虚拟机对应用程序的管理操作执行效率,提升了用户体验;本发明的另一目的是提供一种虚拟机应用程序管理装置、设备及计算机可读存储介质。The purpose of the present invention is to provide a virtual machine application management method, which is simple and easy to implement, greatly improves the execution efficiency of the management operation of the virtual machine on the application, and improves the user experience; another purpose of the present invention is to provide a A virtual machine application management apparatus, device, and computer-readable storage medium.

为解决上述技术问题,本发明提供如下技术方案:In order to solve the above-mentioned technical problems, the present invention provides the following technical solutions:

一种虚拟机应用程序管理方法,所述方法包括:A virtual machine application management method, the method comprising:

对获取的kubernetes软件进行镜像处理,生成镜像文件;Perform image processing on the acquired kubernetes software to generate image files;

将所述镜像文件刻录到各待安装虚拟机中,以使各所述待安装虚拟机均安装有所述kubernetes软件;Burning the image file into each virtual machine to be installed, so that each virtual machine to be installed is installed with the kubernetes software;

利用所述kubernetes软件对各虚拟机的应用程序进行管理操作。Use the kubernetes software to perform management operations on the applications of each virtual machine.

在本发明的一种具体实施方式中,各所述虚拟机的各所述应用程序的扩建过程,包括:In a specific embodiment of the present invention, the expansion process of each of the application programs of each of the virtual machines includes:

利用应用容器引擎封装预先建立的应用程序,得到容器封装应用程序;Use the application container engine to encapsulate the pre-established application to obtain the container-encapsulated application;

将所述容器封装应用程序分发给各所述虚拟机。Distributing the container-packaged application to each of the virtual machines.

在本发明的一种具体实施方式中,各所述已安装虚拟机和各所述待安装虚拟机的虚拟过程包括:In a specific embodiment of the present invention, the virtual process of each of the installed virtual machines and each of the virtual machines to be installed includes:

利用KVM虚拟化技术进行虚拟机扩建。Use KVM virtualization technology for virtual machine expansion.

在本发明的一种具体实施方式中,利用所述kubernetes软件对各虚拟机的应用程序进行管理操作,包括:In a specific embodiment of the present invention, using the kubernetes software to perform management operations on the applications of each virtual machine, including:

当接收到应用程序管理请求时,生成对应的应用程序管理数据;When an application management request is received, corresponding application management data is generated;

利用KVM适配层将所述应用程序管理数据封装成预设的数据格式,得到标准管理数据;Utilize the KVM adaptation layer to encapsulate the application program management data into a preset data format to obtain standard management data;

利用所述kubernetes软件基于所述标准管理数据对各所述虚拟机的应用程序进行管理操作。Use the kubernetes software to perform management operations on the applications of the virtual machines based on the standard management data.

一种虚拟机应用程序管理装置,所述装置包括:A virtual machine application management device, the device includes:

文件生成模块,用于对获取的kubernetes软件进行镜像处理,生成镜像文件;The file generation module is used to image the acquired kubernetes software and generate image files;

软件刻录模块,用于将所述镜像文件刻录到各待安装虚拟机中,以使各所述待安装虚拟机均安装有所述kubernetes软件;a software recording module, for recording the image file into each virtual machine to be installed, so that each virtual machine to be installed is installed with the kubernetes software;

应用程序管理模块,用于利用所述kubernetes软件对各虚拟机的应用程序进行管理操作。The application program management module is used for using the kubernetes software to perform management operations on the application programs of each virtual machine.

在本发明的一种具体实施方式中,包括:In a specific embodiment of the present invention, it includes:

应用程序封装模块,用于利用应用容器引擎封装预先建立的应用程序,得到容器封装应用程序;The application encapsulation module is used to encapsulate the pre-established application by using the application container engine to obtain the container encapsulated application;

应用程序分发模块,用于将所述容器封装应用程序分发给各所述虚拟机。An application distribution module, configured to distribute the container-packaged application to each of the virtual machines.

在本发明的一种具体实施方式中,包括:In a specific embodiment of the present invention, it includes:

虚拟机扩建模块,用于利用KVM虚拟化技术进行虚拟机扩建。The virtual machine expansion module is used to expand the virtual machine by using the KVM virtualization technology.

在本发明的一种具体实施方式中,所述应用程序管理模块,包括:In a specific embodiment of the present invention, the application program management module includes:

数据生成子模块,用于当接收到应用程序管理请求时,生成对应的应用程序管理数据;The data generation sub-module is used to generate corresponding application management data when an application management request is received;

数据封装子模块,用于利用KVM适配层将所述应用程序管理数据封装成预设的数据格式,得到标准管理数据;A data encapsulation submodule for encapsulating the application management data into a preset data format by utilizing the KVM adaptation layer to obtain standard management data;

应用程序管理子模块,用于利用所述kubernetes软件基于所述标准管理数据对各所述虚拟机的应用程序进行管理操作。The application program management submodule is configured to use the kubernetes software to perform management operations on the application programs of the virtual machines based on the standard management data.

一种虚拟机应用程序管理设备,包括:A virtual machine application management device, comprising:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序时实现如前所述虚拟机应用程序管理方法的步骤。The processor is configured to implement the steps of the foregoing virtual machine application management method when executing the computer program.

一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如前所述虚拟机应用程序管理方法的步骤。A computer-readable storage medium stores a computer program on the computer-readable storage medium, and when the computer program is executed by a processor, implements the steps of the foregoing virtual machine application program management method.

应用本发明实施例所提供的方法,通过对获取的kubernetes软件进行镜像处理,生成镜像文件,将镜像文件刻录到各待安装虚拟机中,从而使得各待安装虚拟机均安装有kubernetes软件,可以利用kubernetes软件对各虚拟机的应用程序进行管理操作。通过镜像的方式生成一个kubernetes软件,并将该kubernetes软件刻录到每个虚拟机中,相较于现有技术中用户手动操作命令行对kubernetes软件进行安装的方式,简单易行,较大地提高了虚拟机对应用程序的管理操作执行效率,提升了用户体验。By applying the method provided by the embodiment of the present invention, by performing image processing on the acquired kubernetes software, an image file is generated, and the image file is burned into each virtual machine to be installed, so that each virtual machine to be installed is installed with the kubernetes software, which can Use kubernetes software to manage the applications of each virtual machine. Generate a kubernetes software by mirroring, and burn the kubernetes software into each virtual machine. Compared with the existing method in which the user manually operates the command line to install the kubernetes software, it is simple and easy to implement, and greatly improves the The virtual machine performs efficient management operations on applications, improving user experience.

相应的,本发明实施例还提供了与上述虚拟机应用程序管理方法相对应的装置、设备和计算机可读存储介质,具有上述技术效果,在此不再赘述。Correspondingly, the embodiments of the present invention further provide apparatuses, devices, and computer-readable storage media corresponding to the above-mentioned virtual machine application management method, which have the above-mentioned technical effects, and will not be repeated here.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明实施例中虚拟机应用程序管理方法的一种实施流程图;FIG. 1 is an implementation flowchart of a virtual machine application management method in an embodiment of the present invention;

图2为本发明实施例中虚拟机应用程序管理方法的另一种实施流程图;Fig. 2 is another implementation flow chart of the virtual machine application management method in the embodiment of the present invention;

图3为本发明实施例中一种虚拟机应用程序管理装置的结构框图;FIG. 3 is a structural block diagram of a virtual machine application program management apparatus in an embodiment of the present invention;

图4为本发明实施例中一种虚拟机应用程序管理设备的结构框图。FIG. 4 is a structural block diagram of a virtual machine application management device in an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make those skilled in the art better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

实施例一:Example 1:

参见图1,图1为本发明实施例中虚拟机应用程序管理方法的一种实施流程图,该方法可以包括以下步骤:Referring to FIG. 1, FIG. 1 is an implementation flowchart of a virtual machine application management method in an embodiment of the present invention, and the method may include the following steps:

S101:对获取的kubernetes软件进行镜像处理,生成镜像文件。S101: Perform image processing on the acquired kubernetes software to generate an image file.

通过虚拟化技术可以将一台物理机虚拟化为多个虚拟机,这些虚拟机共享物理机的硬件资源,可以将各虚拟机划分给不同的用户使用,并可以对虚拟机进行删除、暂停、恢复、启动、停止和重启等管理操作。并且管理端还可以对物理机资源进行查看系统物理机列表、增加物理机、删除物理机及查询物理机等操作。各虚拟机可以安装应用程序,如tomcat、mysql等,虚拟机安装应用程序需要预先安装有kubernetes软件。Through virtualization technology, a physical machine can be virtualized into multiple virtual machines. These virtual machines share the hardware resources of the physical machine. Each virtual machine can be divided into different users, and the virtual machine can be deleted, suspended, Administrative operations such as resume, start, stop, and restart. In addition, the management terminal can also perform operations such as viewing the list of system physical machines, adding physical machines, deleting physical machines, and querying physical machines for physical machine resources. Each virtual machine can install applications, such as tomcat, mysql, etc. The virtual machine installation application needs to be pre-installed with kubernetes software.

在需要给待安装虚拟机安装kubernetes软件时,可以获取kubernetes软件,并对kubernetes软件进行镜像处理,生成镜像文件。kubernetes软件的获取方式更通常的是从已安装虚拟机中查找kubernetes软件,开发人员可以通过应用程序编程接口API在一台或几台虚拟机中预先安装kubernetes软件,获得已安装虚拟机。通过镜像处理的方式生成kubernetes软件的镜像文件,简单易行,不需要过多的人为干涉。When the kubernetes software needs to be installed on the virtual machine to be installed, the kubernetes software can be obtained, and the kubernetes software can be imaged to generate an image file. The most common way to obtain kubernetes software is to find kubernetes software from installed virtual machines. Developers can pre-install kubernetes software in one or several virtual machines through the application programming interface API to obtain installed virtual machines. The image file of the kubernetes software is generated by image processing, which is simple and easy to implement and does not require too much human intervention.

S102:将镜像文件刻录到各待安装虚拟机中,以使各待安装虚拟机均安装有kubernetes软件。S102: Burn the image file into each virtual machine to be installed, so that the kubernetes software is installed on each virtual machine to be installed.

当通过镜像处理方式生成kubernetes软件的镜像文件之后,可以分别将各镜像文件刻录到各待安装虚拟机中,从而使得各待安装虚拟机均安装有kubernetes软件。并且为了保证kubernetes软件运行时的顺畅性,可以获取已安装虚拟机中kubernetes软件的安装目录,将各镜像文件刻录到各待安装虚拟机中相同的安装目录下。After the image files of the kubernetes software are generated by the image processing method, each image file can be burned into each virtual machine to be installed, so that each virtual machine to be installed has the kubernetes software installed. And in order to ensure the smooth running of the kubernetes software, you can obtain the installation directory of the kubernetes software in the installed virtual machine, and burn each image file to the same installation directory in each virtual machine to be installed.

S103:利用kubernetes软件对各虚拟机的应用程序进行管理操作。S103: Use the kubernetes software to manage the applications of each virtual machine.

当各待安装虚拟机均安装kubernetes软件完成后,管理端可以利用kubernetes软件对各虚拟机的应用程序进行管理操作,如可以选择在哪个虚拟机上运行相应的应用程序,对应用程序进行在线提交、编辑、删除、编排等操作。管理端对应用程序具体可以是采用容器组Pod、副本控制器RC(Replication Controller)、服务Service、部署Deploy等方式来实现编排。When the kubernetes software is installed on each virtual machine to be installed, the management terminal can use the kubernetes software to manage the applications of each virtual machine. For example, you can choose which virtual machine to run the corresponding application and submit the application online. , Edit, Delete, Arrange, etc. The management end-to-application program can be orchestrated by means of container group Pod, replication controller RC (Replication Controller), service service, deployment deployment, etc.

应用本发明实施例所提供的方法,在已安装kubernetes软件的已安装虚拟机中查找kubernetes软件,通过对kubernetes软件进行镜像处理,生成1个镜像文件,将镜像文件刻录到各待安装虚拟机中,从而使得各待安装虚拟机均安装有kubernetes软件,可以利用kubernetes软件对各虚拟机的应用程序进行管理操作。通过镜像的方式生成一个kubernetes软件,并将该kubernetes软件刻录到每个虚拟机中,相较于现有技术中用户手动操作命令行对kubernetes软件进行安装的方式,简单易行,较大地提高了虚拟机对应用程序的管理操作执行效率,提升了用户体验。By applying the method provided by the embodiment of the present invention, the kubernetes software is searched in the installed virtual machine where the kubernetes software has been installed, the kubernetes software is imaged to generate an image file, and the image file is burned into each virtual machine to be installed. , so that the kubernetes software is installed on each virtual machine to be installed, and the kubernetes software can be used to manage the applications of each virtual machine. Generate a kubernetes software by mirroring, and burn the kubernetes software into each virtual machine. Compared with the existing method in which the user manually operates the command line to install the kubernetes software, it is simple and easy to implement, and greatly improves the The virtual machine performs efficient management operations on applications, improving user experience.

需要说明的是,基于上述实施例一,本发明实施例还提供了相应的改进方案。在后续实施例中涉及与上述实施例一中相同步骤或相应步骤之间可相互参考,相应的有益效果也可相互参照,在下文的改进实施例中不再一一赘述。It should be noted that, based on the foregoing first embodiment, the embodiment of the present invention also provides a corresponding improvement solution. In subsequent embodiments, the same steps or corresponding steps in the above-mentioned first embodiment can be referred to each other, and corresponding beneficial effects can also be referred to each other, which will not be repeated in the following improved embodiments.

在本发明的一种具体实施方式中,各虚拟机的各应用程序的扩建过程,可以包括以下步骤:In a specific embodiment of the present invention, the expansion process of each application program of each virtual machine may include the following steps:

步骤一:利用应用容器引擎封装预先建立的应用程序,得到容器封装应用程序;Step 1: Use the application container engine to encapsulate the pre-established application to obtain the container-encapsulated application;

步骤二:将容器封装应用程序分发给各虚拟机。Step 2: Distribute the container-packaged application to each virtual machine.

为方便描述,可以将上述两个步骤结合起来进行说明。For the convenience of description, the above two steps may be combined for description.

在对各虚拟机进行应用程序的安装时,可以通过web管理界面预先对一个或几个虚拟机建立相应的应用程序,再利用应用容器引擎Docker封装预先建立的应用程序,得到容器封装应用程序。通过利用容器封装应用程序可以实现在不同平台和云计算之间具有便携性、占用资源少、能够快速部署的优点,将容器封装应用程序分发给各虚拟机。When installing applications on each virtual machine, you can pre-establish corresponding applications for one or several virtual machines through the web management interface, and then use the application container engine Docker to package the pre-established applications to obtain container-packaged applications. By using the container-packaged application program, the advantages of portability between different platforms and cloud computing, less resource occupation, and rapid deployment can be achieved, and the container-packaged application program can be distributed to each virtual machine.

具体的,可以是一个单一的容器封装应用程序内捆绑了关键的若干个应用程序,也可以是一个容器封装应用程序只包括一个微服务的应用程序(如登录、查询等),从而可以对微服务的应用程序在各虚拟机中进行高效地分发,例如,由于用户使用登录功能的频率比较低,可以在较少数量的虚拟机中安装用于登录功能的应用程序,用户使用查询功能的频率比较高,可以在较多数量的虚拟机中安装用于查询功能的应用程序。并且可以随时扩展或收缩容器封装应用程序规模,将容器封装应用程序组织成组,还可以提供容器封装应用程序间的负载均衡,容易将容器封装应用程序升级为新版本,提供容器封装应用程序弹性,如果容器封装应用程序失效就替换它。Specifically, it can be a single container-packaged application bundled with several key applications, or a container-packaged application that includes only one microservice application (such as login, query, etc.) The application of the service is efficiently distributed in each virtual machine. For example, since the user uses the login function less frequently, the application for the login function can be installed in a smaller number of virtual machines, and the frequency of the user's use of the query function Higher, applications for query functions can be installed in a larger number of virtual machines. And it can expand or shrink the size of container-packaged applications at any time, organize container-packaged applications into groups, and also provide load balancing between container-packaged applications, easily upgrade container-packaged applications to new versions, and provide container-packaged applications flexibility. , to replace the container-wrapped application if it fails.

在本发明的一种具体实施方式中,各虚拟机的虚拟过程包括:In a specific embodiment of the present invention, the virtual process of each virtual machine includes:

利用KVM虚拟化技术进行虚拟机扩建。Use KVM virtualization technology for virtual machine expansion.

从一台物理机虚拟出多个虚拟机的过程可以利用KVM虚拟化技术进行虚拟机扩建。KVM类型的虚拟机是基于内核的虚拟机,其集成了Linux内核的虚拟机监视器Hypervisor,Hypervisor可以使得原本独占物理机资源的操作系统可以被安装在多个虚拟机之中,从而实现同时在一台物理机上运行多个虚拟机操作系统,这些虚拟机之间共享物理机资源的硬件,Hypervisor负责各种资源的分配。它是Linux的一个很小的模块,可以利用Linux做若干事情,如任务调度、内存管理与硬件设备交互等。KVM类型的虚拟机是一个独特的管理程序,通过将KVM虚拟机作为一个内核模块实现,在虚拟环境下Linux内核集成管理程序将其作为一个可加载的模块可以简化管理和提升性能。在这种模式下,每个虚拟机都是一个常规的Linux进程,可以通过Linux调度程序进行调度。The process of virtualizing multiple virtual machines from one physical machine can use KVM virtualization technology to perform virtual machine expansion. The KVM type virtual machine is a kernel-based virtual machine, which integrates the virtual machine monitor Hypervisor of the Linux kernel. The hypervisor can enable the operating system that originally monopolized the resources of the physical machine to be installed in multiple virtual machines, so as to realize the simultaneous operation of the virtual machine. A physical machine runs multiple virtual machine operating systems, and these virtual machines share the hardware of physical machine resources, and the hypervisor is responsible for the allocation of various resources. It is a small module of Linux, which can use Linux to do several things, such as task scheduling, memory management and hardware device interaction. A KVM-type virtual machine is a unique hypervisor. By implementing the KVM virtual machine as a kernel module, the Linux kernel integrated hypervisor uses it as a loadable module to simplify management and improve performance in a virtual environment. In this mode, each virtual machine is a regular Linux process that can be scheduled through the Linux scheduler.

KVM虚拟化技术相较于其他虚拟化技术具有很多优势,如可以直接与内核交互,Linux社区中相关开发工作较为活跃,具有良好的性能、可通过对v2v、p2v等技术实现以及对虚拟机进行管理,作为一种开源工具在虚拟机行业具有较大的竞争力,各大Linux的发行版本中都采用了KVM作为默认的虚拟化实现技术,适用性广。并且各虚拟机均采用KVM虚拟化技术得到,可以避免各虚拟机之间遵循标准不同、缺乏互操作性等现象的发生,可以简化对物理资源的申请、审批、回收等管理操作。Compared with other virtualization technologies, KVM virtualization technology has many advantages, such as direct interaction with the kernel, relatively active development work in the Linux community, and good performance. Management, as an open source tool, has great competitiveness in the virtual machine industry. All major Linux distributions use KVM as the default virtualization implementation technology, which has wide applicability. In addition, each virtual machine is obtained by using KVM virtualization technology, which can avoid the occurrence of different standards and lack of interoperability among virtual machines, and can simplify the management operations such as application, approval, and recovery of physical resources.

实施例二:Embodiment 2:

参见图2,图2为本发明实施例中虚拟机应用程序管理方法的另一种实施流程图,该方法可以包括以下步骤:Referring to FIG. 2, FIG. 2 is another implementation flowchart of a virtual machine application management method in an embodiment of the present invention, and the method may include the following steps:

S201:对获取的kubernetes软件进行镜像处理,生成镜像文件。S201: Perform image processing on the acquired kubernetes software to generate an image file.

S202:将镜像文件刻录到各待安装虚拟机中,以使各待安装虚拟机均安装有kubernetes软件。S202: Burn the image file into each virtual machine to be installed, so that the kubernetes software is installed on each virtual machine to be installed.

S203:当接收到应用程序管理请求时,生成对应的应用程序管理数据。S203: When an application management request is received, corresponding application management data is generated.

当需要对各虚拟机中的应用程序进行管理操作时,可以向应用程序管理端发送应用程序管理请求,应用程序的管理端接收到应用程序管理请求时,可以生成对应的应用程序管理数据。When the application program in each virtual machine needs to be managed, an application program management request can be sent to the application program management end, and when the application program management end receives the application program management request, it can generate corresponding application program management data.

S204:利用KVM适配层将应用程序管理数据封装成预设的数据格式,得到标准管理数据。S204: Use the KVM adaptation layer to encapsulate the application management data into a preset data format to obtain standard management data.

可以预先设置对应用程序进行管理的应用程序管理数据的统一的数据格式,并且设置KVM适配层用于对生成的管理数据进行封装,当生成与应用程序管理请求对应的应用程序管理数据之后,可以利用KVM适配层将应用程序管理数据封装成预设的数据格式,得到标准管理数据。The unified data format of the application management data for managing the application can be preset, and the KVM adaptation layer is set to encapsulate the generated management data. After the application management data corresponding to the application management request is generated, The KVM adaptation layer can be used to encapsulate the application management data into a preset data format to obtain standard management data.

S205:利用kubernetes软件基于标准管理数据对各虚拟机的应用程序进行管理操作。S205: Use the kubernetes software to manage the applications of each virtual machine based on standard management data.

当通过KVM适配层将生成的应用程序管理数据封装成预设的数据格式之后,可以利用kubernetes软件基于标准管理数据对各虚拟机的应用程序进行管理操作。通过利用统一标准格式的应用程序管理数据对应用程序进行管理,可以隐藏底层实现的差异,提高了对应用程序的管理效率。After the generated application management data is encapsulated into a preset data format through the KVM adaptation layer, the kubernetes software can be used to manage the applications of each virtual machine based on the standard management data. By using the application program management data in a unified standard format to manage the application program, the difference of the underlying implementation can be hidden, and the management efficiency of the application program can be improved.

相应于上面的方法实施例,本发明实施例还提供了一种虚拟机应用程序管理装置,下文描述的一种虚拟机应用程序管理装置与上文描述的一种虚拟机应用程序管理方法可相互对应参照。Corresponding to the above method embodiments, embodiments of the present invention further provide a virtual machine application program management apparatus, and a virtual machine application program management apparatus described below and a virtual machine application program management method described above can interact with each other. corresponding reference.

参见图3,图3为本发明实施例中一种虚拟机应用程序管理装置的结构框图,该装置可以包括:Referring to FIG. 3, FIG. 3 is a structural block diagram of a virtual machine application management apparatus in an embodiment of the present invention, and the apparatus may include:

文件生成模块31,用于对获取的kubernetes软件进行镜像处理,生成镜像文件;Thefile generation module 31 is used to perform mirror processing on the acquired kubernetes software to generate mirror files;

软件刻录模块32,用于将镜像文件刻录到各待安装虚拟机中,以使各待安装虚拟机均安装有kubernetes软件;其中,镜像文件在待安装虚拟机的安装目录与kubernetes软件在已安装虚拟机中的安装目录相同;Thesoftware burning module 32 is used to burn the image file into each virtual machine to be installed, so that each virtual machine to be installed is installed with kubernetes software; wherein, the image file is installed in the installation directory of the virtual machine to be installed and the kubernetes software is installed. The installation directory in the virtual machine is the same;

应用程序管理模块33,用于利用kubernetes软件对各虚拟机的应用程序进行管理操作。The applicationprogram management module 33 is configured to perform management operations on the application programs of each virtual machine by using the kubernetes software.

应用本发明实施例所提供的装置,通过对获取的kubernetes软件进行镜像处理,生成镜像文件,将镜像文件刻录到各待安装虚拟机中,从而使得各待安装虚拟机均安装有kubernetes软件,可以利用kubernetes软件对各虚拟机的应用程序进行管理操作。通过镜像的方式生成一个kubernetes软件,并将该kubernetes软件刻录到每个虚拟机中,相较于现有技术中用户手动操作命令行对kubernetes软件进行安装的方式,简单易行,较大地提高了虚拟机对应用程序的管理操作执行效率,提升了用户体验。Using the device provided by the embodiment of the present invention, by performing image processing on the acquired kubernetes software, an image file is generated, and the image file is burned into each virtual machine to be installed, so that each virtual machine to be installed is installed with the kubernetes software, which can Use kubernetes software to manage the applications of each virtual machine. Generate a kubernetes software by mirroring, and burn the kubernetes software into each virtual machine. Compared with the existing method in which the user manually operates the command line to install the kubernetes software, it is simple and easy to implement, and greatly improves the The virtual machine performs efficient management operations on applications, improving user experience.

在本发明的一种具体实施方式中,包括:In a specific embodiment of the present invention, it includes:

应用程序封装模块,用于利用应用容器引擎封装预先建立的应用程序,得到容器封装应用程序;The application encapsulation module is used to encapsulate the pre-established application by using the application container engine to obtain the container encapsulated application;

应用程序分发模块,用于将容器封装应用程序分发给各虚拟机。The application distribution module is used to distribute the container-packaged application to each virtual machine.

在本发明的一种具体实施方式中,包括:In a specific embodiment of the present invention, it includes:

虚拟机扩建模块,用于利用KVM虚拟化技术进行虚拟机扩建。The virtual machine expansion module is used to expand the virtual machine by using the KVM virtualization technology.

在本发明的一种具体实施方式中,应用程序管理模块34,包括:In a specific embodiment of the present invention, the applicationprogram management module 34 includes:

数据生成子模块,用于当接收到应用程序管理请求时,生成对应的应用程序管理数据;The data generation sub-module is used to generate corresponding application management data when an application management request is received;

数据封装子模块,用于利用KVM适配层将应用程序管理数据封装成预设的数据格式,得到标准管理数据;The data encapsulation sub-module is used to encapsulate the application management data into a preset data format by using the KVM adaptation layer to obtain standard management data;

应用程序管理子模块,用于利用kubernetes软件基于标准管理数据对各虚拟机的应用程序进行管理操作。The application management submodule is used to manage the applications of each virtual machine based on the standard management data by using the kubernetes software.

相应于上面的方法实施例,参见图4,图4为本发明所提供的虚拟机应用程序管理设备的示意图,该设备可以包括:Corresponding to the above method embodiments, see FIG. 4 , which is a schematic diagram of a virtual machine application management device provided by the present invention, and the device may include:

存储器41,用于存储计算机程序;memory 41 for storing computer programs;

处理器42,用于执行上述存储器41存储的计算机程序时可实现如下步骤:Theprocessor 42 can implement the following steps when executing the computer program stored in the above-mentioned memory 41:

对获取的kubernetes软件进行镜像处理,生成镜像文件;将镜像文件刻录到各待安装虚拟机中,以使各待安装虚拟机均安装有kubernetes软件;利用kubernetes软件对各虚拟机的应用程序进行管理操作。Perform image processing on the acquired kubernetes software to generate image files; burn the image files into each virtual machine to be installed, so that each virtual machine to be installed has kubernetes software installed; use kubernetes software to manage the applications of each virtual machine operate.

对于本发明提供的设备的介绍请参照上述方法实施例,本发明在此不做赘述。For the introduction of the device provided by the present invention, please refer to the above method embodiments, which will not be repeated in the present invention.

相应于上面的方法实施例,本发明还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时可实现如下步骤:Corresponding to the above method embodiments, the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps can be implemented:

对获取的kubernetes软件进行镜像处理,生成镜像文件;将镜像文件刻录到各待安装虚拟机中,以使各待安装虚拟机均安装有kubernetes软件;利用kubernetes软件对各虚拟机的应用程序进行管理操作。Perform image processing on the acquired kubernetes software to generate image files; burn the image files into each virtual machine to be installed, so that each virtual machine to be installed has kubernetes software installed; use kubernetes software to manage the applications of each virtual machine operate.

该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium may include: a USB flash drive, a removable hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc., which can store program codes. medium.

对于本发明提供的计算机可读存储介质的介绍请参照上述方法实施例,本发明在此不做赘述。For the introduction of the computer-readable storage medium provided by the present invention, please refer to the foregoing method embodiments, which will not be repeated in the present invention.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置、设备及计算机可读存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other. For the apparatuses, devices, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and reference may be made to the descriptions of the methods for related parts.

专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the possibilities of hardware and software. Interchangeability, the above description has generally described the components and steps of each example in terms of functionality. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.

结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in conjunction with the embodiments disclosed herein may be directly implemented in hardware, a software module executed by a processor, or a combination of the two. A software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的技术方案及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The principles and implementations of the present invention are described herein by using specific examples, and the descriptions of the above embodiments are only used to help understand the technical solutions and core ideas of the present invention. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, several improvements and modifications can also be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims (4)

CN201811208867.0A2018-09-302018-10-17Virtual machine application program management method, device, equipment and readable storage mediumActiveCN109271179B (en)

Applications Claiming Priority (2)

Application NumberPriority DateFiling DateTitle
CN20181116010582018-09-30
CN2018111601052018-09-30

Publications (2)

Publication NumberPublication Date
CN109271179A CN109271179A (en)2019-01-25
CN109271179Btrue CN109271179B (en)2022-04-12

Family

ID=65192794

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811208867.0AActiveCN109271179B (en)2018-09-302018-10-17Virtual machine application program management method, device, equipment and readable storage medium

Country Status (1)

CountryLink
CN (1)CN109271179B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109918095A (en)*2019-03-202019-06-21浪潮商用机器有限公司 A method for installing software and Power server

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108255579A (en)*2018-01-112018-07-06浪潮(北京)电子信息产业有限公司A kind of virtual machine management method and device based on KVM platforms

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108255579A (en)*2018-01-112018-07-06浪潮(北京)电子信息产业有限公司A kind of virtual machine management method and device based on KVM platforms

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Kubernetes自建虚拟机实验环境(CentOS 7 环境下离线安装);张利民z的个人空间;《https://my.oschina.net/u/3420782/blog/897369》;20170511;第1-9页*

Also Published As

Publication numberPublication date
CN109271179A (en)2019-01-25

Similar Documents

PublicationPublication DateTitle
US8904384B2 (en)Reducing data transfer overhead during live migration of a virtual machine
US9218042B2 (en)Cooperatively managing enforcement of energy related policies between virtual machine and application runtime
US8789048B2 (en)Virtual machine placement to improve memory utilization
US10324754B2 (en)Managing virtual machine patterns
US9983863B2 (en)Method to optimize provisioning time with dynamically generated virtual disk contents
CN105468362A (en)Application deployment method and cloud computing system
WO2013009665A1 (en)Application resource manager over a cloud
WO2021018267A1 (en)Live migration method for virtual machine and communication device
US9735984B2 (en)Bursting cloud resources to affect state change performance
US9710292B2 (en)Allowing management of a virtual machine by multiple cloud providers
CN108255737A (en)Based on multi version operating system testing method, system and equipment and storage medium
CN103645957A (en)Resource management and control method for virtual machines, and resource management and control device for virtual machines
US11010149B2 (en)Shared middleware layer containers
CN112102457A (en)3D rendering method and system
CN107391141A (en) An all-memory operating system that supports container operation
CN106293847A (en)Method for supporting service of virtualization platform
WO2018103372A1 (en)Driver management method and host machine
CN103049546B (en)The method and apparatus of a kind of management, access system daily record
CN114371908A (en)Cloud application program operation method and device
US20200174814A1 (en)Systems and methods for upgrading hypervisor locally
CN112286633A (en)Virtual machine creating method, device, equipment and storage medium based on CloudStack platform
CN105100180A (en)Cluster node dynamic loading method, device and system
CN105677481B (en)A kind of data processing method, system and electronic equipment
CN109271179B (en)Virtual machine application program management method, device, equipment and readable storage medium
CN109189551A (en)A kind of method, apparatus and computer storage medium creating middleware

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp