WO2018094649A1 - Procédé d'acquisition de données pendant le démarrage d'une machine virtuelle et système informatique en nuage - Google Patents

Procédé d'acquisition de données pendant le démarrage d'une machine virtuelle et système informatique en nuage Download PDF

Info

Publication number
WO2018094649A1
WO2018094649A1 PCT/CN2016/107112 CN2016107112W WO2018094649A1 WO 2018094649 A1 WO2018094649 A1 WO 2018094649A1 CN 2016107112 W CN2016107112 W CN 2016107112W WO 2018094649 A1 WO2018094649 A1 WO 2018094649A1
Authority
WO
WIPO (PCT)
Prior art keywords
read
data block
virtual machine
data
operating system
Prior art date
Application number
PCT/CN2016/107112
Other languages
English (en)
Chinese (zh)
Inventor
邬肖元
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201680003333.7A priority Critical patent/CN108475201B/zh
Priority to PCT/CN2016/107112 priority patent/WO2018094649A1/fr
Publication of WO2018094649A1 publication Critical patent/WO2018094649A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present invention relates to the field of computer virtualization technologies, and in particular, to a data acquisition method and a cloud computing system in a virtual machine startup process.
  • cloud computing systems can provide services to enterprises in all walks of life. Because corporate activities tend to have seasonal changes, such as retail e-commerce seasonal promotions, a large amount of computing resources are needed in a short period of time. This means that customers need to quickly deploy a large number of virtual machines when they need them. When the business volume drops, they need to release resources such as redundant virtual machines to save money.
  • the automatic creation and startup of virtual machines according to requirements is the key technology for cloud computing systems to meet user needs.
  • the embodiment of the present invention discloses a method for acquiring data in a virtual machine startup process and a cloud computing system, and storing necessary data of an operating system that needs to be read when the virtual machine is started in the cache area, in the startup process.
  • the necessary data of the operating system is obtained from the cache area, thereby saving the time required for the virtual machine to start, and realizing the rapid startup of the virtual machine in the cloud computing system.
  • the present application provides a data acquisition method in a virtual machine startup process, where the method is applied to a cloud computing system, where the cloud computing system includes a server and a second storage device, and the second storage device is a mirror storage device.
  • the device runs the virtualization platform on the server.
  • the method includes the following steps: the virtual disk driver of the virtualization platform receives the read data request sent by the virtual machine; and the virtual disk driver determines whether the cache area needs to be read according to the read data request.
  • the buffer area is configured to store necessary data used by the operating system that the virtual machine needs to read to start the virtual machine; if the data block to be read is stored in the buffer area, the virtual disk The driver reads the data block to be read from the buffer area and returns the virtual machine; if the data block to be read is not stored in the buffer area, the virtual disk driver requests according to the read data Locating the data block to be read in the second storage device, and returning the searched data block to be read to the virtual machine.
  • the virtual machine stores the necessary data of the operating system that needs to be read when the virtual machine is started in the cache area, and can obtain the operation of starting the required reading in the cache area.
  • the necessary data of the system greatly saves the time required for the virtual machine to start.
  • the method further includes: if the data block to be read found in the second storage device is used by the operating system The necessary data of the virtual machine is started, and the virtual disk drive writes the found data block into the buffer area.
  • the data that the operating system found in the second storage device is used for starting the virtual machine during the startup of the virtual machine is the necessary data used by the operating system to start the virtual machine, and the necessary data is stored in the cache area as virtual data, so that When the same type of virtual machine is started, the necessary data of the operating system for starting the virtual machine can be read into the cache area, and the second storage device is not required to be read, which greatly saves the virtual machine startup. time.
  • the second aspect is In an implementation manner, the method further includes: the read data request carries a first virtual disk identifier, a size value of the data block to be read, and an offset of the data block to be read, where the first virtual disk A virtual disk allocated for the virtual machine in the first storage device.
  • the virtual disk drive searches for the first operating system identifier corresponding to the first virtual disk identifier according to the correspondence between the virtual disk identifier and the operating system identifier, where the first operating system identifier is an identifier of the operating system that the virtual machine needs to be installed. .
  • the virtual disk drive determines, according to the read data request, whether the data block to be read is stored in the buffer area, specifically: the virtual disk drive according to the first operating system identifier, the size value of the data block to be read, and the requirement
  • the offset of the read data block determines whether the data block to be read is stored in the buffer area.
  • the virtual disk drive searches for the data block to be read in the second storage device according to the read data request, specifically: when there is no storage in the buffer area, the data block needs to be read.
  • the virtual disk drive searches for the data to be read in the second storage device according to the first operating system identifier, the size value of the data block to be read, and the offset of the data block to be read. Piece.
  • the virtual disk drive searches for the first operating system identifier corresponding to the first virtual disk identifier in the read data request, and may be based on the first operating system identifier, the size value of the data block to be read, and the offset of the data block to be read.
  • the quantity is searched in the buffer area for data to be read; if the data to be read is not stored in the buffer area, the virtual disk drive is based on the first operating system identifier, the size value of the data block to be read, and the quantity to be read. Offset of the data block to the second storage device to find the data to be read without first reading the data of the first operating system in the second storage device to the first virtual disk in advance, thereby greatly speeding up the virtual machine The speed of startup.
  • the first operating system identifier is an operating system virtual disk of the virtual machine template corresponding to the virtual machine Logo.
  • the virtual disk drive can be based on the An operating system identifier, a size value of the data block to be read, and an offset of the data block to be read are searched for data to be read in the second storage device, and the identifier is not converted.
  • the necessary data that is used by the operating system to start the virtual machine is that the virtual machine is in startup
  • the data of the operating system that has been read in the state, the startup completion state includes: the number of data of the operating system written in the buffer area is greater than a predetermined number, and the CPU usage of the virtual machine is less than a predetermined The threshold, or the number of operation requests by the virtual disk drive to receive the virtual machine to read and write a non-operating system virtual disk exceeds a predetermined threshold.
  • the data of the operating system that is read when the virtual machine is in the startup completion state is the necessary data of the operating system, which can greatly reduce the data that the virtual machine needs to read at startup, and saves the time taken for the virtual machine to start.
  • the method further includes The following steps:
  • the virtual disk drive writes the data block to be read to the first virtual disk.
  • the virtual disk drive writes unnecessary data of the operating system to the first virtual disk.
  • the cache The zone is located in the server or in the first storage device.
  • the necessary data for the operating system to start the virtual machine is stored in the cache.
  • the virtual machine can quickly read the necessary data of the operating system required for booting from the server.
  • the buffer area may also be divided in the first storage device, and the virtual machine is started. It is also possible to quickly read the necessary data of the operating system required for booting from the first storage device.
  • the virtual disk drive uses a buffering linked list to record the data block written in the buffer area.
  • the method further includes: recording, by the description object corresponding to the buffer linked list of the operating system, the found The size value of the data block and the offset of the data block, and the address in which the searched data block is saved in the buffer area is saved to the last description object of the buffer linked list corresponding to the operating system.
  • the embodiment of the present invention provides a server for acquiring data during a virtual machine startup process, where the server is connected to the second storage device, and the second storage device is a mirror storage device, wherein the server includes a processor and processes The device runs a virtualization platform, and the virtualized platform runs a virtual disk drive.
  • the virtual disk driver is configured to: receive a read data request of the virtual machine; and determine, according to the read data request, whether the data block to be read is stored in the cache area,
  • the cache area is used to store necessary data of an operating system that the virtual machine needs to read for starting the virtual machine; the necessary data is data of the operating system that is read when the virtual machine is in a startup completion state;
  • the data block to be read is stored, the data block to be read is read from the buffer area and returned to the virtual machine; when there is no data block to be read stored in the buffer area, according to the read data request
  • the data block to be read is searched in the second storage device, and the found data block to be read is returned to the virtual machine.
  • the server provided by the embodiment of the present invention stores the necessary data of the operating system that needs to be read when the virtual machine is started in the cache area, and the virtual machine can obtain the operating system in the cache area during the startup process.
  • the necessary data greatly saves the time it takes for the virtual machine to start.
  • the virtual disk drive is further configured to: if the data block to be read found in the second storage device is used by the operating system to start the The necessary data of the virtual machine writes the found data block into the buffer area.
  • the necessary data used by the operating system to start the virtual machine is stored in the cache area, and the same type of virtual machine is started, the necessary data of the operating system can be read in the cache area, which greatly saves the virtual machine startup. time.
  • the read data request carries the first virtual disk identifier, and the size value of the data block to be read And an offset of the data block to be read, wherein the first virtual disk is a virtual disk allocated for the virtual machine in the first storage device.
  • the virtual disk drive is further configured to find the first operating system identifier corresponding to the first virtual disk identifier according to the correspondence between the virtual disk identifier and the operating system identifier, where the first operating system identifier is an identifier of the operating system that the virtual machine needs to be installed. .
  • the virtual disk driver is configured to determine, according to the read data request, whether a data block to be read is stored in the buffer area, where the virtual disk driver is configured to use the size of the data block to be read according to the first operating system identifier and needs to be read.
  • the offset of the data block determines whether the data block to be read is stored in the buffer area.
  • the virtual disk drive is configured to: when the data block to be read is not stored in the buffer area, search for the data block to be read in the second storage device according to the read data request, specifically: when the cache area does not store the required data
  • the virtual disk driver is configured to search for the read in the second storage device according to the first operating system identifier, the size value of the data block to be read, and the offset of the data block to be read. Data block.
  • the virtual disk drive is further configured to: determine whether the virtual machine is in a startup completion state, in a third possible implementation manner of the second aspect.
  • the startup completion status includes: the data of the operating system written in the buffer is greater than the predetermined number
  • the amount of CPU usage of the virtual machine is less than a predetermined threshold, or the number of operation requests that the virtual disk drive receives the virtual machine to read and write non-operating system virtual disks exceeds a predetermined threshold.
  • the data of the operating system that is read when the virtual machine is in the startup completion state is the necessary data of the operating system, which can greatly reduce the data that the virtual machine needs to read at startup, and saves the time taken for the virtual machine to start.
  • the cloud system further includes a first storage device, and the virtual disk drive is further configured to read the The data block is written to the first virtual disk.
  • the virtual disk drive is further configured to write non-essential data of the operating system to the first virtual disk. .
  • the virtual disk drive is further configured to determine, according to the read data request, that the cache area does not have the storage to be read.
  • Data block, and the data of the data block to be read found in the second storage device is a description object of the buffer linked list corresponding to the operating system when the data used by the operating system to start the virtual machine is Recording the size value of the found data block and the offset of the data block, and saving the address in the buffer area of the found data block to the buffer linked list corresponding to the operating system The last description of the object.
  • the buffer area is located in the server or in the first storage device.
  • an embodiment of the present invention provides a cloud computing system, including a first storage device, And a second storage device, wherein the server is connected to the second storage device, and the second storage device is a mirror storage device, and the second storage device is connected to the second storage device.
  • a storage device may be in the server or connected to the server, and the first storage device is a virtual machine storage device.
  • the server stores the necessary data of the operating system that needs to be read when the virtual machine is started in the cache area, and the virtual machine can obtain the required read start in the cache area during the startup process.
  • the necessary data for the operating system greatly saves the time required for the virtual machine to boot.
  • FIG. 1 is a schematic structural diagram of a cloud computing system according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for acquiring data during a virtual machine startup process according to an embodiment of the present invention
  • FIG. 3 is a flowchart of another method for acquiring data during a virtual machine startup process according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a buffer link list according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
  • FIG. 6 is another schematic structural diagram of a server according to an embodiment of the present invention.
  • FIG. 7 is another schematic structural diagram of a de-computing system according to an embodiment of the present invention.
  • the structure of the cloud computing system for creating a virtual machine is as shown in FIG. 1.
  • the cloud computing system includes a server, a first storage device, and a second storage. device.
  • the server can be a normal server with a processor.
  • the processor is used to create a virtual machine and run a virtualization platform. For ease of viewing, the virtual machine created by the processor and the running virtualization platform are shown separately in FIG.
  • a virtual disk drive runs in the virtualization platform, and a virtual disk drive is used to manage virtual machines.
  • the first storage device is configured to provide a storage space for the created virtual machine, that is, a virtual disk is allocated for the created virtual machine, and thus the first storage device may also be referred to as a virtual machine storage device.
  • the first storage device may be a hard disk of the server itself or an external disk array.
  • the first storage device has higher performance requirements.
  • the second storage device is used to store information such as a virtual machine template, an operating system of the virtual machine, and the like, and the second storage device may also be referred to as a mirror storage device.
  • the second storage device has higher reliability requirements.
  • the first storage device and the second storage device are two storage devices that are physically independent.
  • a virtual machine template is a pre-created and not running virtual machine that is stored in a mirrored storage device.
  • the virtual machine template has a virtual CPU, virtual memory, and at least one virtual disk.
  • a virtual disk with an operating system installed is called an operating system virtual disk and can be used as a boot disk for booting a virtual machine.
  • a virtual disk with only an application installed and no operating system installed is called a non-operating system virtual disk.
  • Multiple virtual machines created from a virtual machine template are virtual machines of the same type. For the same type of virtual machine, the virtual disk allocated, the data of the read operating system, and the order in which the operating system is read are the same when created and started.
  • the user selects a virtual machine template to create a new virtual machine, that is, the type of virtual machine that the user selects to create.
  • the virtual machine manager in the cloud computing system creates a virtual machine that notifies the disk manager in the cloud computing system that creates an empty virtual disk in the virtual machine storage device for the newly created virtual machine.
  • the newly created virtual machine sends a read data request to the virtual disk drive, and the virtual disk drive receives the virtual data template of the virtual machine template after receiving the read data request.
  • the data is copied to the empty virtual disk. After copying the data of the virtual disk of the virtual machine template, a virtual machine can be successfully started on this basis.
  • the virtual disk of the virtual machine template generally has a data size of 10 G or more.
  • the virtual machine storage device and the mirrored storage device are generally two independent storage systems, when the new virtual machine is started, the data of the virtual disk in the virtual machine template needs to be copied from the mirror storage device to the virtual machine storage device. Due to the performance of the mirrored storage device and the network bandwidth between the mirrored storage device and the server, when the number of virtual machines started is large, the startup speed is slow.
  • a link cloning technology is used for creating a virtual machine of the same type on the same virtual machine storage device.
  • the specific way is: when creating the first virtual machine of a certain type, creating a first virtual disk in the virtual machine storage device, where the first virtual disk is allocated to the first virtual machine in the virtual machine storage device.
  • a virtual disk after copying the data of the virtual disk of the virtual machine template to the first virtual disk, creating a snapshot of the first virtual disk, using the snapshot as a linked clone, and using the snapshot to create a second and more virtual machines of the same type.
  • the link cloning technology When the link cloning technology is used, the data of the virtual disk of the virtual machine template needs to be copied to the first virtual disk, and the number of virtual machines created simultaneously by the link cloning is limited by the performance of the virtual machine storage device.
  • the performance of the read When reading data from a common linked clone volume, as the number of virtual machines increases, the performance of the read will decrease linearly.
  • the number of virtual machines exceeds a certain number, the virtual machine creation will become slower and it will be difficult to respond to the user's operation.
  • the number of virtual machines created by linked clones is limited. When the limit is exceeded, a new linked clone needs to be created.
  • the embodiment of the invention provides an implementation scheme for quickly acquiring data during the startup process of the virtual machine, and the flow of the implementation method is as shown in FIG. 2 .
  • the method is applied to a cloud computing system.
  • the cloud computing system includes a server and a second storage device.
  • the second storage device is a mirrored storage device.
  • the server runs a virtualization platform, and the virtual disk platform runs a virtual disk drive, such as Figure 1 shows.
  • Step 201 The virtual disk drive of the virtualization platform receives the read data request sent by the virtual machine to be started.
  • the cloud computing system further includes a first storage device, where the first storage device is a virtual machine storage device, and is configured to provide a virtual disk for the created virtual machine.
  • the disk manager receives the notification message, it creates an empty volume on the virtual machine storage device as the virtual disk of the first virtual machine.
  • the created virtual disk is referred to as a first virtual disk. This step is the same as the existing implementation and will not be described in detail.
  • the functions of the virtual machine manager and the disk manager in the cloud computing system are the same as those in the prior art and will not be described separately.
  • the virtual machine template can have an operating system virtual disk and a non-operating system virtual disk, and there can be multiple non-operating system virtual disks. If the virtual machine template selected by the user has multiple virtual disks, in this step, the virtual disk drive creates multiple first virtual disks on the first storage device, corresponding to multiple virtual disks in the virtual machine template.
  • the first virtual disk After the first virtual disk is created, it triggers the operation of starting the virtual machine. After the virtual machine starts to boot and reads the data in the basic input/output system (BIOS), the virtual machine sends a read data request to the virtualization platform.
  • the read data request carries the first virtual disk label The size of the data block to be read and the offset of the data block to be read, where the first virtual disk identifier refers to the virtual disk identifier of the first virtual disk.
  • the virtual machine manager When a virtual machine is created, after the user selects the virtual machine template, the virtual machine manager creates a virtual machine based on the virtual machine template and notifies the disk manager to allocate a virtual disk for the created virtual machine in the virtual machine storage device. Disk Manager returns the virtual disk ID of the created virtual disk to the virtual machine manager. Because the virtual machine template contains the information of the operating system that the created virtual machine needs to read, the virtual machine manager can obtain the operating system identifier of the operating system that the created virtual machine needs to read after creating the virtual machine. The virtual machine manager sends the obtained operating system ID and virtual disk ID to the virtual disk drive of the server's virtualization platform. After the virtual disk drive is received, the mapping between the operating system identifier and the virtual disk identifier is established, and the correspondence between the operating system identifier and the virtual disk identifier is stored in the server's memory.
  • the virtual disk drive After receiving the read data request sent by the virtual machine to be started, the virtual disk drive searches for the first operating system identifier corresponding to the first virtual disk identifier according to the correspondence between the virtual disk identifier and the operating system identifier stored in the memory.
  • the first operating system identifier is an identifier of an operating system that the virtual machine needs to be installed.
  • the virtual machine is created according to a virtual machine template. Therefore, the first operating system identifier can be the same as the operating system virtual disk of the virtual machine template corresponding to the virtual machine.
  • the virtual machine determines the size value of the data block that needs to be read and the offset of the data block.
  • the virtual machine sends multiple read data requests to the virtual disk drive to read the data of the operating system, and the virtual machine completes the boot after reading the data of the required operating system.
  • the data of the operating system virtual disk of the virtual template corresponding to the virtual machine is first read into the first virtual disk of the virtual machine, and when the virtual machine is started, the data is read.
  • the request carries the virtual disk identifier of the first virtual disk.
  • the virtual disk drive reads the data of the operating system into the first virtual disk.
  • the virtual disk drive converts the virtual disk identifier of the first virtual disk in the read data request into a corresponding first operating system identifier, and the virtual disk driver can be identified in the cache area according to the first operating system identifier.
  • the data of the operating system required for booting can be directly obtained from the cache area without virtualizing the operating system of the virtual machine template in advance.
  • the data of the disk is read into the first virtual disk of the virtual machine, which greatly speeds up the startup of other virtual machines.
  • Step 203 The virtual disk drive determines, according to the read data request, whether the data block to be read is stored in the cache area, where the cache area is used to store necessary data used by the operating system to start the virtual machine.
  • the cache area is located in the server, and may be located in a memory of the server or in a local storage medium of the server.
  • the buffer area may also be located in the first storage device, where the buffer area may be located in a controller of the first storage device, or may be used as a buffer area by a high-performance storage device (for example, an SSD disk).
  • the virtual disk drive determines, according to the read data request, whether the data block to be read is stored in the buffer area, specifically: the virtual disk drive according to the first operating system identifier, the size value of the data block to be read, and the requirement
  • the offset of the read data block determines whether the data block to be read is stored in the buffer area.
  • the inventor found that in the process of starting the virtual machine, the virtual machine does not need to read all the data of the operating system to complete the startup of the virtual machine, but only needs to read part of the data of the operating system.
  • the virtual machine is read when the startup is completed.
  • the data of the operating system is the data necessary to start the virtual machine, so the data of the operating system that has been read when the virtual machine is in the startup completion state is called the necessary data of the operating system.
  • the size of the data of the operating system generally has a dozen G, and the necessary data for the operating system required to start the virtual machine is much smaller.
  • the virtual disk drive can record the data of the operating system that has been read when the first virtual machine of a certain type is in the startup completion state.
  • the data of these operating systems must also be the second and subsequent created virtual machines of the same type.
  • the data of the operating system to be read at startup, and the order of reading is the same.
  • the data read after the virtual machine is booted is called non-essential data of the operating system. If all the data of the operating system is cached, the memory requirements will be greatly increased, and the cost will increase dramatically. Therefore, the virtual disk drive needs to judge the data of the operating system that the virtual machine has read when the virtual machine is in the startup completion state.
  • the embodiment of the present invention provides three ways to determine whether the virtual machine is in the startup completion state.
  • the first way is when the number of data of the operating system written in the buffer is greater than a predetermined number.
  • the predetermined number can be determined by an experienced engineer based on the amount of data of the operating system that the virtual machine has read when the virtual machine is in the boot completion state. Since the order of reading the operating system data when the same type of virtual machine is started is the same, the data size of the operating system that has been read when the virtual machine is in the startup completion state can be used as a predetermined schedule by an experienced engineer. Quantity. When creating a virtual machine of the same type, the virtual machine can be started when the data of the operating system read by the virtual machine is greater than the predetermined number.
  • the second way is that the virtual disk drive determines that the read and write operations to the non-operating system virtual disk are Whether the predetermined threshold is exceeded.
  • the virtual disk other than the operating system virtual disk that is, the non-operating system disk
  • the virtual machine startup can be judged.
  • the data of the operating system that has been read when the virtual machine is in the startup completion state is the necessary data of the operating system.
  • the third way is to determine whether the occupancy rate of the CPU of the virtual machine is less than a predetermined threshold. In a certain period of time, if the CPU usage is less than a certain value, it can be judged that the virtual machine startup is completed. At this time, the data of the operating system that the virtual machine has read is the necessary data of the operating system.
  • those skilled in the art can also judge whether the virtual machine is in the startup completion state by other similar manners. For example, an experienced engineer can count the time when the virtual machine is in the startup completion state in some cases, and the time obtained by the statistics is taken as the predetermined time threshold. When the virtual machine is started, the virtual machine startup is completed when the time for reading the operating system reaches the predetermined time threshold under the same conditions.
  • the necessary data of the operating system may also be identified, and the necessary data of the operating system is pre-stored in the buffer before the virtual machine is created.
  • the virtual disk drive After receiving the read data request sent by the virtual machine, the virtual disk drive determines whether the data block to be read is stored in the buffer area, and the buffer area is used to store necessary data used by the operating system to start the virtual machine.
  • the virtual disk drive can also create separate caches for each operating system's necessary data.
  • the virtual disk drive can use the buffered linked list to record related information. For example, using a buffered linked list The way to record the operating system ID of the data block written to the buffer, the size value of the data block, and the offset of the data block.
  • other methods such as a tree structure
  • Which method is used can be set according to the needs of the business or the user.
  • the following uses the method of using a linked list as an example to explain how to store and utilize the information necessary for the operating system.
  • the structure of the linked list provided by the embodiment of the present invention is as shown in FIG. 3.
  • the virtual disk drive creates a global pointer to the buffered linked list. Before the virtual machine is created, there is no data stored in the cache, and the buffer list pointer is empty. Therefore, when the first virtual machine is created, the pointer to the buffer list in the virtual disk driver is empty. In this case, an image buffer object needs to be created in the buffer list, and the operating system identifier (that is, the identifier of the operating system) is recorded in the image buffer object. The amount of buffered data is 0, the next mirror buffer object pointer is set to null, and the buffered data block list pointer is empty.
  • the data when the data is to be read, first look for the corresponding image buffer object (that is, the necessary data of the operating system) in the mirror linked list according to the operating system identifier in the read data request. After the image buffer object is found, it searches for the corresponding data block in the data block linked list of the image buffer object according to the size value of the data block in the read data request and the offset of the data block. If there is a corresponding data block, it indicates that the data block to be read is stored in the buffer area, and the data block corresponding to the location in the buffer area is returned to the virtual machine.
  • the specific operating system data can be stored in the buffer list (as shown in Attachment 4), or a pointer can be added to the location of the operating system data store.
  • the corresponding image ID is not found in the mirror list according to the operating system ID, or According to the size value of the data block and the offset of the data block, the corresponding data block is not found in the mirror linked list, indicating that there is no data block in the buffer area for storing the read data request, and the virtual disk drive needs to be
  • the data block to be read is read in the image storage. If the data to be read at this time is the necessary data of the operating system, write the necessary data of the operating system into the buffer area, and newly create an image buffer object in the buffer list, and record the operating system on the image buffer object.
  • Step 205 When it is determined that the data block to be read is stored in the buffer area according to the read data request, the virtual disk drive reads the data block to be read from the buffer area, Return to the virtual machine.
  • the virtual disk drive can find the data block to be read in the cache according to the read data request. Specifically, when the data stored in the cache area is recorded in the mirror buffer linked list, the virtual disk drive finds the operating system identifier in the mirror buffer list according to the operating system identifier in the read data request, and then requests according to the read data. If the size value of the data block to be read and the offset of the data block to be read find the corresponding object in the mirror buffer linked list, the data block to be read is stored in the buffer area. . The virtual disk drive reads the data block from the cache and returns it to the virtual machine. After the virtual machine reads the necessary data of the operating system that needs to be read, it can complete the startup.
  • the necessary data of the operating system required to start the virtual machine is already in the cache area, when the same type of virtual machine is created, the necessary data of the operating system can be directly read from the buffer area without The necessary data of the operating system is read from the second storage device to the virtual disk, and the data of the operating system is read from the virtual disk, thereby greatly speeding up the startup of the virtual machine. And the number of virtual machines of the same type is unlimited, so when you create a large number of virtual machines, the time to start the virtual machine is greatly reduced.
  • Step 207 When the data block to be read is not stored in the buffer area, the virtual disk driver searches for the data block to be read in the second storage device according to the read data request, and The found data block to be read is returned to the virtual machine.
  • the virtual disk drive When the data block to be read is not stored in the buffer area, the virtual disk drive is in the second storage according to the first operating system identifier, the size value of the data block to be read, and the offset of the data block to be read. Find the data block to be read in the device. If the data block to be read is not stored in the buffer area, the virtual disk driver searches the second storage device for the data block to be read according to the read data request. The virtual disk drive searches for the data block after finding the corresponding data block in the second storage device according to the first operating system identifier, the size value of the data block to be read, and the offset of the data block to be read. Return to the virtual machine.
  • the virtual machine After the virtual machine reads the necessary data of the operating system, it can complete the startup. In this way, when the virtual machine starts, it only needs to read the necessary data of the operating system from the second storage device, and does not need to read all the data of the operating system, which can greatly save the startup time of the virtual machine.
  • Step 209 If the data block to be read found in the second storage device is requested according to the read data as the necessary data used by the operating system to start the virtual machine, the virtual disk drive will search the data block that is found. Write to the buffer area.
  • the recording method can be recorded in the form of a linked list, or can be recorded in other ways (for example, a tree structure).
  • the linked list is recorded as described above and will not be further described herein.
  • the method may further include the following steps, as shown in FIG. 3:
  • Step 311 The virtual disk drive writes the data block to be read to the first virtual disk.
  • the virtual disk drive writes the data block to be read by the virtual machine during the startup process to the first virtual disk, where the first virtual disk is a virtual disk allocated by the disk manager in the cloud storage system to the virtual machine in the first storage device.
  • the virtual disk drive may write the data block to the first virtual disk while returning the data block to be read to the virtual machine, or The data block is written to the first virtual disk when the system is idle.
  • the virtual disk drive may write the data block into the first virtual disk while writing the data block into the buffer area, and may also be virtual to When the machine returns the data, the data block is written into the first virtual disk, and the data block can also be written to the first virtual disk when the system is idle.
  • the method may further include the following steps, as shown in FIG. 3:
  • Step 313 The virtual disk drive writes unnecessary data of the operating system to the first virtual disk.
  • the data block to be read is non-essential data of the operating system
  • only the Non-essential data of the operating system is written to the first virtual disk without being written to the buffer. Since the non-essential data of the operating system does not affect the startup of the virtual machine, the non-essential data of the operating system can be written to the first virtual disk when the system is idle after the virtual machine is started. This allows the system to operate again when it is relatively idle, reducing the impact on system performance.
  • the embodiment of the present invention provides a method for acquiring data during a virtual machine startup process.
  • the search and read data request is performed.
  • the first virtual disk identifier corresponds to the first operating system identifier, and determines whether the buffer needs to be read in the buffer according to the first operating system identifier, the size value of the data block to be read, and the offset of the data to be read.
  • the data block is taken.
  • the virtual disk drive returns the data block to be read to the virtual machine.
  • the cache area is used to store the necessary data used by the operating system that the virtual machine needs to read to start the virtual machine.
  • the prior art needs to first put the image storage device in the virtual machine startup process.
  • the data of the operating system is read into the first storage device, so that the solution provided by the embodiment of the present invention greatly saves the startup time of the virtual machine.
  • the necessary data of the operating system is required to be read in the mirror storage device, so that the solution provided by the embodiment of the present invention can save the data.
  • the startup time of the virtual machine is required to be read in the mirror storage device, so that the solution provided by the embodiment of the present invention can save the data.
  • the method provided by the embodiment of the present invention is not limited by the number of virtual machines, and the necessary data of the virtual machine to read the operating system can be started, and the startup time of the virtual machine is also greatly shortened. .
  • the embodiment of the invention further provides a cloud computing system (as shown in FIG. 1 ), comprising a server 11 , a first storage device 13 and a second storage device 15 .
  • the server 11 is connected to the second storage device 15;
  • the storage device 13 may be connected to the server 11 or may be a hard disk in the server 11.
  • the first storage device 13 is configured to provide a storage space for the created virtual machine, that is, a virtual disk is allocated for the created virtual machine 1011, and thus the first storage device 13 may also be referred to as a virtual machine storage device.
  • the first storage device 13 may be a disk array external to the server.
  • the second storage device 15 is configured to store information such as a virtual machine template, a virtual disk of the virtual machine, and the like, and the second storage device 15 may also be referred to as a mirror storage device.
  • the first storage device 13 and the second storage device 15 are two storage devices that are physically independent.
  • the server is configured to implement the foregoing method for acquiring data in a virtual machine startup, and the structure of the server is as shown in FIG. 5.
  • the server includes a processor 51 for creating a virtual machine 511 and running a virtualization platform 513.
  • a virtual disk drive 5131 is running in the virtualization platform 513, and the virtual disk drive 5131 is used to implement the following solutions:
  • the read data request carries a first virtual disk identifier, a size value of the data block to be read, and an offset of the data block to be read, where
  • the first virtual disk is a virtual disk allocated to the virtual machine in the first storage device;
  • the first operating system identifier corresponding to the first virtual disk identifier, where the first operating system identifier is an identifier of an operating system that the virtual machine needs to be installed;
  • the buffer area 54 is configured to store necessary data used by the operating system that the virtual machine needs to read to start the virtual machine; and the necessary data is the operation that has been read when the virtual machine is in a startup completion state. System data.
  • the virtual disk drive is configured to determine, according to the read data request, whether a data block to be read is stored in the cache area, where the virtual disk drive is configured to read according to the first operating system identifier.
  • the size value of the fetched data block and the offset of the data block to be read are determined to be slow Whether the data block to be read is stored in the storage area.
  • the cache area 54 may be located in a server (such as the server shown in FIG. 6), such as in the memory of the server, or in a local storage medium of the server.
  • the buffer area 54 may also be located in the first storage device 13 (such as the cloud computing system shown in FIG. 7), for example, may be located in the controller of the first storage device 13, or may be high-performance.
  • a storage device (such as an SSD) provides a buffer.
  • the virtual disk drive 5131 is configured to read the data block to be read from the buffer area 54 and return it to the virtual machine.
  • the virtual disk drive 5131 is further configured to: in the second storage device, search for the data block to be read according to the read data request, when the data block to be read is not stored in the buffer area 54. And returning the found data block to be read back to the virtual machine 511.
  • the virtual disk drive is configured to: when the data block to be read is not stored in the buffer area, search for the data block to be read in the second storage device according to the read data request, Specifically, when the data block to be read is not stored in the buffer area, the virtual disk driver is configured to determine, according to the first operating system identifier, a size value and a size of the data block to be read. An offset of the data block to be read is searched for in the second storage device for the data block to be read.
  • the virtual disk drive 5131 can be read from the cache during the startup process of the virtual machine. Taking the data block to be read without reading the data block to be read from the second storage device to the virtual disk and reading the data to be read from the virtual disk, thereby greatly speeding up The startup speed of the virtual machine. And the number of virtual machines of the same type is unlimited, so when you create a large number of virtual machines, the time to start the virtual machine is greatly reduced.
  • the virtual disk drive 5131 is further configured to: if the data block to be read found in the second storage device is necessary data used by the operating system to start the virtual machine, the searching The resulting data block is written to the buffer area 54.
  • the virtual disk drive 5131 is further configured to: determine whether the virtual machine 511 is in a startup completion state; the startup completion state includes: the data of the operating system written in the cache area is greater than a predetermined number; The CPU usage of the machine is less than a predetermined threshold; or the number of operation requests by the virtual disk drive to receive the virtual machine to read and write a non-operating system virtual disk exceeds a predetermined threshold.
  • the server is further connected to the first storage device, and the virtual disk drive 5131 is further configured to: write the data block to be read into the first virtual disk.
  • the virtual disk drive 5131 is further configured to: write non-essential data of the operating system to the first virtual disk.
  • the virtual disk drive 5131 is further configured to: determine, according to the read data request, that the data block to be read is not stored in the buffer area 54, and the read data is found in the second storage device
  • the size value and the data block of the searched data block are recorded on the description object corresponding to the buffer linked list of the operating system.
  • An offset, and the address in which the found data block is saved in the buffer is saved to the last description object of the buffer linked list corresponding to the operating system.
  • Meta and algorithm steps can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can select different methods for implementing the described functions for a particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the function is implemented in the form of computer software and sold or used as a stand-alone product, it is considered to some extent that all or part of the technical solution of the present invention (for example, a part contributing to the prior art) is It is embodied in the form of computer software products.
  • the computer software product is typically stored in a computer readable storage medium and includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

Des modes de réalisation de la présente invention concernent un procédé d'acquisition de données pendant le démarrage d'une machine virtuelle, ainsi qu'un système informatique en nuage. Pendant le démarrage d'une machine virtuelle, un pilote de disque virtuel d'une plateforme de virtualisation reçoit une demande de lecture de données envoyée par la machine virtuelle et détermine, en fonction de la demande de lecture de données, si un bloc de données à lire est mémorisé dans une zone de mémoire cache, la zone de mémoire cache étant utilisée pour mémoriser des données nécessaires d'un système d'exploitation ; lorsqu'un bloc de données à lire est mémorisé dans la zone de mémoire cache, le pilote de disque virtuel lit le bloc de données à lire à partir de la zone de mémoire cache et renvoie le bloc de données à la machine virtuelle ; lorsque aucun bloc de données à lire n'est mémorisé dans la zone de mémoire cache, le pilote de disque virtuel recherche un bloc de données à lire dans un second dispositif de mémoire en fonction de la demande de lecture de données et renvoie le bloc de données à lire trouvé à la machine virtuelle. Le procédé des modes de réalisation de la présente invention permet à un grand nombre de machines virtuelles de démarrer rapidement.
PCT/CN2016/107112 2016-11-24 2016-11-24 Procédé d'acquisition de données pendant le démarrage d'une machine virtuelle et système informatique en nuage WO2018094649A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680003333.7A CN108475201B (zh) 2016-11-24 2016-11-24 一种虚拟机启动过程中的数据获取方法和云计算系统
PCT/CN2016/107112 WO2018094649A1 (fr) 2016-11-24 2016-11-24 Procédé d'acquisition de données pendant le démarrage d'une machine virtuelle et système informatique en nuage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/107112 WO2018094649A1 (fr) 2016-11-24 2016-11-24 Procédé d'acquisition de données pendant le démarrage d'une machine virtuelle et système informatique en nuage

Publications (1)

Publication Number Publication Date
WO2018094649A1 true WO2018094649A1 (fr) 2018-05-31

Family

ID=62194563

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/107112 WO2018094649A1 (fr) 2016-11-24 2016-11-24 Procédé d'acquisition de données pendant le démarrage d'une machine virtuelle et système informatique en nuage

Country Status (2)

Country Link
CN (1) CN108475201B (fr)
WO (1) WO2018094649A1 (fr)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181596A (zh) * 2020-10-10 2021-01-05 济南浪潮数据技术有限公司 一种虚拟机克隆方法、装置、设备及存储介质
CN116560796A (zh) * 2023-05-12 2023-08-08 深圳天融信创新科技有限公司 数据加载方法、装置、设备及介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109491757B (zh) * 2018-10-11 2022-03-15 广东微云科技股份有限公司 本地计算模式虚拟机的启动加速方法
CN110704157B (zh) * 2019-09-12 2023-06-30 深圳市元征科技股份有限公司 一种应用启动方法、相关装置及介质
CN110531730A (zh) * 2019-10-16 2019-12-03 广东紫方环保技术有限公司 一种污染源在线监控系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307206A (zh) * 2010-09-25 2012-01-04 广东电子工业研究院有限公司 基于云存储的快速访问虚拟机镜像的缓存系统及其方法
CN102629941A (zh) * 2012-03-20 2012-08-08 武汉邮电科学研究院 云计算系统中虚拟机镜像缓存的方法
CN103067425A (zh) * 2011-10-20 2013-04-24 中国移动通信集团公司 虚拟机创建方法、虚拟机管理系统及相关设备
CN105045663A (zh) * 2015-08-24 2015-11-11 湖南昇云科技有限公司 快速部署虚拟机的方法与系统
CN105487898A (zh) * 2015-11-27 2016-04-13 国云科技股份有限公司 一种提高虚拟机批量开机关机速度的方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095524B (zh) * 2011-12-22 2019-04-02 中国移动通信集团公司 一种虚拟机部署方法、系统和装置
US8904113B2 (en) * 2012-05-24 2014-12-02 International Business Machines Corporation Virtual machine exclusive caching
CN103870312B (zh) * 2012-12-12 2018-01-23 华为技术有限公司 建立虚拟机共享存储缓存的方法及装置
US9436555B2 (en) * 2014-09-22 2016-09-06 Commvault Systems, Inc. Efficient live-mount of a backed up virtual machine in a storage management system
CN105607973B (zh) * 2014-11-19 2020-03-17 中国移动通信集团公司 一种虚拟机系统中设备故障处理的方法、装置及系统
CN104580391A (zh) * 2014-12-18 2015-04-29 国云科技股份有限公司 一种适用于云计算的提高服务器带宽的方法
KR102192503B1 (ko) * 2015-04-01 2020-12-17 한국전자통신연구원 캐시 서버를 이용하여 가상 데스크톱 서비스를 제공하기 위한 시스템 및 그 방법
CN105718280A (zh) * 2015-06-24 2016-06-29 乐视云计算有限公司 一种加速虚拟机io的方法和管理平台
CN105279000B (zh) * 2015-11-19 2019-06-21 北京北信源软件股份有限公司 一种虚拟机软件安装方法、安装控制器及安装代理
CN105549905B (zh) * 2015-12-09 2018-06-01 上海理工大学 一种多虚拟机访问分布式对象存储系统的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307206A (zh) * 2010-09-25 2012-01-04 广东电子工业研究院有限公司 基于云存储的快速访问虚拟机镜像的缓存系统及其方法
CN103067425A (zh) * 2011-10-20 2013-04-24 中国移动通信集团公司 虚拟机创建方法、虚拟机管理系统及相关设备
CN102629941A (zh) * 2012-03-20 2012-08-08 武汉邮电科学研究院 云计算系统中虚拟机镜像缓存的方法
CN105045663A (zh) * 2015-08-24 2015-11-11 湖南昇云科技有限公司 快速部署虚拟机的方法与系统
CN105487898A (zh) * 2015-11-27 2016-04-13 国云科技股份有限公司 一种提高虚拟机批量开机关机速度的方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181596A (zh) * 2020-10-10 2021-01-05 济南浪潮数据技术有限公司 一种虚拟机克隆方法、装置、设备及存储介质
CN112181596B (zh) * 2020-10-10 2023-05-12 济南浪潮数据技术有限公司 一种虚拟机克隆方法、装置、设备及存储介质
CN116560796A (zh) * 2023-05-12 2023-08-08 深圳天融信创新科技有限公司 数据加载方法、装置、设备及介质
CN116560796B (zh) * 2023-05-12 2024-02-02 深圳天融信创新科技有限公司 数据加载方法、装置、设备及介质

Also Published As

Publication number Publication date
CN108475201A (zh) 2018-08-31
CN108475201B (zh) 2021-02-26

Similar Documents

Publication Publication Date Title
US9413683B2 (en) Managing resources in a distributed system using dynamic clusters
US10198377B2 (en) Virtual machine state replication using DMA write records
WO2018094649A1 (fr) Procédé d'acquisition de données pendant le démarrage d'une machine virtuelle et système informatique en nuage
US9448728B2 (en) Consistent unmapping of application data in presence of concurrent, unquiesced writers and readers
US8793427B2 (en) Remote memory for virtual machines
US10496613B2 (en) Method for processing input/output request, host, server, and virtual machine
CN110597451B (zh) 一种虚拟化缓存的实现方法及物理机
CN100451995C (zh) 保留虚拟机的高速缓存的系统和方法
TWI735542B (zh) 一種虛擬機器的資料儲存方法和裝置
US8433888B2 (en) Network boot system
US20180139100A1 (en) Storage-aware dynamic placement of virtual machines
JP6337902B2 (ja) ストレージシステムとノード装置とキャッシュ制御方法並びにプログラム
WO2019061352A1 (fr) Procédé et dispositif de chargement de données
US9983997B2 (en) Event based pre-fetch caching storage controller
KR20170042593A (ko) 파일 시스템에서의 플러싱 기법
US10579419B2 (en) Data analysis in storage system
CN112486858A (zh) 一种数据预取方法以及装置
US20180136958A1 (en) Storage-aware dynamic placement of virtual machines
TWI828307B (zh) 用於記憶體管理機會與記憶體交換任務之運算系統及管理其之方法
US10007437B2 (en) Management apparatus, storage system, method, and computer readable medium
US11126371B2 (en) Caching file data within a clustered computing system
US10346193B1 (en) Efficient placement of virtual machines based on cache hit ratio
US10467145B2 (en) Management of caching operations in a unified cache
US10992751B1 (en) Selective storage of a dataset on a data storage device that is directly attached to a network switch
US20220405021A1 (en) Apparatus and method for managing integrated storage based on memory

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16922210

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16922210

Country of ref document: EP

Kind code of ref document: A1