Virtual machine management method and device based on disk mirror image format, equipment and medium
Through the virtual machine management method based on disk mirroring format, the container storage interface plug-in is used to create and operate snapshots, which solves the problem of the virtualization platform's limited snapshot function in the file storage system, realizes the connection between the virtualization platform and the file storage system, and improves the user experience.
Patent Information
- Application Number
- CN202510564399.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, the snapshot function of the Qemu virtualization platform is limited by whether the underlying block storage system supports the snapshot function, and in a deployment environment that only provides file storage systems, the snapshot function of the virtualization platform is limited.
It provides a virtual machine management method based on disk image format. By creating disk image format files, using the container storage interface plug-in to create and operate the target virtual machine, and supports the docking of the virtualization platform and the file storage system.
It realizes the snapshot function of supporting virtualization platforms in the file storage system environment, improving the user experience.
Smart Images

Figure CN120407086A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology applications, and particularly to a virtual machine management method, device, equipment, and medium based on a disk image format. Background Art
[0002] The image formats used in Qemu virtualization are usually two formats: RAW (raw format) and disk image format (QEMU Copy On Write version 2, qcow2). The RAW format image file is also called the original image or raw device image. A virtual machine can directly boot from a RAW image, just as if it were directly booting from a hard disk. It should be noted that the RAW image file itself has an obvious defect, that is, it does not support snapshots, so the development of qcow and qcow2 came later. On the other hand, currently, the Container Storage Interface (CSI) of most virtualization platforms exposes the block storage system to the platform level, and the virtualization software Qemu of the platform uses the block storage system in the form of a RAW raw disk format. Therefore, for RAW format image files, the implementation of the CSI-related snapshot interface has to rely on the snapshot function provided by the underlying block storage system. If the underlying block storage system does not support the snapshot function, then the snapshot function of the virtual machine on the virtualization platform will be limited. At the same time, considering the actual deployment and installation environment, there will be scenarios where only a file storage system is provided. Similarly, at this time, the virtualization platform will also be limited. Summary of the Invention
[0003] To solve the above technical problems, the present disclosure provides a virtual machine management method, device, equipment, and medium based on a disk image format.
[0004] In a first aspect, the present disclosure provides a virtual machine management method based on a disk image format, including:
[0005] Responding to a virtual machine creation operation of a user, creating a corresponding disk image format file;
[0006] Starting a target virtual machine based on the disk image format file;
[0007] Performing a snapshot creation operation on the target virtual machine through a container storage interface plugin to obtain a corresponding snapshot disk image format file;
[0008] Performing a snapshot operation on the target virtual machine based on the snapshot disk image format file.
[0009] In a second aspect, the present disclosure provides a virtual machine management device based on a disk image format, including:
[0010] The first processing module is configured to create a corresponding disk image format file in response to a virtual machine creation operation of a user;
[0011] The second processing module is configured to start a target virtual machine based on the disk image format file;
[0012] The third processing module is configured to perform a snapshot creation operation on the target virtual machine through a container storage interface plug-in to obtain a corresponding snapshot disk image format file;
[0013] The fourth processing module is configured to perform a snapshot operation on the target virtual machine based on the snapshot disk image format file.
[0014] In a third aspect, the present disclosure provides a virtual machine management device based on a disk image format, including:
[0015] A processor;
[0016] A memory for storing executable instructions;
[0017] Wherein, the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the virtual machine management method based on the disk image format in the first aspect.
[0018] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a computer program, which when executed by a processor, causes the processor to implement the virtual machine management method based on the disk image format in the first aspect.
[0019] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art:
[0020] The virtual machine management method, device, device and medium based on the disk image format in the embodiments of the present disclosure can, in response to a virtual machine creation operation of a user, create a corresponding disk image format file, then start a target virtual machine based on the disk image format file, and then perform a snapshot creation operation on the target virtual machine through a container storage interface plug-in to obtain a corresponding snapshot disk image format file, and finally perform a snapshot operation on the target virtual machine based on the snapshot disk image format file. Thus, a disk image format file is created, and a snapshot disk image format file is created for the target virtual machine through a container storage interface plug-in, thereby supporting the docking between the virtualization platform and the file storage system and improving the user experience. Description of the Drawings
[0021] In combination with the drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale.
[0022] Figure 1 Schematic flow chart of a virtual machine management method based on disk image format provided by an embodiment of the present disclosure;
[0023] Figure 2 Schematic flow chart of another virtual machine management method based on disk image format provided by an embodiment of the present disclosure;
[0024] Figure 3 Schematic flow chart of yet another virtual machine management method based on disk image format provided by an embodiment of the present disclosure;
[0025] Figure 4 Schematic structural diagram of a virtual machine management device based on disk image format provided by an embodiment of the present disclosure;
[0026] Figure 5 Schematic structural diagram of a virtual machine management device based on disk image format provided by an embodiment of the present disclosure. Detailed implementation manners
[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not used to limit the protection scope of the present disclosure.
[0028] It should be understood that the steps recited in the method embodiments of the present disclosure can be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0029] As used herein, the term "including" and its variations are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0030] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.
[0031] It should be noted that the modifications of "one" and "multiple" mentioned in this disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".
[0032] The names of the messages or information exchanged between multiple devices in the embodiments of this disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0033] To solve the above problems, the embodiments of this disclosure provide a virtual machine management method, device, equipment, and medium based on a disk image format. The following combines Figures 1 to 3 to detail the virtual machine management method based on the disk image format provided by the embodiments of this disclosure.
[0034] Figure 1 Fig. shows a schematic flowchart of a virtual machine management method based on a disk image format provided by the embodiments of this disclosure.
[0035] In the embodiments of this disclosure, the virtual machine management method based on the disk image format can be executed by an electronic device. Among them, the electronic device can include but is not limited to devices such as computer devices, cloud servers, or cloud server clusters.
[0036] As Figure 1 shown, the virtual machine management method based on the disk image format can include the following steps.
[0037] S110. In response to the user's virtual machine creation operation, create a corresponding disk image format file.
[0038] In the embodiments of this disclosure, the electronic device can, in response to the user's virtual machine creation operation, create a corresponding disk image format file.
[0039] Optionally, the virtual machine creation operation can be an operation for the user to create a virtual machine.
[0040] Optionally, the disk image format file can be in the qcow2 format.
[0041] Specifically, when the user wants to create a virtual machine, the virtual machine creation operation can be triggered on the front-end interface, and the back-end of the electronic device receives and responds to the virtual machine creation operation to create a corresponding disk image format (qcow2) file.
[0042] S120. Start the target virtual machine based on the disk image format file.
[0043] In the embodiments of this disclosure, the electronic device can start the target virtual machine based on the disk image format file.
[0044] Specifically, in the system disk and data disk, each volume has an independent key, which is uniformly saved and managed by the encryption service in the virtualization platform. Electronic devices can use the key to start the target virtual machine and specify the virtual machine hard disk as a disk image format (qcow2) file.
[0045] S130. Perform a snapshot creation operation on the target virtual machine through a container storage interface plug-in to obtain a corresponding snapshot disk image format file.
[0046] In an embodiment of the present disclosure, the electronic device may perform a snapshot creation operation on the target virtual machine through a container storage interface plug-in to obtain a corresponding snapshot disk image format file.
[0047] Alternatively, the Container Storage Interface (CSI) plug-in defines an industry-standard "Container Storage Interface," enabling storage providers (SPs) to develop plug-ins based on the CSI standard to work with various container orchestration (CO) systems, including Kubernetes, Mesos, and Swarm. Virtualization platforms leverage this standard CSI interface to provision system and data volumes for virtual machines, including complete lifecycle management of these volumes on the platform control plane.
[0048] Optionally, the snapshot disk image format file may be a file used to implement a snapshot function.
[0049] Specifically, after starting the target virtual machine, the electronic device may perform a snapshot creation operation on the target virtual machine through the container storage interface plug-in to obtain a corresponding snapshot disk image format file.
[0050] S140: Perform a snapshot operation on the target virtual machine based on the snapshot disk image format file.
[0051] In an embodiment of the present disclosure, the electronic device may perform a snapshot operation on the target virtual machine based on the snapshot disk image format file.
[0052] Therefore, in the embodiment of the present disclosure, in response to the user's virtual machine creation operation, a corresponding disk image format file can be created, and then the target virtual machine can be started based on the disk image format file. Then, a snapshot creation operation is performed on the target virtual machine through the container storage interface plug-in to obtain the corresponding snapshot disk image format file. Finally, a snapshot operation is performed on the target virtual machine based on the snapshot disk image format file. Thus, a disk image format file is created, and a snapshot disk image format file is created for the target virtual machine through the container storage interface plug-in, thereby supporting the docking of the virtualization platform and the file storage system and improving the user experience.
[0053] Optionally, S110 may specifically include: in response to a user's virtual machine creation operation, importing the corresponding image of the virtual machine into the system disk; in the case where the image passes the integrity check, converting the format of the image into a disk image format to obtain the disk image format file.
[0054] In the embodiments of the present disclosure, the electronic device may, in response to a user's virtual machine creation operation, import the corresponding image of the virtual machine into the system disk.
[0055] Specifically, for the system disk, after the electronic device responds to the user's virtual machine creation operation, it may automatically import the corresponding image of the virtual machine into the system disk, and after importing the image, it is necessary to perform an integrity check based on the MD5 hash of the virtual machine startup image recorded on the virtualization platform before to prevent malicious tampering of the virtual machine public startup image (once tampering is detected, the public image will be automatically marked as tampered).
[0056] Further, in the case where the image passes the integrity check, convert the format of the image into a disk image format to obtain the disk image format file.
[0057] Specifically, after the image passes the integrity check, since the image format of the virtual machine may be qcow2, ISO or other formats, the electronic device may convert the format of the image into a disk image format (qcow2) to obtain the corresponding disk image format file.
[0058] Optionally, S110 may specifically include: in response to a user's virtual machine creation operation, creating the disk image format file in the data disk.
[0059] In the embodiments of the present disclosure, the electronic device may, in response to a user's virtual machine creation operation, create the disk image format file in the data disk.
[0060] Specifically, for the data disk, after the electronic device responds to the user's virtual machine creation operation, it does not need to import the corresponding image of the virtual machine, but directly creates an empty disk image format file.
[0061] Among them, the virtual storage space size of qcow2 of the system disk and the data disk is the storage space size applied for by the virtual machine, and data encryption is also supported. Each volume has an independent key, and the keys are uniformly saved and managed by the encryption service in the virtualization platform.
[0062] Figure 2 The flowchart shows another virtual machine management method based on the disk image format provided by the embodiments of the present disclosure.
[0063] As Figure 2As shown, the electronic device can, in response to the user's virtual machine creation operation, create a system volume and a data volume on the system disk and the data disk respectively. For the system disk, after the electronic device responds to the user's virtual machine creation operation, it can automatically import the corresponding image of the virtual machine into the system disk, and after importing the image, it is necessary to perform an integrity check based on the MD5 hash of the virtual machine startup image recorded on the virtualization platform before to prevent malicious tampering of the virtual machine public startup image (once tampering is detected, the public image will be automatically marked as the tampered state); for the data disk, after the electronic device responds to the user's virtual machine creation operation, it does not need to import the corresponding image of the virtual machine and directly creates an empty disk image format file. The virtual storage space size of qcow2 for both the system disk and the data disk is the storage space size applied for by the virtual machine, and data encryption is also supported. Each volume has an independent key, and the keys are uniformly saved and managed by the encryption service in the virtualization platform. Finally, the virtual machine is started, and when the Qemu process is launched, the virtual machine hard disk is specified as the qcow2 file. The electronic device can, in response to the user's virtual machine deletion operation, delete the system volume and the data volume.
[0064] Optionally, S130 may specifically include: taking a shutdown snapshot of the target virtual machine; performing a snapshot creation operation on the target virtual machine through the container storage interface plug-in to obtain a corresponding snapshot disk image format file, and the snapshot disk image format file points to the disk image format file.
[0065] In the embodiment of the present disclosure, the electronic device can take a shutdown snapshot of the target virtual machine, and then perform a snapshot creation operation on the target virtual machine through the container storage interface plug-in to obtain a corresponding snapshot disk image format file.
[0066] Among them, the snapshot disk image format file points to the disk image format file.
[0067] Figure 3 The figure shows a schematic flowchart of another virtual machine management method based on the disk image format provided by the embodiment of the present disclosure.
[0068] As Figure 3As shown, the snapshot creation processes for the system disk and the data disk are the same. Taking the virtual machine of the system disk as an example, the electronic device can perform a shutdown snapshot for the target virtual machine, and then perform a snapshot creation operation on the target virtual machine through the container storage interface plug-in to obtain a corresponding snapshot disk image format file. For example, after the virtual machine starts up, the system disk is PVC1. At this time, since no snapshot has been taken for this system disk, there is only one file, base.qcow2, in the PVC1 directory, and the virtual machine mount point also points to this file. At this time, take a snapshot of this virtual machine, such as a shutdown snapshot. Through the CSI plug-in, a new snapshot file, snapshot1.qcow2, will be created. This file points to the base.qcow2 file from which the original virtual machine starts, that is, a snapshot chain is formed. The virtual machine mount point will point to this new snapshot file, that is, this file is the new read-write layer of the entire chain.
[0069] Optionally, S130 may specifically include: performing a startup snapshot for the target virtual machine; performing real-time update monitoring and path adjustment through the snapshot interface; performing a snapshot creation operation on the target virtual machine through the container storage interface plug-in to obtain a corresponding snapshot disk image format file.
[0070] In the embodiment of the present disclosure, the electronic device can perform a startup snapshot for the target virtual machine, then perform real-time update monitoring and path adjustment through the snapshot interface, and finally perform a snapshot creation operation on the target virtual machine through the container storage interface plug-in to obtain a corresponding snapshot disk image format file.
[0071] Specifically, for the startup snapshot, the electronic device needs to be promptly sensed by Libvirt / Qemu when making a new snapshot read-write layer, that is, support the hot update of the snapshot chain read-write layer. Real-time update monitoring is performed by calling the snapshot interface of Libvirt. Since the internal implementation of this interface uses the absolute path within the container, the absolute path needs to be adjusted to a relative path, and the rebase operation can be performed in the CSI's NodeUnpublishVolume interface. Finally, through the CSI plug-in, a new snapshot file, snapshot1.qcow2, will be created. This file points to the base.qcow2 file from which the original virtual machine starts, that is, a snapshot chain is formed. The virtual machine mount point will point to this new snapshot file, that is, this file is the new read-write layer of the entire chain.
[0072] Optionally, the virtual machine management method based on the disk image format may further include: creating a new backup system disk based on the system disk and copying the snapshot disk image format file to the new backup system disk.
[0073] In an embodiment of the present disclosure, an electronic device may create a new backup system disk based on the system disk and copy the snapshot disk image format file to the new backup system disk.
[0074] Continuing to refer to Figure 3 , the electronic device may create a new backup system disk PVC2 based on the original system disk PVC1, and copy the snapshot disk image format file snapshot1.qcow2 in the original system disk PVC1 to the new backup system disk PVC2 to obtain pvc2.qcow2, create a new read-write layer, point the backing_file of the read-write layer to the snapshot point, and at the same time specify the new read-write layer for the virtual machine's mount point.
[0075] Optionally, the virtual machine management method based on the disk image format may further include: performing a snapshot recovery operation based on the new backup system disk.
[0076] In an embodiment of the present disclosure, the electronic device may perform a snapshot recovery operation based on the new backup system disk.
[0077] Figure 4 FIG. shows a schematic structural diagram of a virtual machine management device based on the disk image format provided by an embodiment of the present disclosure.
[0078] As Figure 4 shown, the virtual machine management device 400 based on the disk image format may include a first processing module 410, a second processing module 420, a third processing module 430, and a fourth processing module 440.
[0079] The first processing module 410 may be configured to create a corresponding disk image format file in response to a virtual machine creation operation of a user.
[0080] The second processing module 420 may be configured to start a target virtual machine based on the disk image format file.
[0081] The third processing module 430 may be configured to perform a snapshot creation operation on the target virtual machine through a container storage interface plug-in to obtain a corresponding snapshot disk image format file.
[0082] The fourth processing module 440 may be configured to perform a snapshot operation on the target virtual machine based on the snapshot disk image format file.
[0083] Thus, in the embodiments of the present disclosure, in response to a user's virtual machine creation operation, a corresponding disk image format file can be created, and then the target virtual machine can be started based on the disk image format file. Subsequently, a snapshot creation operation can be performed on the target virtual machine through a container storage interface plugin to obtain a corresponding snapshot disk image format file. Finally, a snapshot operation can be performed on the target virtual machine based on the snapshot disk image format file. Thus, a disk image format file is created, and a snapshot disk image format file is created for the target virtual machine through the container storage interface plugin, thereby supporting the docking between the virtualization platform and the file storage system and improving the user experience.
[0084] In some embodiments of the present disclosure, the first processing module 410 may specifically include an image import unit and a format conversion unit.
[0085] The image import unit may be configured to import a corresponding image of the virtual machine into the system disk in response to a user's virtual machine creation operation.
[0086] The format conversion unit may be configured to convert the format of the image into a disk image format to obtain the disk image format file when the image passes the integrity check.
[0087] In some embodiments of the present disclosure, the first processing module 410 may further specifically include a first creation unit.
[0088] The first creation unit may be configured to create the disk image format file in the data disk in response to a user's virtual machine creation operation.
[0089] In some embodiments of the present disclosure, the third processing module 430 may specifically include a first snapshot unit and a second creation unit.
[0090] The first snapshot unit may be configured to perform a shutdown snapshot for the target virtual machine.
[0091] The second creation unit may be configured to perform a snapshot creation operation on the target virtual machine through the container storage interface plugin to obtain a corresponding snapshot disk image format file, and the snapshot disk image format file points to the disk image format file.
[0092] In some embodiments of the present disclosure, the third processing module 430 may further specifically include a second snapshot unit, a real-time monitoring unit, and a second creation unit.
[0093] The second snapshot unit may be configured to perform a startup snapshot for the target virtual machine.
[0094] The real-time monitoring unit may be configured to perform real-time update monitoring and path adjustment through a snapshot interface.
[0095] The second creation unit may be configured to perform a snapshot creation operation on the target virtual machine through the container storage interface plug-in to obtain a corresponding snapshot disk image format file.
[0096] In some embodiments of the present disclosure, the virtual machine management device 400 based on the disk image format may further include a disk creation module.
[0097] The disk creation module can be used to create a new backup system disk based on the system disk, and copy the snapshot disk image format file to the new backup system disk.
[0098] In some embodiments of the present disclosure, the virtual machine management device 400 based on the disk image format may further include a snapshot recovery module.
[0099] The snapshot recovery module can be used to perform a snapshot recovery operation based on a new backup system disk.
[0100] It should be noted that Figure 4 The virtual machine management device 400 shown in the disk image format can execute Figures 1 to 3 The various steps in the method embodiment shown are implemented Figures 1 to 3 The various processes and effects in the method embodiment shown are not described in detail here.
[0101] Figure 5 A schematic structural diagram of a virtual machine management device based on a disk image format provided by an embodiment of the present disclosure is shown.
[0102] In some embodiments of the present disclosure, Figure 5 The virtual machine management device based on the disk image format shown may be an electronic device. Specifically, the electronic device may include but is not limited to devices such as computer devices, cloud servers or cloud server clusters.
[0103] like Figure 5 As shown, the virtual machine management device based on the disk image format may include a processor 501 and a memory 502 storing computer program instructions.
[0104] Specifically, the processor 501 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0105] The memory 502 may include a mass memory for information or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 502 may include removable or non-removable (or fixed) media. Where appropriate, the memory 502 may be internal or external to the integrated gateway device. In a particular embodiment, the memory 502 is a non-volatile solid-state memory. In a particular embodiment, the memory 502 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0106] The processor 501 reads and executes the computer program instructions stored in the memory 502 to perform the steps of the virtual machine management method provided by the embodiments of the present disclosure based on the disk image format.
[0107] In one example, the virtual machine management device based on the disk image format may further include a transceiver 503 and a bus 504. Among them, as Figure 5 shown, the processor 501, the memory 502, and the transceiver 503 are connected through the bus 504 and complete communication with each other.
[0108] The bus 504 includes hardware, software, or both. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side BUS (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable bus or a combination of two or more of these. Where appropriate, the bus 504 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0109] Embodiments of the present disclosure also provide a computer-readable storage medium that may store a computer program, which when executed by a processor, causes the processor to implement the virtual machine management method based on a disk image format provided by the embodiments of the present disclosure.
[0110] The above storage medium may include, for example, a memory 502 storing computer program instructions, and the above instructions may be executed by a processor 501 of a virtual machine management device based on a disk image format to complete the virtual machine management method based on a disk image format provided by the embodiments of the present disclosure. Optionally, the storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be a ROM, a Random Access Memory (RAM), a Compact Disc ROM (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0111] It should be noted that, in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0112] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A virtual machine management method based on a disk image format, characterized in that Including: In response to a virtual machine creation operation by a user, creating a corresponding disk image format file; Based on the disk image format file, starting a target virtual machine; Performing a snapshot creation operation on the target virtual machine through a container storage interface plugin to obtain a corresponding snapshot disk image format file; Performing a snapshot operation on the target virtual machine based on the snapshot disk image format file.
2. The method according to claim 1, wherein The step of, in response to a virtual machine creation operation by a user, creating a corresponding disk image format file includes: In response to a virtual machine creation operation by a user, importing a corresponding image of the virtual machine into the system disk; In the case where the image passes integrity verification, converting the format of the image into a disk image format to obtain the disk image format file.
3. The method according to claim 1, wherein The step of, in response to a virtual machine creation operation by a user, creating a corresponding disk image format file includes: In response to a virtual machine creation operation by a user, creating the disk image format file in the data disk.
4. The method according to claim 1, wherein The step of performing a snapshot creation operation on the target virtual machine through a container storage interface plugin to obtain a corresponding snapshot disk image format file includes: Performing a shutdown snapshot for the target virtual machine; Performing a snapshot creation operation on the target virtual machine through the container storage interface plugin to obtain a corresponding snapshot disk image format file, where the snapshot disk image format file points to the disk image format file.
5. The method according to claim 1, wherein The step of performing a snapshot creation operation on the target virtual machine through a container storage interface plugin to obtain a corresponding snapshot disk image format file includes: Performing a startup snapshot for the target virtual machine; Performing real-time update monitoring and path adjustment through a snapshot interface; Performing a snapshot creation operation on the target virtual machine through the container storage interface plugin to obtain a corresponding snapshot disk image format file.
6. The method according to claim 1, characterized in that, The method further includes: Based on the system disk, creating a new backup system disk and copying the snapshot disk image format file to the new backup system disk.
7. The method according to claim 6, characterized in that The method further includes: Performing a snapshot recovery operation based on the new backup system disk.
8. A virtual machine management device based on a disk mirroring format, characterized in that, Including: A first processing module, configured to, in response to a virtual machine creation operation by a user, create a corresponding disk image format file; A second processing module, configured to start a target virtual machine based on the disk image format file; A third processing module, configured to perform a snapshot creation operation on the target virtual machine through a container storage interface plugin to obtain a corresponding snapshot disk image format file; A fourth processing module, configured to perform a snapshot operation on the target virtual machine based on the snapshot disk image format file.
9. A virtual machine management device based on a disk mirror format, characterized in that, Including: A processor; A memory, configured to store executable instructions; Wherein, the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the virtual machine management method based on a disk image format according to any one of claims 1 - 7 above.
10. A non-volatile computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to implement the virtual machine management method based on a disk image format according to any one of claims 1 - 7 above.