[go: up one dir, main page]

CN109656679B - A storage access method and device for a virtual machine - Google Patents

A storage access method and device for a virtual machine Download PDF

Info

Publication number
CN109656679B
CN109656679B CN201811312392.XA CN201811312392A CN109656679B CN 109656679 B CN109656679 B CN 109656679B CN 201811312392 A CN201811312392 A CN 201811312392A CN 109656679 B CN109656679 B CN 109656679B
Authority
CN
China
Prior art keywords
disk
virtual
network disk
virtual machine
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811312392.XA
Other languages
Chinese (zh)
Other versions
CN109656679A (en
Inventor
钟晋明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Cloud Technologies Co Ltd
Original Assignee
New H3C Cloud Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Cloud Technologies Co Ltd filed Critical New H3C Cloud Technologies Co Ltd
Priority to CN201811312392.XA priority Critical patent/CN109656679B/en
Publication of CN109656679A publication Critical patent/CN109656679A/en
Application granted granted Critical
Publication of CN109656679B publication Critical patent/CN109656679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请提供了一种虚拟机的存储访问方法及装置,其中,服务器登录为虚拟机分配的网络磁盘的存储服务并获取网络磁盘的标识符,基于网络磁盘为虚拟机创建具有网络磁盘的标识符的虚拟磁盘。之后虚拟机在基于虚拟磁盘启动操作系统后登录网络磁盘的存储服务,然后基于网络磁盘与虚拟磁盘共用的标识符,确定虚拟机的存储访问路径包括网络磁盘的访问路径以及虚拟磁盘的访问路径,虚拟磁盘的访问路径为主路径,网络磁盘的访问路径为备路径。之后虚拟机在检测到服务器登出网络磁盘的存储服务之后将网络磁盘的访问路径切换为主路径。由此可以仅在虚拟机启动阶段占用少量的服务器资源来访问虚拟磁盘,在虚拟机启动之后虚拟机直接访问网络磁盘。

Figure 201811312392

The present application provides a storage access method and device for a virtual machine, wherein a server logs in to a storage service of a network disk allocated for the virtual machine and obtains an identifier of the network disk, and creates an identifier with the network disk for the virtual machine based on the network disk. virtual disk. After that, the virtual machine logs in to the storage service of the network disk after starting the operating system based on the virtual disk, and then determines the storage access path of the virtual machine based on the identifier shared by the network disk and the virtual disk, including the access path of the network disk and the access path of the virtual disk. The access path of the virtual disk is the primary path, and the access path of the network disk is the secondary path. After that, the virtual machine switches the access path of the network disk to the primary path after detecting that the server logs out of the storage service of the network disk. Therefore, only a small amount of server resources can be occupied to access the virtual disk during the startup phase of the virtual machine, and the virtual machine can directly access the network disk after the virtual machine is started.

Figure 201811312392

Description

一种虚拟机的存储访问方法及装置A storage access method and device for a virtual machine

技术领域technical field

本申请涉及存储技术领域,具体而言,涉及一种虚拟机的存储访问方法及装置。The present application relates to the field of storage technologies, and in particular, to a storage access method and device for a virtual machine.

背景技术Background technique

在虚拟化环境中,虚拟机可使用的磁盘一般分为两种:一种是虚拟磁盘,另一种是网络磁盘。目前,虚拟机每次访问虚拟磁盘时,都需要通过虚拟网卡与服务器建立通信连接,再由服务器访问对应的虚拟磁盘。上述访问过程需要借助服务器才能实现对虚拟磁盘的访问,访问路径较长,且需要占用较多服务器的资源。为缩短访问路径,减少对服务器资源的占用,虚拟机可以直接登录网络磁盘的存储服务,以实现访问网络磁盘。具体的,虚拟机可以在基本输入输出系统(Basic Input Output System,BIOS)启动阶段,通过存储区域网络(Storage Area Network,SAN)登录网络磁盘的存储服务,进而访问网络磁盘,从网络磁盘上启动BIOS。In a virtualized environment, there are generally two types of disks that can be used by virtual machines: one is virtual disk and the other is network disk. Currently, every time a virtual machine accesses a virtual disk, it needs to establish a communication connection with the server through a virtual network card, and then the server accesses the corresponding virtual disk. The above access process requires the help of a server to access the virtual disk, the access path is long, and more server resources are occupied. In order to shorten the access path and reduce the occupation of server resources, the virtual machine can directly log in to the storage service of the network disk to access the network disk. Specifically, the virtual machine can log in to the storage service of the network disk through the Storage Area Network (SAN) during the basic input output system (Basic Input Output System, BIOS) startup phase, and then access the network disk and start from the network disk BIOS.

但是,上述虚拟机访问网络磁盘的方式受BIOS的技术规格的影响,能够支持的网络存储协议有限,仅适用于互联网小型计算机系统接口(Internet Small ComputerSystem Interface,iSCSI)、光纤通道(Fibre Channel,FC)等协议中,对于一些新的网络存储技术并不适用,可扩展性较差。However, the way the virtual machine accesses the network disk is affected by the technical specifications of the BIOS, and the network storage protocols that can be supported are limited, and are only applicable to the Internet Small Computer System Interface (iSCSI), Fibre Channel (FC) ) and other protocols, it is not applicable to some new network storage technologies, and the scalability is poor.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本申请的目的在于提供一种虚拟机的存储访问方法及装置,可以仅在虚拟机启动阶段占用少量的服务器资源来访问虚拟磁盘,在虚拟机启动之后,虚拟机直接访问网络磁盘,应用范围较为广泛,可扩展性较好。In view of this, the purpose of the present application is to provide a storage access method and device for a virtual machine, which can only occupy a small amount of server resources to access the virtual disk during the startup phase of the virtual machine. After the virtual machine is started, the virtual machine directly accesses the network disk. , the application range is wider and the scalability is better.

第一方面,本申请提供了一种虚拟机的存储访问方法,应用于服务器中,所述服务器中创建有虚拟机,所述方法包括:In a first aspect, the present application provides a storage access method for a virtual machine, which is applied to a server where a virtual machine is created, and the method includes:

登录为所述虚拟机分配的网络磁盘的存储服务并获取所述网络磁盘的标识符;Log in to the storage service of the network disk allocated for the virtual machine and obtain the identifier of the network disk;

基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘;creating a virtual disk for the virtual machine with an identifier of the network disk based on the network disk;

在确定所述虚拟机基于所述虚拟磁盘启动操作系统后,指示所述虚拟机登录所述网络磁盘的存储服务;其中,所述虚拟机登录到所述网络磁盘的存储服务后的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;After determining that the virtual machine starts the operating system based on the virtual disk, instruct the virtual machine to log in to the storage service of the network disk; wherein, the storage access path after the virtual machine logs in to the storage service of the network disk Including the access path of the network disk and the access path of the virtual disk, the access path of the virtual disk is the primary path, and the access path of the network disk is the backup path;

登出所述网络磁盘的存储服务,以使所述虚拟机将所述网络磁盘的访问路径切换为主路径。Log out of the storage service of the network disk, so that the virtual machine switches the access path of the network disk to the main path.

一种可能的实施方式中,所述登录为所述虚拟机分配的网络磁盘的存储服务,包括:In a possible implementation manner, the logging in to the storage service of the network disk allocated for the virtual machine includes:

获取所述网络磁盘的互联网协议IP地址和所述网络磁盘的名称,基于所述IP地址和所述名称,登录所述网络磁盘的存储服务。Obtain the Internet Protocol IP address of the network disk and the name of the network disk, and log in to the storage service of the network disk based on the IP address and the name.

一种可能的实施方式中,所述基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘,包括:In a possible implementation manner, the creating a virtual disk with an identifier of the network disk for the virtual machine based on the network disk includes:

在所述网络磁盘中创建具有临时标识符的所述虚拟磁盘;creating the virtual disk with a temporary identifier in the network disk;

将所述虚拟磁盘的临时标识符修改为所述网络磁盘的标识符。Modify the temporary identifier of the virtual disk to the identifier of the network disk.

一种可能的实施方式中,所述登出所述网络磁盘的存储服务,包括:In a possible implementation manner, the logging out of the storage service of the network disk includes:

在接收到所述虚拟机发送的指示卸载所述网络磁盘的卸载指令后,基于所述网络磁盘IP地址和所述网络磁盘的名称,登出所述网络磁盘的存储服务。After receiving the uninstall instruction sent by the virtual machine for instructing to uninstall the network disk, log out the storage service of the network disk based on the IP address of the network disk and the name of the network disk.

一种可能的实施方式中,在登出所述网络磁盘的存储服务之后,还包括:In a possible implementation manner, after logging out of the storage service of the network disk, the method further includes:

删除所述虚拟磁盘的配置信息。Delete the configuration information of the virtual disk.

第二方面,本申请提供一种虚拟机的存储访问方法,应用于在服务器上创建的虚拟机中,所述方法包括:In a second aspect, the present application provides a storage access method for a virtual machine, which is applied to a virtual machine created on a server, and the method includes:

基于虚拟磁盘,启动所述虚拟机的操作系统;其中,所述虚拟磁盘为所述服务器基于网络磁盘为所述虚拟机创建的,所述网络磁盘与所述虚拟磁盘的标识符一致;Start the operating system of the virtual machine based on the virtual disk; wherein, the virtual disk is created by the server for the virtual machine based on a network disk, and the identifier of the network disk is consistent with the identifier of the virtual disk;

在所述服务器的指示下登录所述网络磁盘的存储服务;Log in to the storage service of the network disk under the instruction of the server;

基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径;其中,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;Based on the identifier shared by the network disk and the virtual disk, it is determined that the storage access path of the virtual machine includes an access path of the network disk and an access path of the virtual disk; The access path is the primary path, and the access path of the network disk is the backup path;

检测到所述服务器登出所述网络磁盘的存储服务之后,将所述网络磁盘的访问路径切换为主路径。After detecting that the server logs out of the storage service of the network disk, the access path of the network disk is switched to the main path.

一种可能的实施方式中,所述基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,包括:In a possible implementation manner, the determining of the storage access path of the virtual machine based on the identifier shared by the network disk and the virtual disk includes an access path of the network disk and an access path of the virtual disk. Access paths, including:

在识别到所述网络磁盘与所述虚拟磁盘共用所述标识符时,通过启动多路径服务,将所述虚拟磁盘的访问路径确定为主路径,将所述网络磁盘的访问路径确定为备路径。When it is recognized that the network disk and the virtual disk share the identifier, by starting the multi-path service, the access path of the virtual disk is determined as the primary path, and the access path of the network disk is determined as the backup path .

第四方面,本申请提供一种虚拟机的存储访问装置,所述装置包括:In a fourth aspect, the present application provides a storage access device for a virtual machine, the device comprising:

获取模块,用于登录为所述虚拟机分配的网络磁盘的存储服务并获取所述网络磁盘的标识符;an obtaining module, configured to log in to the storage service of the network disk allocated for the virtual machine and obtain the identifier of the network disk;

创建模块,用于基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘;A creation module, configured to create a virtual disk with the identifier of the network disk for the virtual machine based on the network disk;

指示模块,用于在确定所述虚拟机基于所述虚拟磁盘启动操作系统后,指示所述虚拟机登录所述网络磁盘的存储服务;其中,所述虚拟机登录到所述网络磁盘的存储服务后的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;an instructing module, configured to instruct the virtual machine to log in to the storage service of the network disk after determining that the virtual machine starts the operating system based on the virtual disk; wherein the virtual machine logs in to the storage service of the network disk The latter storage access path includes the access path of the network disk and the access path of the virtual disk, the access path of the virtual disk is the primary path, and the access path of the network disk is the backup path;

卸载模块,用于登出所述网络磁盘的存储服务,以使所述虚拟机将所述网络磁盘的访问路径切换为主路径。The uninstallation module is configured to log out of the storage service of the network disk, so that the virtual machine switches the access path of the network disk to the main path.

一种可能的设计中,所述获取模块在登录为所述虚拟机分配的网络磁盘的存储服务时,具体用于:In a possible design, when the acquisition module logs in to the storage service of the network disk allocated for the virtual machine, it is specifically used to:

获取所述网络磁盘的互联网协议IP地址和所述网络磁盘的名称,基于所述IP地址和所述名称,登录所述网络磁盘的存储服务。Obtain the Internet Protocol IP address of the network disk and the name of the network disk, and log in to the storage service of the network disk based on the IP address and the name.

一种可能的设计中,所述创建模块基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘时,具体用于:In a possible design, when the creation module creates a virtual disk with the identifier of the network disk for the virtual machine based on the network disk, it is specifically used for:

在所述网络磁盘中创建具有临时标识符的所述虚拟磁盘;creating the virtual disk with a temporary identifier in the network disk;

将所述虚拟磁盘的临时标识符修改为所述网络磁盘的标识符。Modify the temporary identifier of the virtual disk to the identifier of the network disk.

一种可能的设计中,所述卸载模块在登出所述网络磁盘的存储服务时,具体用于:In a possible design, when the unloading module logs out of the storage service of the network disk, it is specifically used to:

在接收到所述虚拟机发送的指示卸载所述网络磁盘的卸载指令后,基于所述网络磁盘IP地址和所述网络磁盘的名称,登出所述网络磁盘的存储服务。After receiving the uninstall instruction sent by the virtual machine for instructing to uninstall the network disk, log out the storage service of the network disk based on the IP address of the network disk and the name of the network disk.

一种可能的设计中,所述卸载模块在登出所述网络磁盘的存储服务之后,还用于:In a possible design, after logging out of the storage service of the network disk, the unloading module is further configured to:

删除所述虚拟磁盘的配置信息。Delete the configuration information of the virtual disk.

第四方面,本申请还提供一种虚拟机的存储访问装置,所述装置包括:In a fourth aspect, the present application further provides a storage access device for a virtual machine, the device comprising:

启动模块,用于基于虚拟磁盘,启动所述虚拟机的操作系统;其中,所述虚拟磁盘为所述服务器基于网络磁盘为所述装置创建的,所述网络磁盘与所述虚拟磁盘的标识符一致;a startup module, configured to start the operating system of the virtual machine based on the virtual disk; wherein the virtual disk is created by the server for the device based on the network disk, and the identifier of the network disk and the virtual disk consistent;

连接模块,用于在所述服务器的指示下登录所述网络磁盘的存储服务;a connection module, used for logging in the storage service of the network disk under the instruction of the server;

确定模块,用于基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径;其中,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;a determining module, configured to determine, based on the identifier shared by the network disk and the virtual disk, that the storage access path of the virtual machine includes the access path of the network disk and the access path of the virtual disk; wherein, The access path of the virtual disk is the primary path, and the access path of the network disk is the backup path;

切换模块,用于检测到所述服务器登出所述网络磁盘的存储服务之后,将所述网络磁盘的访问路径切换为主路径。The switching module is configured to switch the access path of the network disk to the main path after detecting that the server logs out of the storage service of the network disk.

一种可能的设计中,所述确定模块在基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径时,具体用于:In a possible design, the determining module determines, based on the identifier shared by the network disk and the virtual disk, that the storage access path of the virtual machine includes the access path of the network disk and the virtual disk. When the access path of the disk is used, it is specifically used for:

在识别到所述网络磁盘与所述虚拟磁盘共用所述标识符时,通过启动多路径服务,将所述虚拟磁盘的访问路径确定为主路径,将所述网络磁盘的访问路径确定为备路径。When it is recognized that the network disk and the virtual disk share the identifier, by starting the multi-path service, the access path of the virtual disk is determined as the primary path, and the access path of the network disk is determined as the backup path .

第五方面,本申请实施例还提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行上述第一方面,或第一方面的任一种可能的实施方式中虚拟机的存储访问方法的步骤。In a fifth aspect, embodiments of the present application further provide an electronic device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the processing A bus communicates between the processor and the memory, and when the machine-readable instructions are executed by the processor, the first aspect or the storage access method for a virtual machine in any possible implementation manner of the first aspect is performed. step.

第六方面,本申请实施例还提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行上述第二方面,或第二方面的任一种可能的实施方式中虚拟机的存储访问方法的步骤。In a sixth aspect, embodiments of the present application further provide an electronic device, including: a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the processing A bus communicates between the processor and the memory, and when the machine-readable instructions are executed by the processor, the second aspect or the storage access method for a virtual machine in any possible implementation manner of the second aspect is performed. step.

第七方面,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述第一方面,或第一方面的任一种可能的实施方式中虚拟机的存储访问方法的步骤,或者,执行上述第二方面,或第二方面的任一种可能的实施方式中虚拟机的存储访问方法的步骤。In a seventh aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to execute the first aspect, or any of the first aspect. The steps of the storage access method for a virtual machine in a possible implementation manner, or the steps of the second aspect or the storage access method for a virtual machine in any possible implementation manner of the second aspect are performed.

本申请实施例中,服务器可以登录为虚拟机分配的网络磁盘的存储服务并获取网络磁盘的标识符,之后基于网络磁盘为虚拟机创建具有网络磁盘的标识符的虚拟磁盘,这样,虚拟机可以通过借助服务器来访问虚拟磁盘。在虚拟机基于虚拟磁盘启动操作系统之后,服务器可以指示虚拟机登录与网络磁盘的连接。进一步地,虚拟机在连接网络磁盘之后,通过识别出网络磁盘的标识符与之前访问的虚拟磁盘的标识符一致,能够确定出访问同一存储空间的存储访问路径既可以是虚拟磁盘的访问路径,也可以是网络磁盘的访问路径,进而可以将虚拟磁盘的访问路径作为主路径,将网络磁盘的访问路径为备路径。然后,在服务器登出网络磁盘的存储服务之后,虚拟机无法正常借助服务器来访问虚拟磁盘,虚拟磁盘的访问路径出现故障,进而虚拟机可以将网络磁盘的访问路径切换为主路径,由此实现虚拟机直接访问网络磁盘。In this embodiment of the present application, the server may log in to the storage service of the network disk allocated for the virtual machine and obtain the identifier of the network disk, and then create a virtual disk with the identifier of the network disk for the virtual machine based on the network disk. In this way, the virtual machine can The virtual disk is accessed through a server. After the virtual machine boots the operating system based on the virtual disk, the server may instruct the virtual machine to log in to the connection to the network disk. Further, after the virtual machine is connected to the network disk, by identifying that the identifier of the network disk is consistent with the identifier of the virtual disk accessed before, it can be determined that the storage access path accessing the same storage space can be the access path of the virtual disk, It can also be the access path of the network disk, and then the access path of the virtual disk can be used as the primary path, and the access path of the network disk can be used as the backup path. Then, after the server logs out of the storage service of the network disk, the virtual machine cannot access the virtual disk with the help of the server normally, and the access path of the virtual disk fails, and the virtual machine can switch the access path of the network disk to the main path. The virtual machine accesses the network disk directly.

通过上述方案,可以仅在虚拟机启动阶段占用少量的服务器资源来访问虚拟磁盘,在虚拟机启动之后,虚拟机可以直接登录网络磁盘的存储服务,进而将虚拟磁盘的访问路径和网络磁盘的访问路径形成主备路径,并且服务器在登出网络磁盘的存储服务后,虚拟机无法正常借助服务器来访问虚拟磁盘,进而虚拟机在识别出虚拟磁盘的访问路径发生故障之后,可以将网络磁盘的访问路径作为主路径,从而无需占用服务器资源,达到直接访问网络磁盘的目的。Through the above solution, only a small amount of server resources can be occupied to access the virtual disk during the startup phase of the virtual machine. After the virtual machine is started, the virtual machine can directly log in to the storage service of the network disk, and then access the access path of the virtual disk and the network disk. The path forms the primary and secondary paths, and after the server logs out of the storage service of the network disk, the virtual machine cannot use the server to access the virtual disk normally. The path is used as the main path, so as to achieve the purpose of directly accessing the network disk without occupying server resources.

并且,由于虚拟机登录网络磁盘的存储服务的方式是在虚拟机成功启动操作系统之后进行的,相比现有技术中基于特定的网络存储协议在启动虚拟机的操作系统的过程中通过SAN网络来登录网络磁盘的存储服务的过程,本方案可以不依赖的虚拟机的操作系统的技术规格,也不再受限于几种特定的网络协议,应用范围较为广泛,可扩展性较好。Moreover, since the way that the virtual machine logs into the storage service of the network disk is performed after the virtual machine successfully starts the operating system, compared with the prior art based on a specific network storage protocol in the process of starting the operating system of the virtual machine through the SAN network. In the process of logging in to the storage service of the network disk, this solution does not depend on the technical specifications of the operating system of the virtual machine, nor is it limited by several specific network protocols, and has a wide range of applications and good scalability.

为使本申请的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the preferred embodiments are exemplified below, and are described in detail as follows in conjunction with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following drawings will briefly introduce the drawings that need to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore do not It should be regarded as a limitation of the scope, and for those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without any creative effort.

图1示出了本申请实施例提供的一种可能的系统架构示意图;FIG. 1 shows a schematic diagram of a possible system architecture provided by an embodiment of the present application;

图2示出了本申请实施例提供的虚拟机的存储访问方法的流程示意图;FIG. 2 shows a schematic flowchart of a storage access method for a virtual machine provided by an embodiment of the present application;

图3示出了本申请实施例提供的一种虚拟机的存储访问装置30的结构示意图;FIG. 3 shows a schematic structural diagram of a storage access device 30 for a virtual machine provided by an embodiment of the present application;

图4示出了本申请实施例提供的一种虚拟机的存储访问装置40的结构示意图;FIG. 4 shows a schematic structural diagram of a storage access device 40 for a virtual machine provided by an embodiment of the present application;

图5示出了申请实施例提供的一种电子设备的结构示意图。FIG. 5 shows a schematic structural diagram of an electronic device provided by an embodiment of the application.

具体实施方式Detailed ways

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of the present application, but not all of the embodiments. The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Thus, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

在虚拟化环境中,虚拟机可使用的磁盘有两种,一种是虚拟磁盘,另一种是网络磁盘。其中,虚拟磁盘可以理解为在服务器或其它存储设备上创建的文件系统上的文件或者块设备。网络磁盘可以理解为是SAN部署的远端存储设备中为虚拟机分配的存储介质。其中,虚拟机的虚拟磁盘通常作为系统盘使用,在系统盘上通常存储有虚拟机的操作系统以及运行操作系统的相关参数等。虚拟机的网络磁盘通常是作为虚拟机的数据盘使用,在数据盘上通常可以存储有虚拟机的各项应用数据,例如在虚拟机上使用应用程序产生的各类应用数据等。In a virtualized environment, there are two types of disks that can be used by virtual machines, one is virtual disk and the other is network disk. The virtual disk may be understood as a file or block device on a file system created on a server or other storage device. A network disk can be understood as a storage medium allocated to a virtual machine in a remote storage device deployed in a SAN. The virtual disk of the virtual machine is usually used as a system disk, and the operating system of the virtual machine and the relevant parameters of the operating system are usually stored on the system disk. The network disk of the virtual machine is usually used as the data disk of the virtual machine, and various application data of the virtual machine can usually be stored on the data disk, such as various application data generated by using the application program on the virtual machine.

由于虚拟机每次访问虚拟磁盘时,都需要依赖服务器,故导致访问路径较长、访问速度较慢且需要占用较多的服务器资源的问题。为了克服上述问题,目前提出可以将网络磁盘既作为系统盘使用,也作为数据盘使用,由此实现虚拟机直接访问网络磁盘。而在现有的实现方法中,是虚拟机的启动过程中,通过SAN登录网络磁盘的存储服务,进而虚拟机才能访问网络磁盘,并从网络磁盘上启动BIOS,但是由于这种访问的方式能够支持的网络存储协议有限,很难适用在一些新的网络存储技术中,使得应用范围受限,可扩展性不好。Since the virtual machine needs to rely on the server every time it accesses the virtual disk, the problems of long access path, slow access speed and more server resources are required. In order to overcome the above problems, it is currently proposed that the network disk can be used as both a system disk and a data disk, so that the virtual machine can directly access the network disk. In the existing implementation method, during the startup process of the virtual machine, the storage service of the network disk is logged in through the SAN, so that the virtual machine can access the network disk and start the BIOS from the network disk. The supported network storage protocols are limited, and it is difficult to apply to some new network storage technologies, resulting in limited application scope and poor scalability.

针对上述情况,本申请中提供了一种虚拟机的存储访问方法及装置,可以实现虚拟机直接访问网络磁盘。首先,对本申请实施例可适用的一种系统架构示意图进行介绍。参照图1所示,该系统包括服务器、创建在服务器上的虚拟机、以及存储设备。其中,存储设备可以配置在云端,存储设备中预先划分了一部分存储空间提供给虚拟机使用,划分的这部分存储空间作为虚拟机的网络磁盘,并且这部分存储空间可以利用逻辑单元号(logicalunit number,lun)来标识。In view of the above situation, the present application provides a storage access method and device for a virtual machine, which can realize that the virtual machine directly accesses a network disk. First, a schematic diagram of a system architecture applicable to the embodiments of the present application is introduced. Referring to FIG. 1 , the system includes a server, a virtual machine created on the server, and a storage device. The storage device can be configured in the cloud, and a part of the storage space is pre-divided in the storage device for use by the virtual machine. This part of the storage space is used as the network disk of the virtual machine, and this part of the storage space can use the logical unit number , lun) to identify.

本申请提供的技术方案中,服务器可以登录网络磁盘的存储服务,并基于网络磁盘为虚拟机创建虚拟磁盘。虚拟机处于启动阶段时,可以通过服务器访问虚拟磁盘来启动操作系统。其中,由于虚拟磁盘创建在网络磁盘上,故虚拟机通过服务器访问虚拟磁盘的过程,也就相当于虚拟机通过虚拟磁盘来访问网络磁盘。进一步地,虚拟机在启动操作系统后,可以在服务器的指示下登录网络磁盘的存储服务,然后通过启动多路径服务,将虚拟磁盘的访问路径和网络磁盘的访问路径形成主备路径,使虚拟机可以同时支持访问虚拟磁盘和访问网络磁盘这两种方式。进一步地,虚拟机在启动多路径服务之后,还可以指示服务器卸载虚拟磁盘,以便切断多路径服务中访问虚拟磁盘的路径,使网络磁盘的访问路径切换为主路径,最终实现虚拟机访问网络磁盘的目的。In the technical solution provided by the present application, the server can log in to the storage service of the network disk, and create a virtual disk for the virtual machine based on the network disk. While the virtual machine is in the boot phase, the server can access the virtual disk to start the operating system. Among them, since the virtual disk is created on the network disk, the process of the virtual machine accessing the virtual disk through the server is equivalent to the virtual machine accessing the network disk through the virtual disk. Further, after the virtual machine starts the operating system, it can log in to the storage service of the network disk under the instruction of the server, and then by starting the multi-path service, the access path of the virtual disk and the access path of the network disk form the primary and secondary paths, so that the virtual The computer can support both access to virtual disk and access to network disk at the same time. Further, after the virtual machine starts the multi-pathing service, it can also instruct the server to unload the virtual disk, so as to cut off the path for accessing the virtual disk in the multi-pathing service, so that the access path of the network disk is switched to the main path, and finally the virtual machine can access the network disk. the goal of.

下面,结合具体实施例对本申请提供的虚拟机的存储访问方式进行详细说明。Hereinafter, the storage access mode of the virtual machine provided by the present application will be described in detail with reference to specific embodiments.

参照图2所示,为本申请实施例提供的虚拟机的存储访问方法的流程示意图,该示意图中描述了服务器与虚拟机之间的具体交互流程,以实现虚拟机直接访问网络磁盘。具体交互过程如下:Referring to FIG. 2, which is a schematic flowchart of a storage access method for a virtual machine provided by an embodiment of the present application, the schematic diagram describes a specific interaction process between a server and a virtual machine, so that the virtual machine can directly access a network disk. The specific interaction process is as follows:

步骤201、服务器登录为虚拟机分配的网络磁盘的存储服务并获取网络磁盘的标识符。Step 201: The server logs in to the storage service of the network disk allocated to the virtual machine and obtains the identifier of the network disk.

具体实施中,服务器可以获取为虚拟机分配的网络磁盘的配置参数,配置参数例如为网络磁盘的名称、以及网络磁盘的IP地址等。获取方式例如为接收到其它设备或用户输入的携带有配置参数的指令等。之后,服务器可以基于网络磁盘的IP地址和网络磁盘的名称,登录网络磁盘的存储服务,在登录到网络磁盘的存储服务之后,识别出网络磁盘的标识符。其中,网络磁盘的标识符例如为全球标识符(world wide identifier,wwid)。In a specific implementation, the server may obtain configuration parameters of the network disk allocated to the virtual machine, where the configuration parameters are, for example, the name of the network disk and the IP address of the network disk. The acquisition method is, for example, receiving an instruction carrying configuration parameters input by other devices or users, and the like. After that, the server can log in to the storage service of the network disk based on the IP address of the network disk and the name of the network disk, and after logging in to the storage service of the network disk, identify the identifier of the network disk. The identifier of the network disk is, for example, a world wide identifier (wwid).

步骤202、服务器基于网络磁盘创建具有网络磁盘的标识符的虚拟磁盘。Step 202: The server creates a virtual disk with an identifier of the network disk based on the network disk.

具体实施中,服务器基于网络磁盘为虚拟机创建虚拟磁盘时,可以配置虚拟磁盘的类型、驱动以及源路径等。其中,虚拟磁盘的类型可以为文件或者块设备;虚拟机的驱动可以根据具体的虚拟化环境来配置;虚拟机的源路径可以基于网络磁盘的名称、IP地址以及存储空间对应的逻辑单元号lun来生成。In a specific implementation, when the server creates a virtual disk for a virtual machine based on a network disk, the type, driver and source path of the virtual disk can be configured. Among them, the type of the virtual disk can be a file or a block device; the driver of the virtual machine can be configured according to the specific virtualization environment; the source path of the virtual machine can be based on the name of the network disk, the IP address and the logical unit number corresponding to the storage space. to generate.

一种可能的实施方式中,服务器在创建虚拟磁盘的过程中,可以为虚拟磁盘分配一个临时标识符,该临时标识符的分配可以是随机的,也可以是按照预设规则来分配。在创建了具备该临时标识符的虚拟磁盘之后,由于虚拟磁盘的源路径实际指向的是网络磁盘对应的存储空间,也就是说虚拟磁盘与网络磁盘占用同一存储空间,故可以将虚拟磁盘的临时标识符修改为网络磁盘的标识符,以便将虚拟磁盘与网络磁盘相关联。In a possible implementation manner, during the process of creating the virtual disk, the server may assign a temporary identifier to the virtual disk, and the assignment of the temporary identifier may be random, or may be assigned according to a preset rule. After the virtual disk with the temporary identifier is created, since the source path of the virtual disk actually points to the storage space corresponding to the network disk, that is to say, the virtual disk and the network disk occupy the same storage space, the temporary The identifier is modified to the identifier of the network disk in order to associate the virtual disk with the network disk.

另一种可能的实施方式中,服务器在识别出网络磁盘的标识符后,由于网络磁盘与虚拟磁盘占用同一存储空间,故可以直接将创建的虚拟磁盘的标识符配置为网络磁盘的标识符,以便将虚拟磁盘与网络磁盘相关联。In another possible implementation manner, after the server recognizes the identifier of the network disk, since the network disk and the virtual disk occupy the same storage space, the identifier of the created virtual disk can be directly configured as the identifier of the network disk, in order to associate the virtual disk with the network disk.

步骤203、虚拟机基于创建的虚拟磁盘启动操作系统。Step 203: The virtual machine starts the operating system based on the created virtual disk.

本申请实施例中,在服务器为虚拟机创建了虚拟磁盘之后,虚拟机可以感知到虚拟磁盘能够被使用,故虚拟机可以通过访问虚拟磁盘来启动操作系统。其中,这一访问过程需要服务器的参与,具体的,是由服务器基于网络磁盘的存储服务,去访问网络磁盘上的虚拟磁盘,进而由服务器将从虚拟磁盘上读取的操作系统通知给虚拟机,以便虚拟机启动操作系统。In this embodiment of the present application, after the server creates a virtual disk for the virtual machine, the virtual machine can perceive that the virtual disk can be used, so the virtual machine can start the operating system by accessing the virtual disk. Among them, this access process requires the participation of the server. Specifically, the server accesses the virtual disk on the network disk based on the storage service of the network disk, and then the server notifies the virtual machine of the operating system read from the virtual disk. , so that the virtual machine starts the operating system.

步骤204、服务器在确定虚拟机启动操作系统后,指示虚拟机登录网络磁盘的存储服务。Step 204: After determining that the virtual machine starts the operating system, the server instructs the virtual machine to log in to the storage service of the network disk.

具体实施中,虚拟机在成功启动操作系统之后,可以向服务器发送虚拟机已启动的通知消息,服务器在接收到通知消息后,可以确定虚拟机启动。进一步地,服务器可以向虚拟机下发网络磁盘的配置参数,例如包括网络磁盘的名称、IP地址等,以指示虚拟机登录网络磁盘的存储服务。In a specific implementation, after the virtual machine successfully starts the operating system, it may send a notification message that the virtual machine has been started to the server, and the server may determine that the virtual machine is started after receiving the notification message. Further, the server may deliver configuration parameters of the network disk to the virtual machine, including, for example, the name and IP address of the network disk, so as to instruct the virtual machine to log in to the storage service of the network disk.

步骤205、虚拟机登录网络磁盘的存储服务后,基于网络磁盘与虚拟磁盘共用的标识符,确定虚拟机的存储访问路径包括网络磁盘的访问路径以及虚拟磁盘的访问路径。Step 205: After the virtual machine logs in to the storage service of the network disk, based on the identifier shared by the network disk and the virtual disk, determine that the storage access path of the virtual machine includes the access path of the network disk and the access path of the virtual disk.

具体实施中,虚拟机可以基于网络磁盘的IP地址和网络磁盘的名称,登录网络磁盘的存储服务。虚拟机在成功登录到网络磁盘的存储服务之后,可以识别出网络磁盘的标识符,并且虚拟机在之前访问虚拟磁盘时也可以识别出虚拟磁盘的标识符,由于服务器在为虚拟机创建虚拟磁盘的过程中已经将虚拟磁盘的标识符与网络磁盘的标识符配置成相同的,故虚拟机可以识别到网络磁盘与虚拟磁盘共用同一标识符。又因为共用同一标识符实际代表了网络磁盘与虚拟磁盘共用的是相同的存储空间,由此虚拟机可以确定针对同一存储空间的存储访问路径包括两个,一个是虚拟磁盘的访问路径,另一个是网络磁盘的访问路径。In a specific implementation, the virtual machine may log in to the storage service of the network disk based on the IP address of the network disk and the name of the network disk. After the virtual machine successfully logs in to the storage service of the network disk, it can recognize the identifier of the network disk, and the virtual machine can also recognize the identifier of the virtual disk when accessing the virtual disk before, because the server is creating the virtual disk for the virtual machine. During the process, the identifier of the virtual disk and the identifier of the network disk have been configured to be the same, so the virtual machine can recognize that the network disk and the virtual disk share the same identifier. And because sharing the same identifier actually means that the network disk and the virtual disk share the same storage space, the virtual machine can determine that there are two storage access paths for the same storage space, one is the access path of the virtual disk, and the other is the access path of the virtual disk. is the access path of the network disk.

本申请实施例中,虚拟机可以启动多路径服务,以便允许使用上述两条存储访问路径。其中,由于虚拟机之前已经访问过虚拟磁盘,故虚拟磁盘的访问路径可以作为主路径,而虚拟机还未访问过网络磁盘,故网络磁盘的访问路径作为备路径。并且,虚拟机在启动多路径服务时,还可以配置故障策略为高可用,这样,形成主备路径的上述两条存储访问路径中,其中一条存储访问路径发生故障时,存储访问路径可以切换到正常的那条存储访问路径上。In this embodiment of the present application, the virtual machine may start the multi-path service, so as to allow the use of the above two storage access paths. Among them, since the virtual machine has accessed the virtual disk before, the access path of the virtual disk can be used as the primary path, and the virtual machine has not accessed the network disk, so the access path of the network disk is used as the backup path. In addition, when the virtual machine starts the multi-path service, the fault policy can also be configured as high availability. In this way, when one of the two storage access paths forming the active and standby paths fails, the storage access path can be switched to on the normal storage access path.

由于考虑到实现虚拟磁盘的访问路径需要依赖于服务器,如果一直允许使用虚拟磁盘的访问路径,一方面访问路径较长,不利于提升访问效率,另一方面也占用了服务器的资源,加大了服务器的处理压力,故本申请实施例中,虚拟机在成功开启多路径服务,并且确认直接访问网络磁盘的这条存储访问路径可用之后,可以向服务器发送卸载指令,以指示服务器卸载网络磁盘。其中,卸载网络磁盘的目的在于将服务器无法正常登录网络磁盘的存储服务,由于虚拟机在访问虚拟磁盘时,需要借助服务器连接网络磁盘进而访问虚拟磁盘,如果服务器无法正常登录到网络磁盘的存储服务,那么也就导致虚拟机无法正常访问虚拟磁盘,进一步虚拟机可以确定虚拟磁盘的访问路径发生故障,进而进行主备路径切换,将存储访问路径切换到网络磁盘的访问路径。Considering that the access path of the virtual disk needs to depend on the server, if the access path of the virtual disk is always allowed, on the one hand, the access path is long, which is not conducive to improving the access efficiency, and on the other hand, it also occupies the resources of the server, which increases the The processing pressure of the server, so in the embodiment of the present application, after the virtual machine successfully starts the multi-path service and confirms that the storage access path for directly accessing the network disk is available, it can send an uninstall instruction to the server to instruct the server to uninstall the network disk. Among them, the purpose of uninstalling the network disk is to prevent the server from logging into the storage service of the network disk normally. Since the virtual machine needs to use the server to connect to the network disk to access the virtual disk when accessing the virtual disk, if the server cannot log in to the storage service of the network disk normally , then the virtual machine cannot access the virtual disk normally, and the virtual machine can determine that the access path of the virtual disk is faulty, and then switch the primary and secondary paths to switch the storage access path to the access path of the network disk.

步骤206、服务器登出网络磁盘的存储服务。Step 206, the server logs out the storage service of the network disk.

具体实施中,服务器在接收到虚拟机发送的卸载指令后,可以查找该虚拟机对应的网络磁盘的配置参数,然后基于网络磁盘IP地址和网络磁盘的名称,登出网络磁盘的存储服务。In a specific implementation, after receiving the uninstall instruction sent by the virtual machine, the server can look up the configuration parameters of the network disk corresponding to the virtual machine, and then log out of the storage service of the network disk based on the IP address of the network disk and the name of the network disk.

步骤207、虚拟机检测到服务器登出网络磁盘的存储服务之后,将网络磁盘的访问路径作为主路径。Step 207: After the virtual machine detects that the server logs out of the storage service of the network disk, the virtual machine uses the access path of the network disk as the main path.

由于服务器登出网络磁盘的存储服务,所以依赖服务器访问虚拟磁盘的路径不能被使用,虚拟机在检测到虚拟磁盘的访问路径不能使用之后,可以主动进行主备路径切换,将网络磁盘的访问路径作为主路径,后续虚拟机可以直接使用网络磁盘的访问路径,与网络磁盘之间进行通信。Since the server logs out of the storage service of the network disk, the path that relies on the server to access the virtual disk cannot be used. After the virtual machine detects that the access path of the virtual disk cannot be used, it can actively switch the active and standby paths to switch the access path of the network disk. As the primary path, subsequent virtual machines can directly use the access path of the network disk to communicate with the network disk.

此外,在一种可能的实施方式中,服务器在登出网络磁盘的存储服务之后,由于虚拟磁盘已经不能被访问,还可以删除有关虚拟磁盘的配置信息。虚拟磁盘的配置信息例如为虚拟磁盘的名称、驱动以及源路径等参数。In addition, in a possible implementation manner, after the server logs out of the storage service of the network disk, since the virtual disk cannot be accessed, the configuration information about the virtual disk may also be deleted. The configuration information of the virtual disk is, for example, parameters such as the name of the virtual disk, a driver, and a source path.

本申请实施例中,服务器可以获取为虚拟机分配的网络磁盘的标识符,并基于网络磁盘为虚拟机创建具有网络磁盘的标识符的虚拟磁盘,这样,虚拟机可以通过借助服务器来访问虚拟磁盘。在虚拟机基于虚拟磁盘启动操作系统之后,服务器可以指示虚拟机登录网络磁盘的存储服务。进一步地,虚拟机在登录网络磁盘的存储服务之后,通过识别出网络磁盘的标识符与之前访问的虚拟磁盘的标识符一致,能够确定出访问同一存储空间的存储访问路径既可以是虚拟磁盘的访问路径,也可以是网络磁盘的访问路径,进而可以将虚拟磁盘的访问路径作为主路径,将网络磁盘的访问路径为备路径。然后,服务器可以登出网络磁盘的存储服务,以便切断虚拟磁盘的访问路径,虚拟机在检测到服务器登出网络磁盘的存储服务之后,可以将网络磁盘的访问路径作为主路径,后续可以实现虚拟机直接访问网络磁盘。In this embodiment of the present application, the server may acquire the identifier of the network disk allocated to the virtual machine, and create a virtual disk with the identifier of the network disk for the virtual machine based on the network disk, so that the virtual machine can access the virtual disk by using the server . After the virtual machine starts the operating system based on the virtual disk, the server may instruct the virtual machine to log in to the storage service of the network disk. Further, after the virtual machine logs in to the storage service of the network disk, by identifying that the identifier of the network disk is consistent with the identifier of the virtual disk accessed before, it can be determined that the storage access path accessing the same storage space can be the virtual disk. The access path can also be the access path of the network disk, and then the access path of the virtual disk can be used as the primary path, and the access path of the network disk can be used as the backup path. Then, the server can log out of the storage service of the network disk in order to cut off the access path of the virtual disk. After the virtual machine detects that the server has logged out of the storage service of the network disk, the access path of the network disk can be used as the main path, and the virtual machine can be implemented later. The computer directly accesses the network disk.

基于上述方式,可以仅在虚拟机启动阶段占用少量的服务器资源来访问虚拟磁盘,在虚拟机启动之后,虚拟机可以直接登录网络磁盘的存储服务,进而将虚拟磁盘的访问路径和网络磁盘的访问路径形成主备路径,并且服务器在登出网络磁盘的存储服务后,虚拟机无法正常借助服务器来访问虚拟磁盘,进而虚拟机在识别出虚拟磁盘的访问路径发生故障之后,可以将网络磁盘的访问路径作为主路径,可以无需占用服务器资源,达到直接访问网络磁盘的目的。并且,由于虚拟机的启动过程是借助服务器来访问的虚拟磁盘,相比现有技术中基于特定的网络存储协议直接访问网络磁盘的过程,本方案可以不再受限于几种特定的网络协议,应用范围较为广泛,可扩展性较好。Based on the above method, only a small amount of server resources can be occupied to access the virtual disk during the startup phase of the virtual machine. After the virtual machine is started, the virtual machine can directly log in to the storage service of the network disk, and then the access path of the virtual disk and the access path of the network disk can be changed. The path forms the primary and secondary paths, and after the server logs out of the storage service of the network disk, the virtual machine cannot use the server to access the virtual disk normally. The path as the main path can directly access the network disk without occupying server resources. Moreover, since the startup process of the virtual machine is a virtual disk accessed by a server, compared with the process of directly accessing the network disk based on a specific network storage protocol in the prior art, this solution is no longer limited to several specific network protocols. , the application range is wider and the scalability is better.

为了更好地说明本申请的配置过程,下面列举一个具体的实施场景对本申请上述虚拟机的存储访问方法进行详细说明。In order to better illustrate the configuration process of the present application, a specific implementation scenario is listed below to describe in detail the storage access method for the above-mentioned virtual machine of the present application.

在该实施场景中,服务器和虚拟机之间的交互过程可以抽象为主机处理模块与客户机代理处理模块两个逻辑单元之间的交互。其中,主机处理模块,运行在服务器上,可以实现服务器登录或登出网络磁盘的存储服务、为虚拟机创建虚拟磁盘、以及卸载虚拟磁盘等功能;客户机代理处理模块,运行在虚拟机上,可以检测虚拟机的启动、虚拟机登录或登出网络磁盘的存储服务、以及启动多路径服务等功能。主机处理模块与客户机代理处理模块之间可以通过特定串口进行交互,串口例如为virtio串口。In this implementation scenario, the interaction process between the server and the virtual machine can be abstracted into the interaction between two logical units, the host processing module and the client proxy processing module. Among them, the host processing module, running on the server, can realize the functions of the server logging in or out of the network disk storage service, creating a virtual disk for the virtual machine, and unloading the virtual disk; the client agent processing module, running on the virtual machine, It can detect the startup of virtual machines, the storage services of virtual machines logging in or out of network disks, and the starting of multi-pathing services. The host processing module and the client proxy processing module can interact through a specific serial port, such as a virtio serial port.

以下为主机处理模块和客户机代理处理模块的交互过程:The following is the interaction between the host processing module and the client proxy processing module:

(1)主机处理模块登录网络磁盘的存储服务并为虚拟机添加虚拟磁盘的过程。(1) The process in which the host processing module logs in to the storage service of the network disk and adds a virtual disk to the virtual machine.

第1步、主机处理模块接收到为虚拟机分配的网络磁盘的配置参数。Step 1: The host processing module receives the configuration parameters of the network disk allocated to the virtual machine.

其中,配置参数中包括虚拟机的名称“vmA”、网络磁盘的名称“iqn.abcd.1234:lun1”、以及网络磁盘的IP地址“192.168.1.1”。The configuration parameters include the name of the virtual machine "vmA", the name of the network disk "iqn.abcd.1234:lun1", and the IP address of the network disk "192.168.1.1".

第2步、主机处理模块使用initiaor工具、以及网络磁盘的名称和IP地址,登录网络磁盘的存储服务。Step 2: The host processing module uses the initiaor tool and the name and IP address of the network disk to log in to the storage service of the network disk.

具体的,主机处理模块可以利用initiaor工具,输入网络磁盘的名称和IP地址,进而输入“login(登录)”指令,以便登录网络磁盘的存储服务,在登录到网络磁盘的存储服务后可以识别出网络磁盘的wwid为“1234”。Specifically, the host processing module can use the initiator tool to input the name and IP address of the network disk, and then input the "login" command to log in to the storage service of the network disk. After logging in to the storage service of the network disk, it can be identified. The wwid of the network disk is "1234".

第3步、主机处理模块调用libvirt为虚拟机添加虚拟磁盘。Step 3: The host processing module calls libvirt to add a virtual disk to the virtual machine.

具体的,虚拟磁盘的驱动例如为virtio,虚拟磁盘的类型为块设备,虚拟磁盘的源路径为“/dev/disk/by-path/ip-192.168.1.1:iqn.abcd.1234:lun1”。并且,主机处理模块还可以通过快速模拟器(quick emulator,qemu)模块为虚拟磁盘生成wwid为“virtio-7890”。Specifically, the driver of the virtual disk is, for example, virtio, the type of the virtual disk is a block device, and the source path of the virtual disk is "/dev/disk/by-path/ip-192.168.1.1:iqn.abcd.1234:lun1". In addition, the host processing module can also generate a wwid of "virtio-7890" for the virtual disk through a quick emulator (qemu) module.

其中,上述libvirt是用于管理虚拟化平台的开源的应用程序可编程接口(Application Programming Interface,API)。具体用法可参见现有技术,这里不再说明。Wherein, the above libvirt is an open-source application programming interface (Application Programming Interface, API) used for managing the virtualization platform. The specific usage can be found in the prior art, which will not be described here.

第4步、主机处理模块下发qemu模块,修改虚拟磁盘的wwid。Step 4: The host processing module issues the qemu module to modify the wwid of the virtual disk.

具体的,可以根据磁盘的源路径“/dev/disk/by-path/ip-192.168.1.1:iqn.abcd.1234:lun1”,查找服务器上符合所述源路径的虚拟磁盘的wwid,将查找到的虚拟磁盘的wwid从“virtio-7890”修改为“1234”。Specifically, according to the source path of the disk "/dev/disk/by-path/ip-192.168.1.1:iqn.abcd.1234:lun1", you can search for the wwid of the virtual disk on the server that matches the source path. The wwid of the incoming virtual disk was changed from "virtio-7890" to "1234".

(2)虚拟机启动并登录网络磁盘的存储服务后,启动多路径服务的过程。(2) The process of starting the multipath service after the virtual machine starts and logs in to the storage service of the network disk.

第5步、客户机代理处理模块监视虚拟机启动。In step 5, the client agent processing module monitors the startup of the virtual machine.

第6步、虚拟机基于虚拟磁盘启动操作系统后,客户机代理处理模块向服务器发送指示虚拟机已启动的通知消息。Step 6: After the virtual machine starts the operating system based on the virtual disk, the client agent processing module sends a notification message indicating that the virtual machine has been started to the server.

第7步、主机处理模块收到指示虚拟机已启动的通知消息后,根据虚拟机查找网络磁盘的名称和IP地址,然后将查找到的网络磁盘的名称和IP地址通知给虚拟机。Step 7: After receiving the notification message indicating that the virtual machine has been started, the host processing module searches for the name and IP address of the network disk according to the virtual machine, and then notifies the virtual machine of the name and IP address of the found network disk.

其中,网络磁盘的名称为“iqn.abcd.1234:lun1”、IP地址为“192.168.1.1”。The name of the network disk is "iqn.abcd.1234:lun1", and the IP address is "192.168.1.1".

第8步、客户机代理处理模块使用initiaor工具、以及网络磁盘的名称和IP地址,登录网络磁盘的存储服务。Step 8: The client agent processing module uses the initiaor tool and the name and IP address of the network disk to log in to the storage service of the network disk.

具体的,客户机代理模块可以利用initiaor工具,输入网络磁盘的名称和IP地址,进而输入“login(登录)”指令,以便登录网络磁盘的存储服务。在成功连接网络磁盘后,可以识别到网络磁盘的wwid为“1234”。Specifically, the client agent module can use the initiator tool to input the name and IP address of the network disk, and then input the "login" command, so as to log in to the storage service of the network disk. After the network disk is successfully connected, the wwid of the network disk can be identified as "1234".

第9步、客户机代理处理模块可以向虚拟机中的GuestOS模块下发多路径配置参数。In step 9, the client agent processing module may deliver multipath configuration parameters to the GuestOS module in the virtual machine.

其中,GuestOS模块可以理解为是虚拟机上运行的操作系统模块。客户机代理处理模块向GuestOS模块下发的多路径配置参数中可以包括允许本地磁盘配置多路径的配置参数、以及故障策略为高可用的配置参数。由于网络磁盘和虚拟磁盘的wwid相同,故虚拟机可以允许使用虚拟磁盘的访问路径和网络磁盘的访问路径。The GuestOS module can be understood as an operating system module running on the virtual machine. The multi-path configuration parameters delivered by the client agent processing module to the GuestOS module may include configuration parameters that allow the local disk to configure multi-path, and configuration parameters that the failure policy is highly available. Since the wwid of the network disk and the virtual disk is the same, the virtual machine can use the access path of the virtual disk and the access path of the network disk.

第10步、客户机代理处理模块启动多路径服务。In step 10, the client agent processing module starts the multipath service.

多路径服务开启后,由于网络磁盘和虚拟磁盘的wwid相同,故虚拟机可以允许使用虚拟磁盘的访问路径和网络磁盘的访问路径,并且由于虚拟机在启动操作系统时使用的访问路径为虚拟磁盘的访问路径,故虚拟机可以将虚拟磁盘的访问路径为主路径,网络磁盘的访问路径为备路径。After the multi-pathing service is enabled, since the wwid of the network disk and the virtual disk are the same, the virtual machine can use the access path of the virtual disk and the access path of the network disk, and the access path used by the virtual machine when starting the operating system is the virtual disk. Therefore, the virtual machine can use the access path of the virtual disk as the primary path and the access path of the network disk as the secondary path.

(3)主机处理模块卸载并删除网络磁盘的过程。(3) The process that the host processing module unloads and deletes the network disk.

第11步、客户机代理处理模块向主机处理模块发送卸载虚拟磁盘的卸载指令。Step 11: The client agent processing module sends an unloading instruction for unloading the virtual disk to the host processing module.

第12步、主机处理模块收到卸载指令后,查找虚拟机对应的网络磁盘的配置参数,使用initiaor工具及网络磁盘的名称和IP地址,登出网络磁盘的存储服务。Step 12: After the host processing module receives the uninstallation instruction, it searches the configuration parameters of the network disk corresponding to the virtual machine, and uses the initiaor tool and the name and IP address of the network disk to log out of the storage service of the network disk.

具体的,主机处理模块可以利用initiaor工具,输入网络磁盘的名称和IP地址,进而输入“logout(登出)”的指令,来实现登出网络磁盘的存储服务。Specifically, the host processing module can use the initiator tool to input the name and IP address of the network disk, and then input the "logout (logout)" command to implement the storage service of logging out of the network disk.

第13步、客户机代理处理模块将网络磁盘的访问路径作为主路径。In step 13, the client agent processing module takes the access path of the network disk as the main path.

其中,由于服务器已经登出网络磁盘的存储服务,虚拟机不能再依赖服务器访问虚拟磁盘,故虚拟机在识别到虚拟磁盘的访问路径出现故障后,虚拟机可以进行主备切换过程,将网络磁盘的访问路径作为主路径。Among them, since the server has logged out of the storage service of the network disk, the virtual machine can no longer rely on the server to access the virtual disk. Therefore, after the virtual machine recognizes that the access path of the virtual disk is faulty, the virtual machine can perform the master-standby switching process, and the network disk access path as the primary path.

第14步、主机处理模块调用libvirt删除虚拟磁盘的配置信息。Step 14: The host processing module calls libvirt to delete the configuration information of the virtual disk.

其中,配置信息例如包括虚拟磁盘的名称、以及虚拟磁盘的源路径、驱动等。The configuration information includes, for example, the name of the virtual disk, and the source path and driver of the virtual disk.

本申请实施例中,在实现虚拟机直接访问网络磁盘的过程中,仅在虚拟机启动操作系统阶段借助服务器访问虚拟磁盘,而在虚拟机启动操作系统之后,虚拟机可以利用initiaor工具、网络磁盘的IP地址和名称,直接登录网络磁盘的存储服务,由此可见,上述虚拟机登录网络磁盘的存储服务是在虚拟机已经成功启动操作系统之后进行的,相比现有方式中通过在BIOS启动阶段通过SAN网络来登录网络磁盘的存储服务的方式,本申请实施例可以不依赖虚拟机的BIOS技术规格,在虚拟机的操作系统启动后,利用initiaor工具便可以登录网络磁盘的存储服务,从而可以具有较好的扩展性,不仅可以适用于目前的非易失性内存主机控制器接口规范(Non-Volatile Memory express over Fabrics,NVMeoF)协议,也可以适用于未来可能出现的网络存储协议。In the embodiment of the present application, in the process of realizing the virtual machine directly accesses the network disk, the virtual disk is only accessed with the help of the server during the stage when the virtual machine starts the operating system, and after the virtual machine starts the operating system, the virtual machine can use the initiator tool, network disk The IP address and name of the virtual machine directly log in to the storage service of the network disk. It can be seen that the above-mentioned virtual machine logs in to the storage service of the network disk after the virtual machine has successfully started the operating system. In the method of logging in to the storage service of the network disk through the SAN network, the embodiment of the present application may not rely on the BIOS technical specifications of the virtual machine. After the operating system of the virtual machine is started, the initiaor tool can be used to log in to the storage service of the network disk. It can have good expansibility, and can not only be applied to the current non-volatile memory host controller interface specification (Non-Volatile Memory express over Fabrics, NVMeoF) protocol, but also can be applied to the network storage protocol that may appear in the future.

并且,为了实现虚拟机直接访问网络磁盘,虚拟机在登录网络磁盘的存储服务之后,还可以通过启动多路径服务,将虚拟磁盘的访问路径作为主路径,将网络磁盘的访问路径作为备路径,之后再指示服务器卸载虚拟磁盘,以便切断多路径服务中访问虚拟磁盘的路径,使网络磁盘的访问路径切换为主路径,后续虚拟机便可以直接访问网络磁盘。In addition, in order to enable the virtual machine to directly access the network disk, after logging in to the storage service of the network disk, the virtual machine can also start the multi-path service to use the access path of the virtual disk as the primary path and the access path of the network disk as the backup path. Then instruct the server to unmount the virtual disk, so as to cut off the path for accessing the virtual disk in the multi-path service, so that the access path of the network disk is switched to the main path, and subsequent virtual machines can directly access the network disk.

基于同一申请构思,本申请实施例中还提供了与虚拟机的存储访问方法对应的虚拟机的存储访问装置,由于本申请实施例中的装置解决问题的原理与本申请实施例上述虚拟机的存储访问方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same application concept, the embodiment of the present application also provides a storage access device for a virtual machine corresponding to the storage access method for the virtual machine. The storage access method is similar, so the implementation of the device can refer to the implementation of the method, and the repeated places will not be repeated.

参照图3所示,为本申请实施例提供的一种虚拟机的存储访问装置的结构示意图,所述装置30包括:获取模块31、创建模块32、指示模块33、卸载模块34;其中,Referring to FIG. 3 , which is a schematic structural diagram of a storage access device for a virtual machine provided by an embodiment of the present application, the device 30 includes: an acquisition module 31 , a creation module 32 , an instruction module 33 , and an uninstallation module 34 ; wherein,

获取模块31,用于登录为所述虚拟机分配的网络磁盘的存储服务并获取所述网络磁盘的标识符;an obtaining module 31, configured to log in to the storage service of the network disk allocated for the virtual machine and obtain the identifier of the network disk;

创建模块32,用于基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘;A creation module 32, configured to create a virtual disk with the identifier of the network disk for the virtual machine based on the network disk;

指示模块33,用于在确定所述虚拟机基于所述虚拟磁盘启动操作系统后,指示所述虚拟机登录所述网络磁盘的存储服务;其中,所述虚拟机登录到所述网络磁盘的存储服务后的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;The instructing module 33 is configured to instruct the virtual machine to log in to the storage service of the network disk after it is determined that the virtual machine starts the operating system based on the virtual disk; wherein, the virtual machine logs in to the storage service of the network disk The storage access path after the service includes the access path of the network disk and the access path of the virtual disk, the access path of the virtual disk is the primary path, and the access path of the network disk is the backup path;

卸载模块34,用于登出所述网络磁盘的存储服务,以使所述虚拟机将所述网络磁盘的访问路径切换为主路径。The uninstallation module 34 is configured to log out of the storage service of the network disk, so that the virtual machine switches the access path of the network disk to the main path.

一种可能的设计中,所述获取模块31在登录为所述虚拟机分配的网络磁盘的存储服务并获取所述网络磁盘的标识符时,具体用于:In a possible design, when the obtaining module 31 logs in to the storage service of the network disk allocated for the virtual machine and obtains the identifier of the network disk, it is specifically used to:

获取所述网络磁盘的互联网协议IP地址和所述网络磁盘的名称,基于所述IP地址和所述名称,登录所述网络磁盘的存储服务。Obtain the Internet Protocol IP address of the network disk and the name of the network disk, and log in to the storage service of the network disk based on the IP address and the name.

一种可能的设计中,所述创建模块32基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘时,具体用于:In a possible design, when the creation module 32 creates a virtual disk with the identifier of the network disk for the virtual machine based on the network disk, it is specifically used for:

在所述网络磁盘中创建具有临时标识符的所述虚拟磁盘;creating the virtual disk with a temporary identifier in the network disk;

将所述虚拟磁盘的临时标识符修改为所述网络磁盘的标识符。Modify the temporary identifier of the virtual disk to the identifier of the network disk.

一种可能的设计中,所述卸载模块34在登出所述网络磁盘的存储服务时,具体用于:In a possible design, when the unloading module 34 logs out of the storage service of the network disk, it is specifically used to:

在接收到所述虚拟机发送的指示卸载所述网络磁盘的卸载指令后,登出所述网络磁盘的存储服务。After receiving the uninstall instruction sent by the virtual machine to instruct to uninstall the network disk, log out of the storage service of the network disk.

一种可能的设计中,所述卸载模块34在登出所述网络磁盘的存储服务之后,还用于:In a possible design, after logging out of the storage service of the network disk, the unloading module 34 is further configured to:

删除所述虚拟磁盘的配置信息。Delete the configuration information of the virtual disk.

关于装置30中的各模块的处理流程、以及各模块之间的交互流程的描述可以参照上述方法实施例中与服务器的相关说明,这里不再详述。For the description of the processing flow of each module in the apparatus 30 and the interaction flow between the modules, reference may be made to the relevant description of the server in the foregoing method embodiment, which will not be described in detail here.

基于相同的申请构思,本申请还提供了另一种虚拟机的存储访问装置,参照图4所示,所述装置40包括:启动模块41、连接模块42、确定模块43、切换模块44;其中,Based on the same application concept, the present application also provides another storage access device for a virtual machine. Referring to FIG. 4 , the device 40 includes: a startup module 41, a connection module 42, a determination module 43, and a switch module 44; wherein ,

启动模块41,用于基于虚拟磁盘,启动所述虚拟机的操作系统;其中,所述虚拟磁盘为所述主机基于网络磁盘为所述虚拟机创建的,所述网络磁盘与所述虚拟磁盘的标识符一致;The startup module 41 is configured to start the operating system of the virtual machine based on the virtual disk; wherein, the virtual disk is created by the host for the virtual machine based on the network disk, and the network disk is the same as the virtual disk. Identifiers are consistent;

连接模块42,用于在所述服务器的指示下登录所述网络磁盘的存储服务;a connection module 42, configured to log in to the storage service of the network disk under the instruction of the server;

确定模块43,用于基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径;其中,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;A determination module 43, configured to determine, based on the identifier shared by the network disk and the virtual disk, that the storage access path of the virtual machine includes an access path of the network disk and an access path of the virtual disk; wherein , the access path of the virtual disk is the primary path, and the access path of the network disk is the backup path;

切换模块44,用于检测到所述服务器登出所述网络磁盘的存储服务之后,将所述网络磁盘的访问路径切换为主路径。The switching module 44 is configured to switch the access path of the network disk to the main path after detecting that the server logs out of the storage service of the network disk.

一种可能的设计中,所述确定模块43在基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径时,具体用于:In a possible design, the determining module 43 determines, based on the identifier shared by the network disk and the virtual disk, that the storage access path of the virtual machine includes the access path of the network disk and the When specifying the access path of the virtual disk, it is specifically used for:

在识别到所述网络磁盘与所述虚拟磁盘共用所述标识符时,通过启动多路径服务,将所述虚拟磁盘的访问路径确定为主路径,将所述网络磁盘的访问路径确定为备路径。When it is recognized that the network disk and the virtual disk share the identifier, by starting the multi-path service, the access path of the virtual disk is determined as the primary path, and the access path of the network disk is determined as the backup path .

关于装置40中的各模块的处理流程、以及各模块之间的交互流程的描述可以参照上述方法实施例中与虚拟机的相关说明,这里不再详述。For the description of the processing flow of each module in the apparatus 40 and the interaction flow between the modules, reference may be made to the relevant description of the virtual machine in the above method embodiment, which will not be described in detail here.

基于相同的申请构思,本申请实施例还提供的一种电子设备的结构示意图,所述电子设备50包括处理器51、存储器52和总线53,所述存储器52存储执行指令,当所述设备50运行时,所述处理器51与所述存储器52之间通过总线53通信,所述处理器51执行所述存储器52存储的所述执行指令,使得所述设备50执行实现上述方法实施例所涉及的虚拟机的存储访问方法的步骤。Based on the same application concept, an embodiment of the present application also provides a schematic structural diagram of an electronic device. The electronic device 50 includes a processor 51, a memory 52, and a bus 53. The memory 52 stores execution instructions. When the device 50 During operation, the processor 51 communicates with the memory 52 through the bus 53, and the processor 51 executes the execution instructions stored in the memory 52, so that the device 50 executes the implementation of the methods involved in the foregoing method embodiments. The steps of the storage access method of the virtual machine.

一种可能的实施方式中,所述处理器51执行的虚拟机的存储访问方法如下:In a possible implementation manner, the storage access method of the virtual machine executed by the processor 51 is as follows:

登录为所述虚拟机分配的网络磁盘的存储服务并获取所述网络磁盘的标识符;Log in to the storage service of the network disk allocated for the virtual machine and obtain the identifier of the network disk;

基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘;creating a virtual disk for the virtual machine with an identifier of the network disk based on the network disk;

在确定所述虚拟机基于所述虚拟磁盘启动操作系统后,指示所述虚拟机登录所述网络磁盘的存储服务;其中,所述虚拟机登录到所述网络磁盘的存储服务后的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;After determining that the virtual machine starts the operating system based on the virtual disk, instruct the virtual machine to log in to the storage service of the network disk; wherein, the storage access path after the virtual machine logs in to the storage service of the network disk Including the access path of the network disk and the access path of the virtual disk, the access path of the virtual disk is the primary path, and the access path of the network disk is the backup path;

登出所述网络磁盘的存储服务,以使所述虚拟机将所述网络磁盘的访问路径切换为主路径。Log out of the storage service of the network disk, so that the virtual machine switches the access path of the network disk to the main path.

另一种可能的实施方式中,所述处理器51执行的虚拟机的存储访问方法如下:In another possible implementation manner, the storage access method of the virtual machine executed by the processor 51 is as follows:

基于虚拟磁盘,启动所述虚拟机的操作系统;其中,所述虚拟磁盘为所述主机基于网络磁盘为所述虚拟机创建的,所述网络磁盘与所述虚拟磁盘的标识符一致;Start the operating system of the virtual machine based on the virtual disk; wherein, the virtual disk is created by the host for the virtual machine based on a network disk, and the identifier of the network disk and the virtual disk are consistent;

在所述服务器的指示下登录所述网络磁盘的存储服务;Log in to the storage service of the network disk under the instruction of the server;

基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径;其中,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;Based on the identifier shared by the network disk and the virtual disk, it is determined that the storage access path of the virtual machine includes an access path of the network disk and an access path of the virtual disk; The access path is the primary path, and the access path of the network disk is the backup path;

检测到所述服务器登出所述网络磁盘的存储服务之后,将所述网络磁盘的访问路径切换为主路径。After detecting that the server logs out of the storage service of the network disk, the access path of the network disk is switched to the main path.

其中,处理器51涉及的具体处理流程可参见上述方法实施例中的相关描述,这里不再展开说明。For the specific processing flow involved in the processor 51, reference may be made to the relevant descriptions in the foregoing method embodiments, which will not be described herein again.

本申请提供的上述虚拟机的存储访问方法及装置,可以仅在虚拟机启动阶段占用少量的服务器资源来访问虚拟磁盘,在虚拟机启动之后,虚拟机可以直接登录网络磁盘的存储服务,进而将虚拟磁盘的访问路径和网络磁盘的访问路径形成主备路径,并且服务器在登出网络磁盘的存储服务后,虚拟机无法正常借助服务器来访问虚拟磁盘,进而虚拟机在识别出虚拟磁盘的访问路径发生故障之后,可以将网络磁盘的访问路径作为主路径,从而无需占用服务器资源,达到直接访问网络磁盘的目的。并且,由于虚拟机登录网络磁盘的存储服务的方式是在虚拟机成功启动操作系统之后进行的,相比现有技术中基于特定的网络存储协议在启动虚拟机的操作系统的过程中通过SAN网络来登录网络磁盘的存储服务的过程,本方案可以不依赖的虚拟机的操作系统的技术规格,也不再受限于几种特定的网络协议,应用范围较为广泛,可扩展性较好。The above-mentioned storage access method and device for a virtual machine provided by the present application can only occupy a small amount of server resources to access the virtual disk during the startup phase of the virtual machine. After the virtual machine is started, the virtual machine can directly log in to the storage service of the network disk, and further The access path of the virtual disk and the access path of the network disk form the primary and backup paths, and after the server logs out of the storage service of the network disk, the virtual machine cannot use the server to access the virtual disk normally, and the virtual machine recognizes the access path of the virtual disk. After a fault occurs, the access path of the network disk can be used as the main path, so as to achieve the purpose of directly accessing the network disk without occupying server resources. Moreover, since the way that the virtual machine logs into the storage service of the network disk is performed after the virtual machine successfully starts the operating system, compared with the prior art based on a specific network storage protocol in the process of starting the operating system of the virtual machine through the SAN network. In the process of logging in to the storage service of the network disk, this solution does not depend on the technical specifications of the operating system of the virtual machine, nor is it limited by several specific network protocols, and has a wide range of applications and good scalability.

此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的虚拟机的存储访问方法的步骤。In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor when the storage access of the virtual machine described in the foregoing method embodiments is executed. steps of the method.

本申请实施例所提供的虚拟机的存储访问方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中所述的虚拟机的存储访问方法的步骤,具体可参见上述方法实施例,在此不再赘述。The computer program product of the storage access method for a virtual machine provided by the embodiments of the present application includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the virtual machine described in the foregoing method embodiments. For the steps of the storage access method, reference may be made to the foregoing method embodiments, which will not be repeated here.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the system and device described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. The apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a processor-executable non-volatile computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.

以上仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only the specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the technical scope disclosed in the present application can easily think of changes or replacements, which should be covered within the scope of the present application. within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1.一种虚拟机的存储访问方法,应用于服务器中,所述服务器中创建有虚拟机,其特征在于,包括:1. A storage access method for a virtual machine, applied in a server, wherein a virtual machine is created in the server, characterized in that, comprising: 服务器登录为所述虚拟机分配的网络磁盘的存储服务并获取所述网络磁盘的标识符;The server logs in the storage service of the network disk allocated for the virtual machine and obtains the identifier of the network disk; 服务器基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘;The server creates a virtual disk with the identifier of the network disk for the virtual machine based on the network disk; 服务器在确定所述虚拟机基于所述虚拟磁盘启动操作系统后,指示所述虚拟机登录所述网络磁盘的存储服务;其中,所述虚拟机登录到所述网络磁盘的存储服务后的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;After determining that the virtual machine starts the operating system based on the virtual disk, the server instructs the virtual machine to log in to the storage service of the network disk; wherein, the storage access after the virtual machine logs in to the storage service of the network disk The path includes the access path of the network disk and the access path of the virtual disk, the access path of the virtual disk is the primary path, and the access path of the network disk is the backup path; 服务器登出所述网络磁盘的存储服务,以使所述虚拟机将所述网络磁盘的访问路径切换为主路径。The server logs out the storage service of the network disk, so that the virtual machine switches the access path of the network disk to the main path. 2.如权利要求1所述的方法,其特征在于,所述登录为所述虚拟机分配的网络磁盘的存储服务,包括:2. The method according to claim 1, wherein the logging in to the storage service of the network disk allocated for the virtual machine comprises: 获取所述网络磁盘的互联网协议IP地址和所述网络磁盘的名称,基于所述IP地址和所述名称,登录所述网络磁盘的存储服务。Obtain the Internet Protocol IP address of the network disk and the name of the network disk, and log in to the storage service of the network disk based on the IP address and the name. 3.如权利要求1所述的方法,其特征在于,所述基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘,包括:3. The method of claim 1, wherein the creating a virtual disk with an identifier of the network disk for the virtual machine based on the network disk comprises: 在所述网络磁盘中创建具有临时标识符的所述虚拟磁盘;creating the virtual disk with a temporary identifier in the network disk; 将所述虚拟磁盘的临时标识符修改为所述网络磁盘的标识符。Modify the temporary identifier of the virtual disk to the identifier of the network disk. 4.如权利要求1所述的方法,其特征在于,所述登出所述网络磁盘的存储服务,包括:4. The method of claim 1, wherein the logging out of the storage service of the network disk comprises: 在接收到所述虚拟机发送的指示卸载所述网络磁盘的卸载指令后,基于所述网络磁盘IP地址和所述网络磁盘的名称,登出所述网络磁盘的存储服务。After receiving the uninstall instruction sent by the virtual machine for instructing to uninstall the network disk, log out the storage service of the network disk based on the IP address of the network disk and the name of the network disk. 5.如权利要求1或4所述的方法,其特征在于,在登出所述网络磁盘的存储服务之后,还包括:5. The method according to claim 1 or 4, wherein after logging out of the storage service of the network disk, the method further comprises: 删除所述虚拟磁盘的配置信息。Delete the configuration information of the virtual disk. 6.一种虚拟机的存储访问方法,应用于在服务器上创建的虚拟机中,其特征在于,包括:6. A storage access method for a virtual machine, applied in the virtual machine created on the server, characterized in that, comprising: 基于虚拟磁盘,启动所述虚拟机的操作系统;其中,所述虚拟磁盘为所述服务器基于网络磁盘为所述虚拟机创建的,所述网络磁盘与所述虚拟磁盘的标识符一致;Start the operating system of the virtual machine based on the virtual disk; wherein, the virtual disk is created by the server for the virtual machine based on a network disk, and the identifier of the network disk is consistent with the identifier of the virtual disk; 在所述服务器的指示下登录所述网络磁盘的存储服务;Log in to the storage service of the network disk under the instruction of the server; 基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,其中,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;Based on the identifier shared by the network disk and the virtual disk, it is determined that the storage access path of the virtual machine includes the access path of the network disk and the access path of the virtual disk, wherein the storage access path of the virtual disk is The access path is the primary path, and the access path of the network disk is the backup path; 检测到所述服务器登出所述网络磁盘的存储服务之后,将所述网络磁盘的访问路径切换为主路径。After detecting that the server logs out of the storage service of the network disk, the access path of the network disk is switched to the main path. 7.如权利要求6所述的方法,其特征在于,所述基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,包括:7 . The method of claim 6 , wherein determining the storage access path of the virtual machine based on the identifier shared by the network disk and the virtual disk includes accessing the network disk. 8 . path and the access path of the virtual disk, including: 在识别到所述网络磁盘与所述虚拟磁盘共用所述标识符时,通过启动多路径服务,将所述虚拟磁盘的访问路径确定为主路径,将所述网络磁盘的访问路径确定为备路径。When it is recognized that the network disk and the virtual disk share the identifier, by starting the multi-path service, the access path of the virtual disk is determined as the primary path, and the access path of the network disk is determined as the backup path . 8.一种虚拟机的存储访问装置,其特征在于,应用于服务器中,所述服务器中创建有虚拟机,所述装置包括:8. A storage access device for a virtual machine, characterized in that it is applied to a server in which a virtual machine is created, the device comprising: 获取模块,用于登录为所述虚拟机分配的网络磁盘的存储服务并获取所述网络磁盘的标识符;an obtaining module, configured to log in to the storage service of the network disk allocated for the virtual machine and obtain the identifier of the network disk; 创建模块,用于基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘;A creation module, configured to create a virtual disk with the identifier of the network disk for the virtual machine based on the network disk; 指示模块,用于在确定所述虚拟机基于所述虚拟磁盘启动操作系统后,指示所述虚拟机登录所述网络磁盘的存储服务;其中,所述虚拟机登录到所述网络磁盘的存储服务后的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;an instructing module, configured to instruct the virtual machine to log in to the storage service of the network disk after determining that the virtual machine starts the operating system based on the virtual disk; wherein the virtual machine logs in to the storage service of the network disk The latter storage access path includes the access path of the network disk and the access path of the virtual disk, the access path of the virtual disk is the primary path, and the access path of the network disk is the backup path; 卸载模块,用于登出所述网络磁盘的存储服务,以使所述虚拟机将所述网络磁盘的访问路径切换为主路径。The uninstallation module is configured to log out of the storage service of the network disk, so that the virtual machine switches the access path of the network disk to the main path. 9.如权利要求8所述的装置,其特征在于,所述获取模块在登录为所述虚拟机分配的网络磁盘的存储服务时,具体用于:9. The apparatus according to claim 8, wherein, when logging in the storage service of the network disk allocated for the virtual machine, the obtaining module is specifically used for: 获取所述网络磁盘的互联网协议IP地址和所述网络磁盘的名称,基于所述IP地址和所述名称,登录所述网络磁盘的存储服务。Obtain the Internet Protocol IP address of the network disk and the name of the network disk, and log in to the storage service of the network disk based on the IP address and the name. 10.如权利要求8所述的装置,其特征在于,所述创建模块基于所述网络磁盘为所述虚拟机创建具有所述网络磁盘的标识符的虚拟磁盘时,具体用于:10. The apparatus according to claim 8, wherein, when the creation module creates a virtual disk with an identifier of the network disk for the virtual machine based on the network disk, the creating module is specifically used for: 在所述网络磁盘中创建具有临时标识符的所述虚拟磁盘;creating the virtual disk with a temporary identifier in the network disk; 将所述虚拟磁盘的临时标识符修改为所述网络磁盘的标识符。Modify the temporary identifier of the virtual disk to the identifier of the network disk. 11.如权利要求8所述的装置,其特征在于,所述卸载模块在登出所述网络磁盘的存储服务时,具体用于:11. The apparatus according to claim 8, wherein when logging out of the storage service of the network disk, the uninstallation module is specifically configured to: 在接收到所述虚拟机发送的指示卸载所述网络磁盘的卸载指令后,基于所述网络磁盘IP地址和所述网络磁盘的名称,登出所述网络磁盘的存储服务。After receiving the uninstall instruction sent by the virtual machine for instructing to uninstall the network disk, log out the storage service of the network disk based on the IP address of the network disk and the name of the network disk. 12.如权利要求8或11所述的装置,其特征在于,所述卸载模块在登出所述网络磁盘的存储服务之后,还用于:12. The apparatus according to claim 8 or 11, wherein after logging out of the storage service of the network disk, the uninstallation module is further configured to: 删除所述虚拟磁盘的配置信息。Delete the configuration information of the virtual disk. 13.一种虚拟机的存储访问装置,其特征在于,所述装置包括:13. A storage access device for a virtual machine, wherein the device comprises: 启动模块,用于基于虚拟磁盘,启动所述虚拟机的操作系统;其中,所述虚拟磁盘为服务器基于网络磁盘为所述装置创建的,所述网络磁盘与所述虚拟磁盘的标识符一致;a startup module, configured to start the operating system of the virtual machine based on a virtual disk; wherein, the virtual disk is created by the server for the device based on a network disk, and the identifier of the network disk is consistent with the identifier of the virtual disk; 连接模块,用于在所述服务器的指示下登录所述网络磁盘的存储服务;a connection module, used for logging in the storage service of the network disk under the instruction of the server; 确定模块,用于基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径;其中,所述虚拟磁盘的访问路径为主路径,所述网络磁盘的访问路径为备路径;a determining module, configured to determine, based on the identifier shared by the network disk and the virtual disk, that the storage access path of the virtual machine includes the access path of the network disk and the access path of the virtual disk; wherein, The access path of the virtual disk is the primary path, and the access path of the network disk is the backup path; 切换模块,用于检测到所述服务器登出所述网络磁盘的存储服务之后,将所述网络磁盘的访问路径切换为主路径。The switching module is configured to switch the access path of the network disk to the main path after detecting that the server logs out of the storage service of the network disk. 14.如权利要求13所述的装置,其特征在于,所述确定模块在基于所述网络磁盘与所述虚拟磁盘共用的所述标识符,确定所述虚拟机的存储访问路径包括所述网络磁盘的访问路径以及所述虚拟磁盘的访问路径时,具体用于:14 . The apparatus of claim 13 , wherein the determining module determines, based on the identifier shared by the network disk and the virtual disk, that the storage access path of the virtual machine includes the network disk. 15 . The access path of the disk and the access path of the virtual disk are specifically used for: 在识别到所述网络磁盘与所述虚拟磁盘共用所述标识符时,通过启动多路径服务,将所述虚拟磁盘的访问路径确定为主路径,将所述网络磁盘的访问路径确定为备路径。When it is recognized that the network disk and the virtual disk share the identifier, by starting the multi-path service, the access path of the virtual disk is determined as the primary path, and the access path of the network disk is determined as the backup path .
CN201811312392.XA 2018-11-06 2018-11-06 A storage access method and device for a virtual machine Active CN109656679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811312392.XA CN109656679B (en) 2018-11-06 2018-11-06 A storage access method and device for a virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811312392.XA CN109656679B (en) 2018-11-06 2018-11-06 A storage access method and device for a virtual machine

Publications (2)

Publication Number Publication Date
CN109656679A CN109656679A (en) 2019-04-19
CN109656679B true CN109656679B (en) 2020-12-08

Family

ID=66110195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811312392.XA Active CN109656679B (en) 2018-11-06 2018-11-06 A storage access method and device for a virtual machine

Country Status (1)

Country Link
CN (1) CN109656679B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321199B (en) * 2019-07-09 2022-04-12 成都卫士通信息产业股份有限公司 Method and device for notifying common data change, electronic equipment and medium
CN112311669B (en) * 2019-08-02 2022-02-01 中国电信股份有限公司 Network service switching method, device, system and storage medium
CN116546010A (en) * 2022-01-26 2023-08-04 北京金山云网络技术有限公司 Access control method, device and storage medium for block storage device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546421A (en) * 2012-07-10 2014-01-29 河北省电子认证有限公司 Network work communication security and secrecy system on basis of PKI (public key infrastructure) technology and method for implementing network work communication security and secrecy system
CN104008330A (en) * 2014-05-23 2014-08-27 武汉华工安鼎信息技术有限责任公司 Data leakage prevention system and method based on file centralized storage and isolation technology
CN104182306A (en) * 2014-08-08 2014-12-03 成都致云科技有限公司 Low-cost intelligent breakdown instant switching method for cloud host
CN104636077A (en) * 2013-11-15 2015-05-20 中国电信股份有限公司 Network block device storage system and method for virtual machine
WO2018171728A1 (en) * 2017-03-23 2018-09-27 华为技术有限公司 Server, storage system and related method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546421A (en) * 2012-07-10 2014-01-29 河北省电子认证有限公司 Network work communication security and secrecy system on basis of PKI (public key infrastructure) technology and method for implementing network work communication security and secrecy system
CN104636077A (en) * 2013-11-15 2015-05-20 中国电信股份有限公司 Network block device storage system and method for virtual machine
CN104008330A (en) * 2014-05-23 2014-08-27 武汉华工安鼎信息技术有限责任公司 Data leakage prevention system and method based on file centralized storage and isolation technology
CN104182306A (en) * 2014-08-08 2014-12-03 成都致云科技有限公司 Low-cost intelligent breakdown instant switching method for cloud host
WO2018171728A1 (en) * 2017-03-23 2018-09-27 华为技术有限公司 Server, storage system and related method

Also Published As

Publication number Publication date
CN109656679A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
US11061712B2 (en) Hot-plugging of virtual functions in a virtualized environment
US9547624B2 (en) Computer system and configuration management method therefor
US10171567B2 (en) Load balancing computer device, system, and method
CN109067877B (en) Control method for cloud computing platform deployment, server and storage medium
US7657613B1 (en) Host-centric storage provisioner in a managed SAN
EP2178268A2 (en) Method and apparatus for resource provisioning
US11461031B1 (en) Non-disruptive storage volume migration between storage controllers
CN109656679B (en) A storage access method and device for a virtual machine
US20110239216A1 (en) Service providing system, a virtual machine server, a service providing method, and a program thereof
US20140032753A1 (en) Computer system and node search method
US8321617B1 (en) Method and apparatus of server I/O migration management
CN114826913A (en) Method for upgrading virtual switch without service interruption and related equipment
CN105450759A (en) System mirror image management method and device
WO2012168995A1 (en) Method for controlling i/o switch, method for controlling virtual computer, and computer system
US9571586B2 (en) Using alternate port name for uninterrupted communication
CN107370622A (en) A kind of virtual machine multiplexing host MAC and IP method and system
CN109857464B (en) System and method for platform deployment and operation of mobile operating system
US10338849B2 (en) Method and device for processing I/O request in network file system
JP5439435B2 (en) Computer system and disk sharing method in the computer system
US8065561B1 (en) Method and apparatus for automating device recovery using device configuration information
CN117278527A (en) Bare metal server online system, method and device
CN114385068A (en) Control method and device of cloud storage equipment, storage medium and electronic equipment
JP5919981B2 (en) Quarantine network system, quarantine server, quarantine method, and program
CN119967058A (en) A server migration method, cloud platform and computer-readable storage medium
CN114594997A (en) Cloud computer starting method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant