CN105278999A - A Safe and Efficient Virtual Machine Software Deployment Method - Google Patents
A Safe and Efficient Virtual Machine Software Deployment Method Download PDFInfo
- Publication number
- CN105278999A CN105278999A CN201510799372.XA CN201510799372A CN105278999A CN 105278999 A CN105278999 A CN 105278999A CN 201510799372 A CN201510799372 A CN 201510799372A CN 105278999 A CN105278999 A CN 105278999A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- directory
- software
- deployment
- snapshot
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000013515 script Methods 0.000 claims abstract description 14
- 238000009434 installation Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及云计算技术领域,特别是指一种安全高效虚拟机软件部署的方法。The invention relates to the technical field of cloud computing, in particular to a method for deploying safe and efficient virtual machine software.
背景技术Background technique
在云计算领域,云平台可以提供虚拟机,然后需要在虚拟机上部署应用软件。通常部署一个复杂的应用软件需要专业人员花费不少时间,现在云平台开始提供自动部署软件的服务,使部署应用仅需要在页面点击选择需要安装的应用,而不需要在后台操作。目前,实现云平台虚拟机部署软件的通常有3种方式:In the field of cloud computing, the cloud platform can provide virtual machines, and then need to deploy application software on the virtual machines. It usually takes a lot of time for professionals to deploy a complex application software. Now the cloud platform has started to provide automatic software deployment services, so that deploying applications only needs to click on the page to select the application to be installed, instead of operating in the background. At present, there are usually three ways to implement cloud platform virtual machine deployment software:
方式一method one
令、拷贝一个镜像,然后启动虚拟机;Command, copy an image, and then start the virtual machine;
以、配置好虚拟机网络,确保虚拟机能够访问存放应用的ftp服务器和访问云平台;So, configure the virtual machine network to ensure that the virtual machine can access the ftp server where the application is stored and access the cloud platform;
3、虚拟机内部向云平台发送请求获取应用的信息;3. The virtual machine sends a request to the cloud platform to obtain application information;
4、从ftp下载应用软件,然后执行部署配置脚本。4. Download the application software from ftp, and then execute the deployment configuration script.
方式二way two
1.选择待启动的母镜像模板文件;1. Select the master image template file to be started;
2.选择该操作系统下适合的软件模板文件;2. Select the appropriate software template file under the operating system;
3.母镜像文件与模板文件进行合并;3. The master image file is merged with the template file;
4.合并完成后启动虚拟机。4. Start the virtual machine after the merge is complete.
方式三way three
1.系统PXE网络启动;1. System PXE network boot;
2.系统获取dhcp分配ip和引导镜像文件和配置kickstart文件;2. The system obtains dhcp to assign ip and boot image files and configure kickstart files;
3.根据kickstart文件安装相应的应用软件;3. Install the corresponding application software according to the kickstart file;
4.重启系统。4. Restart the system.
方式一存在以下弊端:Method 1 has the following disadvantages:
令、必须启动虚拟机才能安装,而且依赖网络,虚拟内部需要访问ftp服务器和云平台,所以需要在虚拟机内部安装一个且gent。对于安全比较看重的客户,可能不允许安装且gent,那么软件自动部署无法实现。The order and virtual machine must be started to install, and it depends on the network. The virtual interior needs to access the ftp server and cloud platform, so a gent needs to be installed inside the virtual machine. For customers who value security more, installation and gent may not be allowed, so automatic software deployment cannot be realized.
2、假如客户部署相同应用,需要重新执行一次上述流程,消耗时间跟虚拟机数量成正比。2. If the customer deploys the same application, the above process needs to be executed again, and the time consumed is proportional to the number of virtual machines.
方式二存在以下弊端:Method 2 has the following disadvantages:
1.客户需要的应用软件需求是不同的,需要准备大量的软件模板文件,需要消耗存储的空间。1. The application software requirements required by customers are different, and a large number of software template files need to be prepared, which consumes storage space.
2.软件模板文件只能针对一种类型的母镜像文件。2. The software template file can only target one type of parent image file.
3.母镜像文件与软件镜像文件合并是个耗时的工作,且如果创建多台,那么需要的时间跟虚拟机数量成正比。3. Merging the parent image file and the software image file is a time-consuming task, and if multiple virtual machines are created, the time required is proportional to the number of virtual machines.
方式三存在以下弊端Method 3 has the following disadvantages
1.安装复杂,本质上就是网络安装系统的过程,每个系统需要重复安装,没有复用性,时间开销比较大。1. The installation is complicated, which is essentially the process of installing the system on the network. Each system needs to be installed repeatedly, without reusability, and the time consumption is relatively large.
2.PXE网络安装一般适用部署物理机系统,不适用于虚拟机,虚拟机存在系统镜像,不需要重新安装操作系统。2. PXE network installation is generally suitable for deploying physical machine systems, but not for virtual machines. Virtual machines have system images, and there is no need to reinstall the operating system.
发明内容Contents of the invention
本发明解决的技术问题在于提供一种安全高效虚拟机软件部署的方法,不需要在虚拟机安装一个agent来协助完成软件的部署,安全系数更高,而且流程更加简单;通用性更高,时间开销更加少。The technical problem solved by the present invention is to provide a method for safe and efficient virtual machine software deployment, which does not need to install an agent in the virtual machine to assist in the completion of software deployment, with higher safety factor and simpler process; higher versatility and less time There is even less overhead.
本发明解决上述技术问题的技术方案是:The technical scheme that the present invention solves the problems of the technologies described above is:
所述的方法包括如下步骤:Described method comprises the steps:
步骤1:首先拷贝一个镜像,对镜像进行一次快照;Step 1: First copy a mirror image and take a snapshot of the mirror image;
步骤以:把快照文件挂载到一个目录;The steps are as follows: mount the snapshot file to a directory;
步骤3:ftp下载需要部署的软件,并拷贝至挂载目录;Step 3: Download the software to be deployed via ftp and copy it to the mount directory;
步骤4:切换到挂载目录,执行chroot命令把挂载目录当做根目录;Step 4: Switch to the mount directory and execute the chroot command to use the mount directory as the root directory;
步骤5:执行应用软件部署配置脚本,完成部署;Step 5: Execute the application software deployment configuration script to complete the deployment;
步骤6:执行命令退出快照挂载目录;Step 6: Execute the command to exit the snapshot mounting directory;
步骤7:假如用户创建多台相同应用虚拟机,那么复制多次快照文件;Step 7: If the user creates multiple virtual machines of the same application, then copy the snapshot files multiple times;
步骤8:启动虚拟机,虚拟机部署应用完成。Step 8: Start the virtual machine, and the virtual machine deployment application is completed.
所述的镜像是虚拟机系统镜像,镜像文件根式是qcow2;快照采用的是外部快照的方式,会额外生成一个qcow2的文件;The image described above is a virtual machine system image, and the root format of the image file is qcow2; the snapshot adopts an external snapshot method, and an additional qcow2 file will be generated;
快照文件挂载到一个目录,是指在用mount的命令把快照文件可读写的挂载到某个目录。Mounting the snapshot file to a directory means using the mount command to mount the snapshot file to a certain directory in a readable and writable manner.
虚拟机需要部署的软件通常放在ftp服务器,而且如何部署配置的脚本文件也放在ftp服务器。The software that needs to be deployed by the virtual machine is usually placed on the ftp server, and the script file for how to deploy the configuration is also placed on the ftp server.
在云平台的后台执行chroot命令,所述的chroot命令是把挂载目录切换成根目录,相当于切换到镜像系统。Execute the chroot command in the background of the cloud platform. The chroot command is to switch the mounting directory to the root directory, which is equivalent to switching to the mirror system.
所述的执行应用软件部署配置脚本,就是切换到镜像系统后执行的脚本的集合。The execution of the application software deployment configuration script is a collection of scripts executed after switching to the mirroring system.
采用本发明的方法进行虚拟机软件部署;无需启动虚拟机、无需大量的软件模板文件、无需网络安装系统;不需要在虚拟机安装一个agent来协助完成软件的部署,因此,安全系数更高,而且流程更加简单;通用性更高,时间开销更加少。The method of the present invention is used to deploy virtual machine software; there is no need to start a virtual machine, a large number of software template files, and a network installation system; there is no need to install an agent in a virtual machine to assist in completing software deployment, so the safety factor is higher. And the process is simpler; the versatility is higher, and the time overhead is less.
附图说明Description of drawings
下面结合附图对本发明进一步说明:Below in conjunction with accompanying drawing, the present invention is further described:
图1为本发明的流程图。Fig. 1 is a flowchart of the present invention.
具体实施方式detailed description
见图1所示,本发明虚拟机软件部署主要包括以下步骤:As shown in Figure 1, the virtual machine software deployment of the present invention mainly includes the following steps:
1、拷贝镜像,并镜像快照1. Copy the image and mirror the snapshot
#qemu-imgcreate-bCentOS-7-x86_64-GenericCloud-20140826_02.qcow2-fqcow2vm.snap2、快照文件挂载到一个目录#qemu-imgcreate-bCentOS-7-x86_64-GenericCloud-20140826_02.qcow2-fqcow2vm.snap2, mount the snapshot file to a directory
#qemu-nbd--connect=/dev/nbd0vm.snap#qemu-nbd --connect=/dev/nbd0vm.snap
#mount/dev/nbd0p1loop/#mount/dev/nbd0p1loop/
#cdloop/#cdloop/
3、ftp下载需要部署的软件,并拷贝至挂载目录3. Download the software to be deployed via ftp and copy it to the mounting directory
假如部署tomcat,那么If tomcat is deployed, then
#wgetftp://ftp.muug.mb.ca/mirror/centos/7.1.1503/updates/x86_64/Packages/tomcat-7.0.54-2.el7_1.noarch.rpm#cptomcat-7.0.54-2.el7_1.noarch.rpmloop/#wgetftp://ftp.muug.mb.ca/mirror/centos/7.1.1503/updates/x86_64/Packages/tomcat-7.0.54-2.el7_1.noarch.rpm#cptomcat-7.0.54-2.el7_1 .noarch.rpmloop/
4、切换到挂载目录,执行chroot命令把挂载目录当做根目录;4. Switch to the mount directory and execute the chroot command to use the mount directory as the root directory;
#chroot./#chroot./
5、执行应用软件部署配置脚本,完成部署;5. Execute the application software deployment configuration script to complete the deployment;
#rpm-ivhtomcat-7.0.54-2.el7_1.noarch.rpm#rpm-ivhtomcat-7.0.54-2.el7_1.noarch.rpm
6、执行命令退出快照挂载目录;6. Execute the command to exit the snapshot mounting directory;
#exit;cd..;umount./loop;qemu-nbd-d/dev/nbd0#exit; cd ..; umount ./loop; qemu-nbd-d /dev/nbd0
7、假如用户创建多台相同应用虚拟机,那么复制多次快照文件;7. If the user creates multiple virtual machines of the same application, then copy the snapshot file multiple times;
#cpvm.snapvm.snap1#cpvm.snapvm.snap1
8、启动虚拟机,虚拟机部署应用完成。8. Start the virtual machine, and the virtual machine deployment application is completed.
#virshcreatelibvirt.xml。#virshcreatelibvirt.xml.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510799372.XA CN105278999A (en) | 2015-11-19 | 2015-11-19 | A Safe and Efficient Virtual Machine Software Deployment Method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510799372.XA CN105278999A (en) | 2015-11-19 | 2015-11-19 | A Safe and Efficient Virtual Machine Software Deployment Method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN105278999A true CN105278999A (en) | 2016-01-27 |
Family
ID=55148054
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510799372.XA Pending CN105278999A (en) | 2015-11-19 | 2015-11-19 | A Safe and Efficient Virtual Machine Software Deployment Method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105278999A (en) |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106254312A (en) * | 2016-07-15 | 2016-12-21 | 浙江宇视科技有限公司 | A kind of method and device being realized server attack protection by virtual machine isomery |
| CN106648797A (en) * | 2016-12-30 | 2017-05-10 | 郑州云海信息技术有限公司 | Method and system for installing test software, test server and shared server |
| CN106775801A (en) * | 2016-11-09 | 2017-05-31 | 广东浪潮大数据研究有限公司 | A kind of software batch dispositions method, device and system |
| CN107229509A (en) * | 2017-06-09 | 2017-10-03 | 山东超越数控电子有限公司 | The creation method of container type virtual machine under a kind of platform of soaring |
| CN107729020A (en) * | 2017-10-11 | 2018-02-23 | 北京航空航天大学 | A kind of method for realizing extensive container rapid deployment |
| CN107968794A (en) * | 2016-10-18 | 2018-04-27 | 中兴通讯股份有限公司 | A kind of virtual drive hanging method and system, server, terminal |
| CN108089913A (en) * | 2017-12-28 | 2018-05-29 | 创新科存储技术(深圳)有限公司 | A kind of virtual machine deployment method of super emerging system |
| CN109032761A (en) * | 2018-08-06 | 2018-12-18 | 郑州云海信息技术有限公司 | Automatic deployment virtual machine and the method for installing OS automatically under a kind of Linux |
| CN110297646A (en) * | 2019-06-29 | 2019-10-01 | 中国海洋大学 | A kind of ocean model environment automatic deployment software |
| CN110442426A (en) * | 2019-07-25 | 2019-11-12 | 腾讯科技(深圳)有限公司 | A kind of password remapping method, device and storage medium |
| CN114020404A (en) * | 2021-10-27 | 2022-02-08 | 郑州云海信息技术有限公司 | Application deployment method, device, equipment and storage medium based on cloud platform |
| CN115700465A (en) * | 2022-11-09 | 2023-02-07 | 安超云软件有限公司 | Movable electronic equipment and application thereof |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120066677A1 (en) * | 2010-09-10 | 2012-03-15 | International Business Machines Corporation | On demand virtual machine image streaming |
| CN103297504A (en) * | 2013-05-09 | 2013-09-11 | 浙江大学 | Method for quickly deploying operating systems in physical bare computers in cloud data center |
| US20130311990A1 (en) * | 2010-10-12 | 2013-11-21 | Transoft (Shanghai), Inc. | Client-side virtualization architecture |
| CN103514023A (en) * | 2013-10-22 | 2014-01-15 | 中国科学院信息工程研究所 | Method and system for off-line and automatically installing software of virtual machine |
| CN103530162A (en) * | 2013-10-22 | 2014-01-22 | 中国科学院信息工程研究所 | Automatic online virtual machine software installing method and system |
| CN103729264A (en) * | 2013-12-23 | 2014-04-16 | 国云科技股份有限公司 | Method for backing up and restoring Windows virtual machine system disk |
| CN103795759A (en) * | 2012-10-31 | 2014-05-14 | 北京搜狐新媒体信息技术有限公司 | Method and system for scheduling virtual machine mirror image file |
-
2015
- 2015-11-19 CN CN201510799372.XA patent/CN105278999A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120066677A1 (en) * | 2010-09-10 | 2012-03-15 | International Business Machines Corporation | On demand virtual machine image streaming |
| US20130311990A1 (en) * | 2010-10-12 | 2013-11-21 | Transoft (Shanghai), Inc. | Client-side virtualization architecture |
| CN103795759A (en) * | 2012-10-31 | 2014-05-14 | 北京搜狐新媒体信息技术有限公司 | Method and system for scheduling virtual machine mirror image file |
| CN103297504A (en) * | 2013-05-09 | 2013-09-11 | 浙江大学 | Method for quickly deploying operating systems in physical bare computers in cloud data center |
| CN103514023A (en) * | 2013-10-22 | 2014-01-15 | 中国科学院信息工程研究所 | Method and system for off-line and automatically installing software of virtual machine |
| CN103530162A (en) * | 2013-10-22 | 2014-01-22 | 中国科学院信息工程研究所 | Automatic online virtual machine software installing method and system |
| CN103729264A (en) * | 2013-12-23 | 2014-04-16 | 国云科技股份有限公司 | Method for backing up and restoring Windows virtual machine system disk |
Cited By (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106254312B (en) * | 2016-07-15 | 2019-12-13 | 浙江宇视科技有限公司 | A method and device for realizing server attack defense through virtual machine heterogeneity |
| CN106254312A (en) * | 2016-07-15 | 2016-12-21 | 浙江宇视科技有限公司 | A kind of method and device being realized server attack protection by virtual machine isomery |
| CN107968794A (en) * | 2016-10-18 | 2018-04-27 | 中兴通讯股份有限公司 | A kind of virtual drive hanging method and system, server, terminal |
| CN107968794B (en) * | 2016-10-18 | 2023-05-12 | 中兴通讯股份有限公司 | Virtual CD-ROM mounting method and system, server and terminal |
| CN106775801A (en) * | 2016-11-09 | 2017-05-31 | 广东浪潮大数据研究有限公司 | A kind of software batch dispositions method, device and system |
| CN106648797A (en) * | 2016-12-30 | 2017-05-10 | 郑州云海信息技术有限公司 | Method and system for installing test software, test server and shared server |
| CN107229509A (en) * | 2017-06-09 | 2017-10-03 | 山东超越数控电子有限公司 | The creation method of container type virtual machine under a kind of platform of soaring |
| CN107729020A (en) * | 2017-10-11 | 2018-02-23 | 北京航空航天大学 | A kind of method for realizing extensive container rapid deployment |
| CN107729020B (en) * | 2017-10-11 | 2020-08-28 | 北京航空航天大学 | Method for realizing rapid deployment of large-scale container |
| CN108089913B (en) * | 2017-12-28 | 2021-09-17 | 深圳创新科技术有限公司 | Virtual machine deployment method of super-fusion system |
| CN108089913A (en) * | 2017-12-28 | 2018-05-29 | 创新科存储技术(深圳)有限公司 | A kind of virtual machine deployment method of super emerging system |
| CN109032761A (en) * | 2018-08-06 | 2018-12-18 | 郑州云海信息技术有限公司 | Automatic deployment virtual machine and the method for installing OS automatically under a kind of Linux |
| CN110297646A (en) * | 2019-06-29 | 2019-10-01 | 中国海洋大学 | A kind of ocean model environment automatic deployment software |
| CN110442426A (en) * | 2019-07-25 | 2019-11-12 | 腾讯科技(深圳)有限公司 | A kind of password remapping method, device and storage medium |
| CN110442426B (en) * | 2019-07-25 | 2023-09-26 | 腾讯科技(深圳)有限公司 | Password resetting method, device and storage medium |
| CN114020404A (en) * | 2021-10-27 | 2022-02-08 | 郑州云海信息技术有限公司 | Application deployment method, device, equipment and storage medium based on cloud platform |
| CN114020404B (en) * | 2021-10-27 | 2025-07-04 | 郑州云海信息技术有限公司 | A cloud platform-based application deployment method, device, equipment and storage medium |
| CN115700465A (en) * | 2022-11-09 | 2023-02-07 | 安超云软件有限公司 | Movable electronic equipment and application thereof |
| CN115700465B (en) * | 2022-11-09 | 2023-05-09 | 安超云软件有限公司 | Mobile electronic equipment and application method thereof |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105278999A (en) | A Safe and Efficient Virtual Machine Software Deployment Method | |
| US12450099B2 (en) | Release lifecycle management system for multi-node application | |
| US11405274B2 (en) | Managing virtual network functions | |
| US12056519B2 (en) | Virtual machine migration method and apparatus | |
| US9875133B2 (en) | Virtual machine disk image installation | |
| JP6329547B2 (en) | System and method for providing a service management engine for use in a cloud computing environment | |
| US9134991B2 (en) | Automatic upgrade of virtual appliances | |
| US9075638B2 (en) | Efficient hosting of virtualized containers using read-only operating systems | |
| WO2020029995A1 (en) | Application upgrading through sharing dependencies | |
| US12461790B2 (en) | System and method for auto-clustering of clusterable services | |
| US10795706B2 (en) | Multitier application blueprint representation in open virtualization format package | |
| US8838848B2 (en) | Systems and methods for intelligent system profile unique data management | |
| US20140359617A1 (en) | Patching a Virtual Image | |
| US9141400B2 (en) | Technique for deploying operating systems in a virtualized environment | |
| CN108089913B (en) | Virtual machine deployment method of super-fusion system | |
| KR102283736B1 (en) | Method and apparatus for generating automatically setup code of application software baesed autosar | |
| GB2516842A (en) | Deployment of software images with distinct configuration logic | |
| CN102662884A (en) | Device driving program configuration method based on network | |
| CN105183529A (en) | Method for refreshing server firmware, target server, source server and system | |
| US20240160425A1 (en) | Deployment of management features using containerized service on management device and application thereof | |
| Frampton | Apache mesos | |
| CN108388449A (en) | A kind of method of data center's update linux system trawl performance | |
| US12498941B2 (en) | Generating filesystem images with integrated container registries having container runtime to initiate the first container image | |
| Kropp et al. | Docker: containerize your application | |
| CN107608680A (en) | A kind of batch installation customizes the method and system of kernel and driving |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160127 |
|
| RJ01 | Rejection of invention patent application after publication |