CN107968794B - Virtual CD-ROM mounting method and system, server and terminal - Google Patents

Virtual CD-ROM mounting method and system, server and terminal Download PDF

Info

Publication number
CN107968794B
CN107968794B CN201610907277.1A CN201610907277A CN107968794B CN 107968794 B CN107968794 B CN 107968794B CN 201610907277 A CN201610907277 A CN 201610907277A CN 107968794 B CN107968794 B CN 107968794B
Authority
CN
China
Prior art keywords
terminal
virtual
mounting
image file
command
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
CN201610907277.1A
Other languages
Chinese (zh)
Other versions
CN107968794A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610907277.1A priority Critical patent/CN107968794B/en
Publication of CN107968794A publication Critical patent/CN107968794A/en
Application granted granted Critical
Publication of CN107968794B publication Critical patent/CN107968794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a virtual CD-ROM mounting method and system, a server and a terminal, which relate to the technical field of computers and are used for solving the problem that in the prior art, when a batch of virtual computers are simultaneously mounted with virtual CD-ROM for upgrading, a large number of virtual computers simultaneously read the same ISO file under an nfs directory, so that a network is blocked, and the virtual computers are suspended. The method comprises the following steps: providing copies of the optical disk image files for terminals corresponding to virtual machines of the virtual CD-ROM to be mounted; and sending a mounting command to the terminal so that the virtual machine mounts a virtual CD-ROM through the CD-ROM image file copied on the corresponding terminal.

Description

Virtual CD-ROM mounting method and system, server and terminal
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and system for mounting a virtual optical drive, a server, and a terminal.
Background
In a virtualized environment, virtual drives are very useful, commonly used equipment devices. The method directly simulates an ISO (optical disk image file) file into an optical drive in a virtual machine, and the virtual machine can directly read the file in the ISO without actually having a physical optical drive. An operating system is installed, a virtual drive can be installed on a virtual machine, and then a virtual machine is logged in by using a VNC (Virtual Network Console ), so that the same experience as that of installing the operating system in a physical machine environment can be achieved. Similarly, to patch an operating system of a virtual machine or upgrade an application software, an ISO-simulated virtual drive may be hung on the virtual machine, and then the upgrade is performed in the virtual machine.
For storing ISO files, NFS (Network File System ) protocol is generally adopted to build a centralized shared ISO library for all virtual machines to access. If a batch of virtual machines are to be upgraded, a batch processing flow can be realized in a virtualized environment, namely, a batch of virtual machines are simultaneously loaded with virtual CD-ROM drives, then instructions are sent to all virtual machines, and the upgrading is executed. This approach has no problem in coping with a small number of virtual machines, and when the number of virtual machines reaches a certain number, the virtual machines hang up. Because the ISO file is stored at the service end of NFS, NFS protocol IO (input output) is not efficient.
Disclosure of Invention
The invention aims to solve the technical problem of providing a virtual CD-ROM mounting method and system, a server and a terminal, which are used for solving the problem that in the prior art, when a virtual CD-ROM is simultaneously mounted on a batch of virtual machines for upgrading, a large number of virtual machines simultaneously read the same ISO file under an nfs directory, so that a network is blocked, and the virtual machines are suspended.
In one aspect, the present invention provides a method for mounting a virtual drive, including: providing copies of the optical disk image files for terminals corresponding to virtual machines of the virtual CD-ROM to be mounted; and sending a mounting command to the terminal so that the virtual machine mounts a virtual CD-ROM through the CD-ROM image file copied on the corresponding terminal.
Optionally, the providing the copy of the optical disc image file to the terminal corresponding to the virtual machine on which the virtual optical drive is to be mounted includes: sending a mounting synchronization request message to a terminal corresponding to a virtual machine of a virtual drive to be mounted; and receiving a mount synchronous response message of the terminal, wherein the mount synchronous response message indicates that the terminal has copied the optical disc image file to the local of the terminal.
Optionally, the sending a mounting command to the terminal, so that the virtual machine mounts a virtual optical drive through the optical disc image file copied on the corresponding terminal, including: and sending a mounting command to the terminal at preset intervals so that a batch of virtual machines on the terminal can mount a virtual CD-ROM through the CD-ROM image files copied on the corresponding terminal.
Optionally, the number of the virtual machines in the batch is 2 to 20.
Further, after the sending the mount command to the virtual machine, the method further includes: and sending a virtual machine upgrading command to the terminal, wherein the virtual machine upgrading command carries the position parameters and upgrading parameters of an upgrading program in the optical disc image file, so that the virtual machine on the terminal is upgraded by utilizing the optical disc image file copied on the corresponding terminal.
On the other hand, the invention also provides a virtual CD-ROM mounting method, which comprises the following steps: copying a preset optical disc image file to a terminal local according to the indication of the server; receiving a mounting command from the server; and according to the mounting command, mounting the virtual CD-ROM through the CD mirror image file copied to the local terminal.
Optionally, copying the preset optical disc image file to the terminal local according to the instruction of the server includes: receiving a mount synchronization request message from the server; copying the preset optical disc image file indicated by the mounting synchronization request message to a terminal local.
Further, after the virtual drive is mounted by copying the mounting command to the local optical disk image file of the terminal, the method further includes: receiving an upgrade command from the server, wherein the upgrade command carries a position parameter and an upgrade parameter of an upgrade program in the optical disc image file; and according to the upgrading command, upgrading by using the optical disk image file copied on the corresponding terminal.
In another aspect, the present invention further provides a server, including: the copy providing unit is used for providing copies of the optical disk image files for terminals corresponding to the virtual machines of the virtual CD-ROM to be mounted; and the sending unit is used for sending a mounting command to the terminal so that the virtual machine mounts a virtual CD-ROM through the CD mirror image file copied on the corresponding terminal.
Optionally, the copy providing unit includes: the synchronous request module is used for sending a mounting synchronous request message to a terminal corresponding to a virtual machine of the virtual drive to be mounted; and the synchronous receiving module is used for receiving a mounting synchronous response message of the terminal, wherein the mounting synchronous response message indicates that the terminal has copied the optical disc image file to the local of the terminal.
Optionally, the synchronization request module is specifically configured to: and sending a mounting command to the terminal at preset intervals so that a batch of virtual machines on the terminal can mount a virtual CD-ROM through the CD-ROM image files copied on the corresponding terminal.
Further, the server further includes: and the upgrade command unit is used for sending a virtual machine upgrade command to the terminal after sending the mounting command to the terminal, wherein the virtual machine upgrade command carries the position parameter and the upgrade parameter of the upgrade program in the optical disc image file so that the virtual machine on the terminal can be upgraded by using the optical disc image file copied on the corresponding terminal.
In another aspect, the present invention further provides a terminal, including: the copying unit is used for copying the preset optical disc image file to the local terminal according to the instruction of the server; the receiving unit is used for receiving the mounting command from the server; and the mounting unit is used for mounting the virtual CD-ROM through copying the CD mirror image file local to the terminal according to the mounting command.
Optionally, the copy unit includes: the receiving module is used for receiving the mounting synchronization request message from the server; and the copying module is used for copying the preset optical disc image file indicated by the mounting synchronization request message received by the receiving module to the local terminal.
Optionally, the terminal further includes an upgrade unit, configured to: after a virtual CD-ROM is mounted through a CD image file copied to the local terminal according to the mounting command, receiving an upgrading command from the server, wherein the upgrading command carries position parameters and upgrading parameters of an upgrading program in the CD image file; and according to the upgrading command, upgrading by using the optical disk image file copied on the corresponding terminal.
On the other hand, the invention also provides a virtual machine management system, which comprises any server provided by the invention and at least one any terminal provided by the invention.
The virtual drive mounting method, the system, the server and the terminal provided by the embodiment of the invention can provide the copy of the optical disk image file for the terminal corresponding to the virtual machine of the virtual drive to be mounted, and then send the mounting command to the terminal so that the virtual machine mounts the virtual drive through the optical disk image file copied on the corresponding terminal. In this way, since the optical disc image file is stored locally at the terminal and is not accessed remotely through the NFS protocol, the IO efficiency is consistent with reading from and writing to the local hard disk, and no network overhead exists. Meanwhile, as the virtual machines are distributed on each terminal to run, each terminal is provided with a copy file of an optical disc image file, and each virtual machine can read data nearby, so that the batch operation efficiency of the virtual machines is further improved.
Drawings
FIG. 1 is a flowchart of a method for mounting a virtual drive according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for mounting a virtual drive according to an embodiment of the present invention;
FIG. 3 is a flow chart of ISO file synchronization to a host in an embodiment of the invention;
FIG. 4 is a flowchart of a batch-mounted virtual drive according to an embodiment of the present invention;
FIG. 5 is a flow chart of a virtual machine component upgrade in an embodiment of the present invention;
FIG. 6 is a detailed flowchart of a method for mounting a virtual drive according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a server according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, an embodiment of the present invention provides a virtual drive mounting method, which includes:
s11, copying an optical disk mirror image file to a terminal corresponding to a virtual machine of a virtual CD-ROM to be mounted;
and S12, sending a mounting command to the terminal so that the virtual machine mounts a virtual CD-ROM through the CD mirror image file copied on the corresponding terminal.
The virtual drive mounting method provided by the embodiment of the invention can provide the copy of the optical disk image file for the terminal corresponding to the virtual machine of the virtual drive to be mounted, and then send the mounting command to the terminal so that the virtual machine mounts the virtual drive through the optical disk image file copied on the corresponding terminal. In this way, since the optical disc image file is stored locally at the terminal and is not accessed remotely through the NFS protocol, the IO efficiency is consistent with reading from and writing to the local hard disk, and no network overhead exists. Meanwhile, as the virtual machines are distributed on each terminal to run, each terminal is provided with a copy file of an optical disc image file, and each virtual machine can read data nearby, so that the batch operation efficiency of the virtual machines is further improved.
Specifically, in step S11, providing a copy of the optical disc image file to the terminal corresponding to the virtual machine on which the virtual optical disc drive is to be mounted includes:
sending a mounting synchronization request message to a terminal corresponding to a virtual machine of a virtual drive to be mounted;
and receiving a mount synchronous response message of the terminal, wherein the mount synchronous response message indicates that the terminal has copied the optical disc image file to the local of the terminal.
Alternatively, the optical disc image file may be stored locally on the server or on another remote node. When a plurality of virtual machines need to be loaded with CD-ROM drive for upgrading, a user can select a terminal corresponding to the virtual machine needing to be upgraded and a CD image file which specifically needs to be loaded with upgrading from a server side. The server may send a mount synchronization request message to the terminal according to the user instruction, instructing the terminal to copy the corresponding optical disc image file to the local terminal. When receiving the synchronous response message from the terminal, the server can know that the optical disc image file has been copied to the local terminal.
For example, in one embodiment of the present invention, the user may click the "ISO synchronize to terminal" button on the operation page to enter the synchronization page, and select, from the list of managed terminals, the terminal where the virtual machine on which the optical disc drive needs to be mounted is located, and optionally, may select all terminals, or may select some terminals. Then select the optical disc image file (ISO file) to be upgraded, assuming that the selected file is update.
Optionally, in another embodiment of the present invention, some ISO files may be pre-designated as default mount and upgrade components, so that the default files are directly mounted and upgraded without file selection. For example, if the file "default upgrade component" flag bit is 1, the file is the default upgrade component.
Since there may be a lot of virtual machines that need to be installed and upgraded, in order to avoid the problem caused by concurrently executing the installation of the virtual drive, in the file copying process of step S11, the file copying process may be performed on the terminal in batches according to a certain time interval and a certain number of restrictions. For example, a time interval, such as 10 seconds, may be set, each of which initiates a mount synchronization request message to one terminal. The mount synchronization request message for N terminals may also be initiated simultaneously, N may default to 3, for example, and one synchronization is completed and a new host synchronization is initiated. Only N synchronization requests are being processed at the same time.
Specifically, in step S12, sending the mount command to the terminal includes: and sending a mounting command to the terminal at preset intervals so that a batch of virtual machines on the terminal can mount a virtual CD-ROM through the CD-ROM image files copied on the corresponding terminal. Alternatively, the preset time of the interval may be adjusted according to the specific situation, for example, may be 2 seconds to 20 seconds, and the number of the virtual machines in a batch may be 2 to 20, for example.
Further, after sending the mounting command to the terminal, the method for mounting the virtual drive provided by the invention may further include:
and sending a virtual machine upgrading command to the terminal, wherein the virtual machine upgrading command carries the position parameters and upgrading parameters of an upgrading program in the optical disc image file, so that the virtual machine on the terminal is upgraded by utilizing the optical disc image file copied on the corresponding terminal.
For example, the user may click on the "component upgrade" button on the operations page to enter the batch of component upgrade pages. The virtual machine list is selected, and all virtual machines or part of virtual machines can be selected. Clicking the upgrade button to start executing the task. Alternatively, an upgrade command may be issued at 10 requests per second, indicating the location and parameters of the upgrade program in the ISO.
Correspondingly, as shown in fig. 2, an embodiment of the present invention further provides a virtual drive mounting method, which includes:
s21, copying a preset optical disc image file to a terminal local according to the instruction of the server;
s22, receiving a mounting command from the server;
s23, according to the mounting command, mounting a virtual CD-ROM through copying to a CD mirror image file of the local terminal.
The virtual CD-ROM mounting method provided by the embodiment of the invention can copy the preset CD-ROM image file to the local of the terminal according to the indication of the server, receive the mounting command from the server, and mount the virtual CD-ROM through the CD-ROM image file copied to the local of the terminal according to the mounting command. In this way, since the optical disc image file is stored locally at the terminal and is not accessed remotely through the NFS protocol, the IO efficiency is consistent with reading from and writing to the local hard disk, and no network overhead exists. Meanwhile, as the virtual machines are distributed on each terminal to run, each terminal is provided with a copy file of an optical disc image file, and each virtual machine can read data nearby, so that the batch operation efficiency of the virtual machines is further improved.
Specifically, in step S21, copying the preset optical disc image file to the terminal local according to the instruction of the server may include:
receiving a mount synchronization request message from the server;
copying the preset optical disc image file indicated by the mounting synchronization request message to a terminal local.
For example, the mount synchronization message may carry a terminal identifier, a virtual machine identifier, and an identifier of an optical disc image file to be mounted, and after receiving the mount synchronization request message, the terminal may copy a corresponding file to a local area and send a mount synchronization response message to the server.
Further, after the virtual optical disk drive is mounted by copying the optical disk image file local to the terminal according to the mounting command, the method for mounting the virtual optical disk drive provided by the invention may further include:
receiving an upgrade command from the server, wherein the upgrade command carries a position parameter and an upgrade parameter of an upgrade program in the optical disc image file;
and according to the upgrading command, upgrading by using the optical disk image file copied on the corresponding terminal.
Because the ISO file is stored in the local directory of the terminal and is not accessed remotely through the NFS protocol, IO efficiency is consistent with reading and writing the local hard disk, and network overhead does not exist. Meanwhile, because the virtual machines are distributed on each host machine to run, each host machine is provided with an ISO copy file, and each virtual machine can read data nearby, so that the batch operation efficiency of the virtual machines is further improved.
The virtual machine mounting method provided by the invention is explained in detail below through a specific embodiment.
First, a simple explanation is made in a virtualized environment based on a virtual machine mounting method. In this embodiment, the virtualized environment may include the following modules: the virtualization management center is a center of the whole virtualization environment and is used for managing and scheduling all resources; the operation center provides viewing of all resources, execution of tasks, retrieval of logs and access in a mode; a host, which is a provider of virtual machine resources, such as a CPU, MEM, which is also a carrier of virtual machine operations; the host agent module runs on a host and executes instructions of the virtualization management center; virtual machines, namely virtual machines used by users; the virtual machine proxy module runs in the virtual machine, and after the operating system of the virtual machine is installed, the virtual machine proxy module is installed and used for communicating with the host machine proxy module; a management repository providing a spatial storage ISO file, and a configuration file for the virtual machine; the mirror image storage library is used for storing mirror image files of the virtual machine.
The management repository is generally integrated with the virtualization management center and deployed on the same server. The directory that manages the repository is published as NFS directory, and all hosts mount the path. The ISO files are stored in the management storage library, and all hosts can access the ISO files, so that the sharing purpose of one file and multiple uses is achieved.
As shown in fig. 3, synchronizing an ISO file to a host may include the steps of:
101, clicking an ISO sync to host button on the page of the operation center, and entering a sync page.
102, a list of hosts is selected first, and all hosts, or part of hosts, may be selected. Then, an ISO file to be upgraded is selected, the update is assumed, a default upgrading component flag bit is set to be 1, a host synchronization flag bit is set to be 1, an original file path is reserved, a new catalog is set to be/home/localdateiso/, and the catalog is a host local catalog.
103, selecting a synchronization strategy, wherein the optional synchronization strategies are 'time interval synchronization' and 'number synchronization'.
"time interval synchronization" refers to setting a time interval, such as 10 seconds, to initiate a synchronization request to a host.
"number-by-number synchronization" means that synchronization is initiated for N hosts simultaneously, N defaults to 3, one synchronization is completed and a new host synchronization is initiated. Only N synchronization requests are being processed at the same time.
104, issuing a host synchronization request according to the synchronization strategy. The request is sent by the operation center to the virtualization management center and then issued to the host agent.
105, the host agent performs an ISO sync to host operation, copying ISO files from the management repository to/under the host local directory/home/localdataiso, which was created first if not present, the new path for the files being/home/localdataiso/update.
And 106, the host agent performs task completion, returns a response to the virtualization management center, and returns the response to the operation center.
107, the operation center receives the response and displays the execution result on the interface.
FIG. 4 is a process of batch mounting of virtual drives, which may include the following steps:
201, clicking a batch mount ISO button on a page of an operation center to enter a batch mount virtual CD driver page.
202, selecting a virtual machine list first, and selecting all virtual machines or part of virtual machines. Then an ISO file is selected, if not, the ISO file with the "default upgrade component" flag bit of 1 set will become the ISO file for this upgrade default mount. Other ISO files may also be reselected.
203, because there are many virtual machines, concurrently executing the virtual drive mount may cause performance problems. The strategy employed here is to perform the mounting tasks batch by batch at intervals. A time interval T needs to be set, for example t=3 seconds. The number of tasks per batch N needs to be set, for example n=10.
204, the operation center issues task requests to the virtualization management center at intervals.
205, for each virtual machine, the virtualization management center queries whether it owns the optical drive. If there is no optical drive, go to 206; if an optical drive is present, 207 is entered.
206, if the virtual machine does not have a virtual drive, executing a new drive request, wherein the file path of the new drive points to the selected ISO file path in 202. If the "host sync flag" of the ISO file is 1, the ISO file uses its new path local to the host, otherwise it uses its original path.
207, if the virtual machine has a virtual drive, a request for replacing the drive is executed, and the file path of the drive is directed to the ISO file path selected in 202. If the "host sync flag" of the ISO file is 1, the ISO file uses its new path local to the host, otherwise it uses its original path.
Fig. 5 is a virtual machine component upgrade process that may include the steps of:
301, click on the "component upgrade" button on the page of the operation center, enter the batch of component upgrade pages. The virtual machine list is selected, and all virtual machines or part of virtual machines can be selected. Clicking the upgrade button to start executing the task.
The operation center issues tasks to the virtualization management center, and the tasks are issued according to 10 requests per second by default. The task request carries an upgrade command CMD, which indicates the location and parameters of the upgrade program in ISO.
302, the virtualization management center sends the request to the host agent.
303, the host agent sends a command to the virtual machine agent in the virtual machine.
304, the virtual machine agent executes the command to start upgrading. At this time, the ISO file is stored in the local directory of the host, but not remotely accessed through the NFS protocol before, so that the IO efficiency is consistent with that of reading and writing to the local hard disk, and no network overhead exists. Meanwhile, because the virtual machines are distributed and run on the hosts, each host has an ISO copy file, and each virtual machine can read data nearby.
The upgrade is completed 305 and the virtual machine agent returns a response to the host agent.
306, the host agent returns a response to the virtualization management center.
307, the virtualization management center sends a response to the operation center. The operation center updates the upgrading progress on the interface to be completed.
FIG. 6 is a detailed flow chart of the virtual drive mounting method, which may include the following steps:
401 iso synchronizes to the host. The detailed description is that of fig. 3, supra.
402, a virtual drive is mounted in batch. The detailed description is that of fig. 4, supra.
403, starting the virtual machines in batches.
The upgrade of the application software needs to be executed in the virtual machine running state.
On the page of the operation center, selecting a virtual machine list, and selecting a filtering condition of 'not running virtual machines', wherein all virtual machines in a closed state can be filtered, and all virtual machines or part of virtual machines can be selected. Clicking the batch start button to execute the task.
The start-up of the virtual machine also needs to avoid too many tasks being concurrent. Here, the start-up tasks are performed batch by batch at time intervals by default. A time interval T needs to be set, for example t=3 seconds. The number of tasks per batch N needs to be set, for example n=10.
404, batch component upgrades. The detailed description is that of fig. 5, supra.
405, the batch virtual drive is empty.
After the upgrade is completed, the content of the virtual drive mounted on the virtual machine is not useful any more, and is set as an empty drive. The problem of virtual machine starting failure caused by the deletion of the ISO file can be prevented, and the trouble of unknown content brought to a user can be avoided. The steps are performed as described in fig. 4.
On the other hand, as shown in fig. 7, an embodiment of the present invention further provides a server, including:
a copy providing unit 71, configured to provide a copy of an optical disc image file to a terminal corresponding to a virtual machine on which a virtual optical drive is to be mounted;
and the sending unit 72 is configured to send a mounting command to the terminal, so that the virtual machine mounts a virtual drive through the optical disc image file copied on the corresponding terminal.
The server provided by the embodiment of the invention can provide the copy of the optical disk image file for the terminal corresponding to the virtual machine of the virtual CD-ROM to be mounted, and then send the mounting command to the terminal so that the virtual machine mounts the virtual CD-ROM through the optical disk image file copied on the corresponding terminal. In this way, since the optical disc image file is stored locally at the terminal and is not accessed remotely through the NFS protocol, the IO efficiency is consistent with reading from and writing to the local hard disk, and no network overhead exists. Meanwhile, as the virtual machines are distributed on each terminal to run, each terminal is provided with a copy file of an optical disc image file, and each virtual machine can read data nearby, so that the batch operation efficiency of the virtual machines is further improved.
Alternatively, the copy providing unit 71 may include:
the synchronous request module is used for sending a mounting synchronous request message to a terminal corresponding to a virtual machine of the virtual drive to be mounted;
and the synchronous receiving module is used for receiving a mounting synchronous response message of the terminal, wherein the mounting synchronous response message indicates that the terminal has copied the optical disc image file to the local of the terminal.
Optionally, the synchronization request module may specifically be configured to: and sending a mounting command to the terminal at preset intervals so that a batch of virtual machines on the terminal can mount a virtual CD-ROM through the CD-ROM image files copied on the corresponding terminal.
Further, the server may further include: and the upgrade command unit is used for sending a virtual machine upgrade command to the terminal after sending the mounting command to the terminal, wherein the virtual machine upgrade command carries the position parameter and the upgrade parameter of the upgrade program in the optical disc image file so that the virtual machine on the terminal can be upgraded by using the optical disc image file copied on the corresponding terminal.
Correspondingly, as shown in fig. 8, an embodiment of the present invention further provides a terminal, including:
a copying unit 81, configured to copy, according to an instruction from the server, a preset optical disc image file to a local terminal;
a receiving unit 82, configured to receive a mount command from the server;
and the mounting unit 83 is configured to mount the virtual optical drive according to the mounting command by copying to the optical disc image file local to the terminal.
The terminal provided by the embodiment of the invention can copy the preset optical disk image file to the local of the terminal according to the indication of the server, receive the mounting command from the server, and mount the virtual CD-ROM through copying the optical disk image file to the local of the terminal according to the mounting command. In this way, since the optical disc image file is stored locally at the terminal and is not accessed remotely through the NFS protocol, the IO efficiency is consistent with reading from and writing to the local hard disk, and no network overhead exists. Meanwhile, as the virtual machines are distributed on each terminal to run, each terminal is provided with a copy file of an optical disc image file, and each virtual machine can read data nearby, so that the batch operation efficiency of the virtual machines is further improved.
Optionally, the copy unit 81 may include:
the receiving module is used for receiving the mounting synchronization request message from the server;
and the copying module is used for copying the preset optical disc image file indicated by the mounting synchronization request message received by the receiving module to the local terminal.
Further, the terminal may further include an upgrade unit, configured to:
after a virtual CD-ROM is mounted through a CD image file copied to the local terminal according to the mounting command, receiving an upgrading command from the server, wherein the upgrading command carries position parameters and upgrading parameters of an upgrading program in the CD image file;
and according to the upgrading command, upgrading by using the optical disk image file copied on the corresponding terminal.
Correspondingly, the embodiment of the present invention further provides a virtual machine management system, which includes any one of the servers provided in the foregoing embodiment and at least one of the terminals provided in the foregoing embodiment, so that corresponding technical effects can also be achieved, and the foregoing details are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (5)

1. The virtual CD-ROM mounting method is characterized by being applied to a terminal and comprising the following steps:
copying a preset optical disc image file to a terminal local according to the indication of the server; comprising the following steps: receiving a mount synchronization request message from the server; copying the preset optical disc image file indicated by the mounting synchronization request message to a terminal local;
receiving a mounting command from the server;
according to the mounting command, mounting a virtual CD-ROM through copying to a CD mirror image file of the local terminal;
the terminal is provided with a virtualized environment, the virtualized environment comprises a management storage library, the management storage library is used for storing the preset optical disc image files, and the catalogue of the management storage library is published in an NFS catalogue.
2. The method of claim 1, wherein after the virtual drive is mounted by copying to the disc image file local to the terminal according to the mounting command, the method further comprises:
receiving an upgrade command from the server, wherein the upgrade command carries a position parameter and an upgrade parameter of an upgrade program in the optical disc image file;
and according to the upgrading command, upgrading by using the optical disk image file copied on the corresponding terminal.
3. A terminal, comprising:
the copying unit is used for copying the preset optical disc image file to the local terminal according to the instruction of the server; the copy unit includes: the receiving module is used for receiving the mounting synchronization request message from the server; the copying module is used for copying the preset optical disc image file indicated by the mounting synchronization request message received by the receiving module to the local terminal;
the receiving unit is used for receiving the mounting command from the server;
the mounting unit is used for mounting the virtual CD-ROM through copying the CD mirror image file of the local terminal according to the mounting command;
the terminal is provided with a virtualized environment, the virtualized environment comprises a management storage library, the management storage library is used for storing the preset optical disc image files, and the catalogue of the management storage library is published in an NFS catalogue.
4. A terminal according to claim 3, further comprising an upgrade unit for:
after a virtual CD-ROM is mounted through a CD image file copied to the local terminal according to the mounting command, receiving an upgrading command from the server, wherein the upgrading command carries position parameters and upgrading parameters of an upgrading program in the CD image file;
and according to the upgrading command, upgrading by using the optical disk image file copied on the corresponding terminal.
5. A virtual machine management system comprising at least one terminal according to claim 3 or 4.
CN201610907277.1A 2016-10-18 2016-10-18 Virtual CD-ROM mounting method and system, server and terminal Active CN107968794B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610907277.1A CN107968794B (en) 2016-10-18 2016-10-18 Virtual CD-ROM mounting method and system, server and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610907277.1A CN107968794B (en) 2016-10-18 2016-10-18 Virtual CD-ROM mounting method and system, server and terminal

Publications (2)

Publication Number Publication Date
CN107968794A CN107968794A (en) 2018-04-27
CN107968794B true CN107968794B (en) 2023-05-12

Family

ID=61996946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610907277.1A Active CN107968794B (en) 2016-10-18 2016-10-18 Virtual CD-ROM mounting method and system, server and terminal

Country Status (1)

Country Link
CN (1) CN107968794B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874232B (en) * 2018-09-04 2023-12-29 中兴通讯股份有限公司 Virtual machine component upgrading method, equipment and computer readable storage medium
CN112817644A (en) * 2021-01-20 2021-05-18 浪潮电子信息产业股份有限公司 Virtual CD driver generation method, device and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530144A (en) * 2013-09-04 2014-01-22 国云科技股份有限公司 Method for generating virtual machine images from legacy system
CN105278999A (en) * 2015-11-19 2016-01-27 国云科技股份有限公司 Safe and efficient method for deploying virtual machine software
CN107463467A (en) * 2017-08-24 2017-12-12 浪潮(北京)电子信息产业有限公司 A kind of method and system that can quickly reduce virtual platform

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033755A (en) * 2009-09-30 2011-04-27 国际商业机器公司 Method and system for running virtual machine mirror image
US9053339B2 (en) * 2010-10-27 2015-06-09 Hytrust, Inc. System and method for secure storage of virtual machines
CN102629941B (en) * 2012-03-20 2014-12-31 武汉邮电科学研究院 Caching method of a virtual machine mirror image in cloud computing system
CN103473065A (en) * 2013-09-18 2013-12-25 国云科技股份有限公司 Virtual machine creation method capable of rapidly restoring system disk
CN104102527A (en) * 2014-07-10 2014-10-15 国云科技股份有限公司 Method for updating software of virtual machine
US20160019117A1 (en) * 2014-07-16 2016-01-21 Commvault Systems, Inc. Creating customized bootable image for client computing device from backup copy
CN104199683B (en) * 2014-08-07 2017-10-17 新华三技术有限公司 A kind of ISO image files loading method and equipment
CN104333603A (en) * 2014-11-18 2015-02-04 武汉噢易云计算有限公司 System and method for implementing file uploading to virtual machines

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530144A (en) * 2013-09-04 2014-01-22 国云科技股份有限公司 Method for generating virtual machine images from legacy system
CN105278999A (en) * 2015-11-19 2016-01-27 国云科技股份有限公司 Safe and efficient method for deploying virtual machine software
CN107463467A (en) * 2017-08-24 2017-12-12 浪潮(北京)电子信息产业有限公司 A kind of method and system that can quickly reduce virtual platform

Also Published As

Publication number Publication date
CN107968794A (en) 2018-04-27

Similar Documents

Publication Publication Date Title
CN111338854B (en) Kubernetes cluster-based method and system for quickly recovering data
US8997090B2 (en) Installing an operating system in a host system
KR101970839B1 (en) Replaying jobs at a secondary location of a service
US6189051B1 (en) System and method for manufacturing hard disk master by downloading selected programs and drivers from a host through a network
CN102591679B (en) Quick application software arrangement method for cluster system
CN111176669B (en) Installation starting method of cloud application, cloud streaming server and storage server
EP2696532A2 (en) Method, server and system for starting application
EP3518099B1 (en) Installation of operating system
US20100325624A1 (en) Method and System for Application Portability
CN108089913B (en) Virtual machine deployment method of super-fusion system
EP2907023A1 (en) Performing reboot cycles, a reboot schedule on on-demand rebooting
CN101187878A (en) System and method for application execution allowable for storing in external drive
US20040221146A1 (en) Build time dynamic installation of drivers on cloned systems
CN104394223A (en) Automatic rapid deployment method of large-scale computer cluster system nodes
WO2017185954A1 (en) Method, host, and system for implementing usb device management
WO2019196705A1 (en) Physical-to-virtual migration method and apparatus, and storage medium
CN103049295A (en) Network installation method for Linux operating systems with godson platforms
US20140109089A1 (en) System to rebuild difference virtual hard disk for updating operation system and method thereof
CN107800580B (en) Method, server and system for monitoring installation state of large-batch operating systems
CN102360299B (en) Software system resetting method, server and client
CN110134489B (en) Application migration method, device, system, storage medium and application cloud application tool
CN107968794B (en) Virtual CD-ROM mounting method and system, server and terminal
CN115357198B (en) Mounting method and device of storage volume, storage medium and electronic equipment
CN111124598A (en) Virtual desktop software management method and system
CN102281326A (en) Data automatically synchronizing and updating method based on WEB server procedures

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
GR01 Patent grant
GR01 Patent grant