CN110855788A - Method for realizing virtual machine template breakpoint resume issuing through proxy - Google Patents

Method for realizing virtual machine template breakpoint resume issuing through proxy Download PDF

Info

Publication number
CN110855788A
CN110855788A CN201911127951.4A CN201911127951A CN110855788A CN 110855788 A CN110855788 A CN 110855788A CN 201911127951 A CN201911127951 A CN 201911127951A CN 110855788 A CN110855788 A CN 110855788A
Authority
CN
China
Prior art keywords
file
virtual machine
downloading
machine template
proxy server
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
CN201911127951.4A
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.)
Shanghai New Torch Network Information Technology Ltd By Share Ltd
Original Assignee
Shanghai New Torch Network Information Technology Ltd By Share 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 Shanghai New Torch Network Information Technology Ltd By Share Ltd filed Critical Shanghai New Torch Network Information Technology Ltd By Share Ltd
Priority to CN201911127951.4A priority Critical patent/CN110855788A/en
Publication of CN110855788A publication Critical patent/CN110855788A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method for realizing virtual machine template breakpoint resume issuing through an agent, which comprises the following steps: s1: formulating cutting, uploading and downloading rules of the template file of the virtual machine; s2: receiving an instruction of a host computer for initiating downloading of a virtual machine template; s3: the file server cuts the virtual machine template file into file blocks; s4: the file server uploads the file blocks to each proxy server; s5: receiving file blocks downloaded by a host computer on each proxy server, storing a downloading state during interruption when the downloading is interrupted, and continuing to download after the interruption is recovered; s6: and the receiving host downloads all the file blocks and combines the file blocks into a complete virtual machine template file. According to the invention, by arranging the proxy server, the plurality of receiving hosts are simultaneously connected with the proxy server to realize simultaneous downloading of the file blocks, so that the transmission bandwidth occupied by downloading of large files is avoided, and the downloading speed is improved; meanwhile, the interruption of downloading is kept, and the downloading can be continued after the downloading is resumed, so that the downloading efficiency is improved.

Description

Method for realizing virtual machine template breakpoint resume issuing through proxy
Technical Field
The invention relates to a file downloading method, in particular to a method for realizing virtual machine template breakpoint resume issuing through an agent.
Background
With the advancement of informatization and the high-speed development of services, higher requirements are placed on the operation efficiency of application deployment, large file issuing, large file transmission and other types, particularly under the conditions of popularization of virtualization and cloud platform application and expansion of application range, new establishment of a virtual machine is necessary operation of service expansion, the traditional virtual machine installation mode is complicated and long in process, the purpose of quickly establishing the virtual machine can be achieved through a virtual machine template, but the size of the virtual machine template file is generally over GB grade, the virtual machine template file is slow in the network transmission process, particularly the network load is heavy in batch transmission, the efficiency is low, and accordingly batch quick issuing of the virtual machine template becomes an important link which is necessary and affects the efficiency.
The traditional transmission modes are as follows: HTTP, FTP, P2P, and the like; HTT is the most traditional way of distribution transfer, mainly using the bandwidth and storage of the server to transfer the distribution files. But is suitable for small files such as web pages and pictures. The timeout of the link and the file size are both limited by default; FTP is a file distribution mode similar to HTTP, and is also distributed by using a server bandwidth, and with the upgrading of HTTP, the application of FTP is less and less. It is also not suitable for large files or simultaneous download of multiple files; the latest mode of P2P is a hybrid P2P, which classifies the user node capability on the basis of a distributed mode and enables some nodes to undertake special tasks;
the above three modes have various limitations such as speed, file size limitation, security and the like, and it is very necessary to provide a method for realizing virtual machine template breakpoint resume issuing through an agent on the premise of ensuring efficiency and security.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for realizing the virtual machine template breakpoint resume issuing through an agent, and the method is used for solving the problem.
The technical scheme adopted by the invention for solving the technical problems is to provide a method for realizing the virtual machine template breakpoint resume issue through an agent, which comprises the following steps: s1: formulating a rule of cutting the template file of the virtual machine into file blocks, a rule of uploading the file blocks to the proxy server and a rule of downloading the file blocks from the proxy server by the receiving host; s2: receiving an instruction of a host computer for initiating downloading of a virtual machine template; s3: the file server cuts the virtual machine template file into file blocks according to the virtual machine template file cutting rule; s4: the file server uploads the cut file blocks to each proxy server, and each proxy server prestores the uploaded file blocks; s5: receiving file blocks downloaded by a host computer on each proxy server, saving a downloading state during interruption when downloading interruption occurs in the downloading process, and continuing downloading the downloading state during interruption after downloading is resumed; s6: and the receiving host machine completes the downloading of all the file blocks, and the file blocks are automatically combined into a complete virtual machine template file in the receiving host machine.
Further, the file server stores original virtual machine template files, the proxy server receives file cut blocks of the virtual machine template files uploaded by the file server, the receiving host is a physical machine which needs to receive the virtual machine template files and deploy virtual machines, and the receiving host completes downloading of the file cut blocks through the proxy server and then combines the file cut blocks into complete virtual machine template files.
Further, the step S1 specifically includes: the method comprises the following steps that a virtual machine template file is cut into file cutting rules, and the virtual machine template file is uniformly cut according to the size of a file; the file cutting block is uploaded to the rules of the proxy servers, and the file cutting blocks are relatively uniformly uploaded to all the proxy servers; and when the number of the receiving hosts is multiple, the receiving hosts alternately download the file blocks from the proxy servers.
Further, in step S3, the file server cuts the virtual machine template file into a plurality of file blocks at fixed size intervals, and each file block has a unique identifier and a block number of the file; in step S6, after the receiving host completes downloading all the file blocks, the receiving host automatically combines the unique identifiers and block number identifiers of the files carried by the file blocks into a complete virtual machine template file.
Further, in step S4, the file server uploads different file chunks to each proxy server in turn, and performs balanced allocation according to the remaining storage space of the proxy server, and each proxy server allocates 60% of a part of the memory space to store the uploaded file chunks.
Further, in step S5, the receiving host performs network authentication with each proxy server, pre-determines a download rate, alternately downloads the file chunks on each proxy server according to a principle that the proxy server with a high download rate preferentially downloads, different receiving hosts download different file chunks on different proxy servers at the same time, and the receiving host preferentially downloads the file chunks stored in the memory of the proxy server; when the downloading is interrupted in the downloading process, the downloading state during the interruption is stored in the database of the proxy server, the downloading state comprises file block information during the interruption and the position mark which is transmitted and completed, and the downloading information before the interruption is loaded and continuously downloaded after the downloading is resumed.
Further, each receiving host acquires the virtual machine template information before the downloaded file is diced, and each receiving host synchronously performs personalized setting on the virtual machine while downloading the file dicing.
Further, when network interruption occurs during the personalized setting of the virtual machine, the personalized setting of the virtual machine is carried out again when the network is recovered.
Compared with the prior art, the invention has the following beneficial effects: the method for realizing the virtual machine template breakpoint resume issuing through the proxy provided by the invention has the advantages that the proxy server is arranged, the virtual machine template file is cut and uploaded, the plurality of receiving hosts are simultaneously connected with the proxy server to realize the simultaneous downloading of the file cut blocks, the transmission bandwidth occupied by the downloading of large files is avoided, and the downloading speed is improved; meanwhile, the interruption of downloading is kept, and the downloading can be continued after the downloading is resumed, so that the downloading efficiency is improved.
Drawings
FIG. 1 is a flowchart of a method for implementing virtual machine template breakpoint resume transmission through an agent according to the present invention;
FIG. 2 is a schematic diagram of a method for implementing virtual machine template breakpoint resume transmission by an agent in the embodiment of the present invention;
fig. 3 is an architecture diagram of a method for implementing virtual machine template breakpoint resume issue by an agent in the embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the figures and examples.
Fig. 1 is a flowchart of a method for implementing virtual machine template breakpoint resume issue through an agent according to the present invention.
Referring to fig. 1, a method for implementing virtual machine template breakpoint resume issue by using an agent according to an embodiment of the present invention includes the following steps:
s1: formulating a rule of cutting the template file of the virtual machine into file blocks, a rule of uploading the file blocks to the proxy server and a rule of downloading the file blocks from the proxy server by the receiving host;
s2: receiving an instruction of a host computer for initiating downloading of a virtual machine template;
s3: the file server cuts the virtual machine template file into file blocks according to the virtual machine template file cutting rule;
s4: the file server uploads the cut file blocks to each proxy server, and each proxy server prestores the uploaded file blocks;
s5: receiving file blocks downloaded by a host computer on each proxy server, saving a downloading state during interruption when downloading interruption occurs in the downloading process, and continuing downloading the downloading state during interruption after downloading is resumed;
s6: and the receiving host machine completes the downloading of all the file blocks, and the file blocks are automatically combined into a complete virtual machine template file in the receiving host machine.
Referring to fig. 2, in the method for implementing breakpoint resume of a virtual machine template by proxy according to the embodiment of the present invention, a file server stores an original virtual machine template file, the proxy server receives a file cut block of the virtual machine template file uploaded by the file server, a receiving host is a physical machine that needs to receive the virtual machine template file and deploy a virtual machine, and the receiving host completes downloading of the file cut block by the proxy server and then combines the file cut block into a complete virtual machine template file.
Specifically, in the method for implementing breakpoint resume and issue of the virtual machine template by proxy according to the embodiment of the present invention, when the virtual machine template file is cut into file chunks, uniform cutting is performed according to the size of the file; the file blocks are relatively uniformly uploaded to all the proxy servers, the receiving hosts download the file blocks from all the proxy servers in turn, and when the number of the receiving hosts is multiple, all the receiving hosts download the file blocks from all the proxy servers in turn. The file server cuts the virtual machine template file into a plurality of file blocks at intervals of a fixed size, and each file block is provided with a unique identifier and a block number of the file; and after the receiving host finishes downloading all the file blocks, the receiving host automatically combines the unique identification and the block number identification of the file carried by the file blocks into a complete virtual machine template file. The file server uploads different file blocks to each proxy server in turn, and performs balanced distribution according to the residual storage space of the proxy servers, and each proxy server distributes 60% of partial memory space to store the uploaded file blocks.
Specifically, in the method for implementing virtual machine template breakpoint resume issuing by proxy according to the embodiment of the present invention, a receiving host and each proxy server perform network verification, predict a download rate, alternately download file chunks on each proxy server according to a principle that a proxy server with a high download rate preferentially downloads, different receiving hosts at the same time download different file chunks on different proxy servers, and the receiving host preferentially downloads file chunks stored in a memory of the proxy server; when the downloading is interrupted in the downloading process, the downloading state during the interruption is stored in the database of the proxy server, the downloading state comprises file block information during the interruption and the position mark which is transmitted and completed, and the downloading information before the interruption is loaded and continuously downloaded after the downloading is resumed.
The method for realizing the virtual machine template breakpoint renewal issue through the proxy also comprises the steps that each receiving host acquires the virtual machine template information before the downloaded file is cut into blocks, and each receiving host synchronously carries out the personalized setting of the virtual machine while downloading the file blocks. When the network is interrupted during the personalized setting of the virtual machine, the personalized setting of the virtual machine is carried out again when the network is recovered.
Referring to fig. 3, a VMware vCenter Server manages a plurality of vspheres, each vSphere is based on a physical machine, and needs to run a plurality of virtual machines on the vSphere, and there are two ways for deploying a new virtual machine in the conventional method, that is: directly uploading a system ISO mirror image, and directly installing by creating an empty virtual machine mounting mirror image; the other mode is that a virtual machine template file prepared in advance through a vCenter is directly deployed into a virtual machine through personalized setting; the former is long in manual operation and time consumption, the latter is simple and convenient to operate and standard in deployment result, but vSphere under vCenter is distributed in a plurality of servers, template transmission time is long, and therefore downloading of virtual machine template files is achieved by a method of achieving breakpoint resume issuing of virtual machine templates through agents, and deployment of virtual machines is conducted simultaneously.
The vCenter is used as a file server, a virtual machine template file is prepared in the vCenter in advance, a plurality of Virtual Machines (VM) are created under the vCenter to serve as proxy servers, and vSphere serves as a receiving host. The vCenter splits a virtual machine template file into file blocks and uploads the file blocks to a proxy server, partial file blocks of a virtual machine template are pre-stored in a memory according to 60% of the memory size of the proxy server, when a plurality of vSpheres initiate an instruction for deploying the virtual machine through the template, the vSpheres alternately download the virtual machine template file blocks and preferentially download the file blocks in the memory, and preferentially acquire virtual machine template information before downloading the template, so that personalized setting of the virtual machine is synchronously performed while the template is downloaded. If network interruption occurs in the process of deploying the virtual machine through the template, the personalized setting of the virtual machine is carried out again when the network is recovered, and the transmission state before the network fault is carried by the rear-end template transmission to continue downloading until the deployment of the virtual machine is completed.
In summary, in the method for implementing breakpoint resume and issue of a virtual machine template by proxy according to the embodiment of the present invention, a proxy server is provided, so as to upload a virtual machine template file in blocks, and a plurality of receiving hosts are simultaneously connected to the proxy server to implement simultaneous downloading of file blocks, thereby avoiding the transmission bandwidth occupied by downloading a large file and increasing the downloading speed; meanwhile, the interruption of downloading is kept, and the downloading can be continued after the downloading is resumed, so that the downloading efficiency is improved.
Although the present invention has been described with respect to the preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (8)

1. A method for realizing virtual machine template breakpoint resume issue through an agent is characterized by comprising the following steps:
s1: formulating a rule of cutting the template file of the virtual machine into file blocks, a rule of uploading the file blocks to the proxy server and a rule of downloading the file blocks from the proxy server by the receiving host;
s2: receiving an instruction of a host computer for initiating downloading of a virtual machine template;
s3: the file server cuts the virtual machine template file into file blocks according to the virtual machine template file cutting rule;
s4: the file server uploads the cut file blocks to each proxy server, and each proxy server prestores the uploaded file blocks;
s5: receiving file blocks downloaded by a host computer on each proxy server, saving a downloading state during interruption when downloading interruption occurs in the downloading process, and continuing downloading the downloading state during interruption after downloading is resumed;
s6: and the receiving host machine completes the downloading of all the file blocks, and the file blocks are automatically combined into a complete virtual machine template file in the receiving host machine.
2. The method for realizing the issue of the breakpoint resume of the virtual machine template through the proxy as claimed in claim 1, wherein the file server stores an original virtual machine template file, the proxy server receives a file cut-off of the virtual machine template file uploaded by the file server, the receiver host is a physical machine which needs to receive the virtual machine template file and deploy a virtual machine, and the receiver host completes the download of the file cut-off through the proxy server and then combines the file cut-off into a complete virtual machine template file.
3. The method for implementing virtual machine template breakpoint resume issue through an agent according to claim 1, wherein the step S1 specifically includes: the method comprises the following steps that a virtual machine template file is cut into file cutting rules, and the virtual machine template file is uniformly cut according to the size of a file; the file cutting block is uploaded to the rules of the proxy servers, and the file cutting blocks are relatively uniformly uploaded to all the proxy servers; and when the number of the receiving hosts is multiple, the receiving hosts alternately download the file blocks from the proxy servers.
4. The method for realizing the issue of the breakpoint resume of the virtual machine template through the agent according to claim 1, wherein in the step S3, the file server cuts the virtual machine template file into a plurality of file blocks according to a fixed size interval, and each file block has a unique identifier and a block number of the file; in step S6, after the receiving host completes downloading all the file blocks, the receiving host automatically combines the unique identifiers and block number identifiers of the files carried by the file blocks into a complete virtual machine template file.
5. The method as claimed in claim 1, wherein in step S4, the file server uploads different file chunks to each proxy server in turn, and performs balanced allocation according to the remaining storage space of the proxy server, and each proxy server allocates 60% of the partial memory space to store the uploaded file chunks.
6. The method for realizing the virtual machine template breakpoint resume transmission through the proxy as claimed in claim 1, wherein in step S5, the receiving host performs network authentication with each proxy server, pre-determines a download rate, alternately downloads the file chunks on each proxy server according to a principle that the proxy server with a high download rate preferentially downloads, different receiving hosts at the same time download different file chunks on different proxy servers, and the receiving host preferentially downloads the file chunks stored in the proxy server memory; when the downloading is interrupted in the downloading process, the downloading state during the interruption is stored in the database of the proxy server, the downloading state comprises file block information during the interruption and the position mark which is transmitted and completed, and the downloading information before the interruption is loaded and continuously downloaded after the downloading is resumed.
7. The method for realizing the issue of the breakpoint resume of the virtual machine template through the agent as claimed in claim 1, further comprising each receiving host obtaining the virtual machine template information before the cutting of the downloaded file, and each receiving host synchronously performing the personalized setting of the virtual machine while the cutting of the downloaded file is performed.
8. The method for realizing the issue of the breakpoint resume of the virtual machine template through the agent as claimed in claim 7, wherein when the network is interrupted during the personalized setting of the virtual machine, the personalized setting of the virtual machine is performed again during the network recovery.
CN201911127951.4A 2019-11-18 2019-11-18 Method for realizing virtual machine template breakpoint resume issuing through proxy Pending CN110855788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911127951.4A CN110855788A (en) 2019-11-18 2019-11-18 Method for realizing virtual machine template breakpoint resume issuing through proxy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911127951.4A CN110855788A (en) 2019-11-18 2019-11-18 Method for realizing virtual machine template breakpoint resume issuing through proxy

Publications (1)

Publication Number Publication Date
CN110855788A true CN110855788A (en) 2020-02-28

Family

ID=69601975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911127951.4A Pending CN110855788A (en) 2019-11-18 2019-11-18 Method for realizing virtual machine template breakpoint resume issuing through proxy

Country Status (1)

Country Link
CN (1) CN110855788A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852307A (en) * 2005-10-10 2006-10-25 华为技术有限公司 Data downloading method
US20070220417A1 (en) * 2006-03-17 2007-09-20 Sonolink Communications Systems, Llc System and method for editing online documents
CN101577730A (en) * 2009-01-15 2009-11-11 传神联合(北京)信息技术有限公司 Method for uploading and downloading files synchronously based on FTP protocol
CN105245569A (en) * 2015-08-31 2016-01-13 上海七牛信息技术有限公司 Breakpoint uploading method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852307A (en) * 2005-10-10 2006-10-25 华为技术有限公司 Data downloading method
US20070220417A1 (en) * 2006-03-17 2007-09-20 Sonolink Communications Systems, Llc System and method for editing online documents
CN101577730A (en) * 2009-01-15 2009-11-11 传神联合(北京)信息技术有限公司 Method for uploading and downloading files synchronously based on FTP protocol
CN105245569A (en) * 2015-08-31 2016-01-13 上海七牛信息技术有限公司 Breakpoint uploading method and system

Similar Documents

Publication Publication Date Title
CN103685368B (en) method and system for migrating data
CN102752137B (en) The apparatus and method of virtual machine network parameter are initiatively set
RU2683630C2 (en) Method for update of nsd network service descriptor and device
CN108089913B (en) Virtual machine deployment method of super-fusion system
KR102499219B1 (en) Interoperable cloud-based media processing using dynamic network interfaces
CN109547509B (en) Cross-platform deployment method and system
CN102945175A (en) Terminal software online upgrading system and method based on cloud computing environment
CN110913015A (en) Distributed quick installation method, system and medium for cloud mobile phone APP
CN103685496A (en) Transmission method and device of file data
CN113709017B (en) Method and device for acquiring virtualization traffic
CN101778132B (en) Method, system and device for network installation based on load balance
CN111124617B (en) Method and device for creating block chain system, storage medium and electronic device
CN106326226A (en) Method and system for starting database service on public cloud
CN104618136B (en) Configuring management method and device for blade server
CN103312489A (en) Method and device for synchronizing terminal and server
CN103220308A (en) Method, device and system for downloading files
US20120122573A1 (en) Apparatus and method for synchronizing virtual machine
CN113923208B (en) Processing method for downloading massive drive test data
CN115499449A (en) Mirror image acceleration system, method and device
CN109240982B (en) File distribution method and system and storage medium
KR101600717B1 (en) Method and apparatus for download virtual machine operating system image
CN110855788A (en) Method for realizing virtual machine template breakpoint resume issuing through proxy
GB2531546A (en) Collaborative maintenance of software programs
WO2013186837A1 (en) Information processing system, method, and program
JP2017050786A (en) Communication device, communication system, and data processing device

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200228

WD01 Invention patent application deemed withdrawn after publication