[go: up one dir, main page]

TWI460584B - Server, host and method for reading base image through storage area network - Google Patents

Server, host and method for reading base image through storage area network Download PDF

Info

Publication number
TWI460584B
TWI460584B TW101138401A TW101138401A TWI460584B TW I460584 B TWI460584 B TW I460584B TW 101138401 A TW101138401 A TW 101138401A TW 101138401 A TW101138401 A TW 101138401A TW I460584 B TWI460584 B TW I460584B
Authority
TW
Taiwan
Prior art keywords
host
virtual machine
virtual
disk file
target program
Prior art date
Application number
TW101138401A
Other languages
Chinese (zh)
Other versions
TW201416850A (en
Inventor
hong su Zhang
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to TW101138401A priority Critical patent/TWI460584B/en
Publication of TW201416850A publication Critical patent/TW201416850A/en
Application granted granted Critical
Publication of TWI460584B publication Critical patent/TWI460584B/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Description

以儲存區域網路提供讀取基礎鏡像之伺服器、主機端及方法Providing a server, a host, and a method for reading a base image by using a storage area network

一種提供讀取基礎鏡像之伺服器、主機端及方法,特別係指一種以儲存區域網路提供虛擬機器讀取基礎鏡像之伺服器、主機端及其方法。A server, a host end, and a method for providing a read base image, in particular, a server, a host end, and a method thereof for providing a virtual machine to read a base image by using a storage area network.

由於從事相同工作的使用者通常使用完全相同的操作環境,為了統一管理的便利性,以及避免需要為每一位使用者個別安裝作業系統以及應用程式,目前大都是使用虛擬機器(Virtual Machine,VM)的解決方案,其中,管理者會先安裝一份初始的操作環境,並將安裝好的操作環境作為各使用者所使用之虛擬機器的基礎鏡像(Base Image),使虛擬機器掛載依據基礎鏡像所建立出來的差異磁碟。如此,所有的虛擬機器都共用基礎鏡像中的作業系統以及應用程式,而後,在虛擬機器運行時,所產生的差異資料則會被儲存在虛擬機器所掛載的差異磁碟中,這表示差異磁碟的存取將可能非常頻繁。Since users who do the same work usually use the same operating environment, in order to facilitate the convenience of management and avoid the need to install operating systems and applications for each user individually, most of them use virtual machines (Virtual Machine, VM). The solution, in which the administrator will first install an initial operating environment, and the installed operating environment as the base image of the virtual machine used by each user (Base Image), so that the virtual machine is mounted according to the basis The differential disk created by the image. In this way, all virtual machines share the operating system and application in the base image, and then, when the virtual machine is running, the generated difference data is stored in the differential disk mounted on the virtual machine, which indicates the difference. Disk access will be very frequent.

目前常見的系統大都是將共用的基礎鏡像以及虛擬機器獨自存取的差異磁碟設置在遠端的儲存伺服器上,虛擬機器會由設置在儲存伺服器中的基礎鏡像以及差異磁碟中存取資料,如此,所有的虛擬機器在進行資料存取時,存取負載都集中在儲存伺服器上,這對儲存伺服器而言,存取負載相當的高,造成存取效能的低落,同時,儲存伺服器也需要大量的儲存空間來儲存多個差異磁碟,此外,執行虛擬機器的主機端要不斷的透過網路傳送接收資料,對網路資源的消耗也非常大。因此,目前也有的系統是將 基礎鏡像以及差異磁碟都設置在同一主機端上,這樣的設置方式雖然可以減低網路資源的消耗,但存取負載仍然都集中在主機端,存取效能依然無法提高,且基礎鏡像往往無法共用。At present, the common system mostly sets the shared base image and the differential disk independently accessed by the virtual machine on the remote storage server. The virtual machine is stored in the base image and the differential disk set in the storage server. Taking data, so that all virtual machines are accessing the load on the storage server when accessing data, which is quite high for the storage server, resulting in low access performance and low access efficiency. The storage server also needs a large amount of storage space to store a plurality of differential disks. In addition, the host side of the virtual machine is continuously transmitted and received through the network, and the network resources are consumed. Therefore, there are currently some systems that will The base image and the differential disk are all set on the same host. Although the setting method can reduce the consumption of network resources, the access load is still concentrated on the host, the access performance cannot be improved, and the base image is often unable to be Share.

綜上所述,可知先前技術中長期以來一直存在基礎鏡像與差異磁碟設置在同一裝置容易造成存取效能低落的問題,因此有必要提出改進的技術手段,來解決此一問題。In summary, it can be seen that in the prior art, there has been a long-standing problem that the base image and the differential disk are disposed in the same device, which tends to cause low access performance. Therefore, it is necessary to propose an improved technical means to solve this problem.

有鑒於先前技術存在基礎鏡像與差異磁碟設置在同一裝置容易造成存取效能低落的問題,本發明遂揭露一種以儲存區域網路(Storage Area Network,SAN)提供讀取基礎鏡像(Base Image)之伺服器、主機端及方法,其中:本發明所揭露之以儲存區域網路提供讀取基礎鏡像之伺服器,至少包含:儲存媒體,用以儲存原生虛擬磁碟(Parent Virtual Hard Disk,Parent VHD)檔,原生虛擬磁碟檔中包含目標程式;目標模組(target),用以提供主機端(Host)透過儲存區域網路掛載(mount)儲存媒體為遠端磁碟,藉以使主機端以原生虛擬磁碟檔為基礎鏡像建立差異虛擬磁碟(Different VHD)檔,及用以於主機端所執行之虛擬機器(Virtual Machine,VM)透過相對應之差異虛擬磁碟檔執行目標程式時,傳送目標程式至主機端。In view of the prior art, there is a problem that the base image and the differential disk are disposed on the same device, which tends to cause low access performance. The present invention discloses a storage base network (SAN) providing a read base image (Base Image). The server, the host end, and the method, wherein: the storage area network provides a server for reading a basic image, and at least includes: a storage medium for storing a virtual virtual disk (Parent Virtual Hard Disk, Parent) The VHD file contains the target program in the native virtual disk file. The target module is used to provide the host to mount the storage medium to the remote disk through the storage area network. The virtual virtual disk (VM) is used to create a differential virtual disk (Different VHD) file, and the virtual machine (VM) executed on the host side executes the target program through the corresponding difference virtual disk file. When the target program is transferred to the host.

本發明所揭露之以儲存區域網路提供讀取基礎鏡像之主機端,至少包含:發起模組(initiator),用以透過儲存區域網路掛載儲存伺服器之儲存媒體為遠端磁碟,儲存媒體中儲存原生虛擬磁碟檔,原生虛擬磁碟檔中包含目標程式,及用以下載目標程式;本地磁碟,用以儲存差異虛擬磁碟檔,各差異虛擬磁碟係以原生 虛擬磁碟檔為基礎鏡像所建立;虛擬機器處理模組,用以執行與各差異虛擬磁碟檔對應之虛擬機器,使虛擬機器執行目標程式,及用以於虛擬機器讀取目標程式之相關資料時,由與虛擬機器對應之差異虛擬磁碟檔中讀取相關資料,並於目標程式儲存所產生之差異資料時,將差異資料儲存至與虛擬機器對應之差異虛擬磁碟檔中。The host side of the storage area network for providing a read base image includes at least an initiator, which is configured to mount a storage medium of the storage server as a remote disk through the storage area network. The storage medium stores the original virtual disk file. The native virtual disk file contains the target program and is used to download the target program. The local disk is used to store the difference virtual disk file. The difference virtual disk is native. The virtual disk file is created by the base image; the virtual machine processing module is configured to execute the virtual machine corresponding to each of the different virtual disk files, so that the virtual machine executes the target program, and the virtual machine reads the target program. When the data is read, the related data is read from the difference virtual disk file corresponding to the virtual machine, and when the difference data generated by the target program is stored, the difference data is stored in the difference virtual disk file corresponding to the virtual machine.

本發明所揭露之以儲存區域網路提供讀取基礎鏡像之方法,其步驟至少包括:主機端透過儲存區域網路掛載儲存伺服器為遠端磁碟;設定主機於遠端磁碟中建立原生虛擬磁碟檔;服務主機以原生虛擬磁碟檔為基礎鏡像,於服務主機之本地磁碟中建立差異虛擬磁碟檔;服務主機執行與差異虛擬磁碟檔對應之虛擬機器;虛擬機器掛載相對應之差異虛擬磁碟檔;虛擬機器透過相對應之差異虛擬磁碟檔執行原生虛擬磁碟檔中之目標程式;當虛擬機器讀取目標程式之相關資料時,服務主機由與虛擬機器對應之差異虛擬磁碟檔中讀取相關資料;當目標程式存取所產生之差異資料時,服務主機至與虛擬機器對應之差異虛擬磁碟檔中存取差異資料。The method for storing a basic image is provided by the storage area network, and the method includes the following steps: the host side mounts the storage server as a remote disk through the storage area network; and sets the host to be established in the remote disk. The original virtual disk file; the service host mirrors the original virtual disk file, and creates a difference virtual disk file in the local disk of the service host; the service host executes the virtual machine corresponding to the difference virtual disk file; the virtual machine hangs The virtual disk file corresponding to the difference; the virtual machine executes the target program in the original virtual disk file through the corresponding difference virtual disk file; when the virtual machine reads the related data of the target program, the service host is connected with the virtual machine Corresponding difference virtual disk file reads related data; when the target program accesses the difference data generated, the service host accesses the difference data in the difference virtual disk file corresponding to the virtual machine.

本發明所揭露之系統與方法如上,與先前技術之間的差異在於本發明之主機端透過儲存區域網路在儲存伺服器中建立原生虛擬磁碟檔,並以原生虛擬磁碟檔為基礎鏡像在本地磁碟中建立差異虛擬磁碟檔,當主機端所執行之虛擬機器掛載差異虛擬磁碟檔後,虛擬機器執行目標程式時,服務主機透過儲存區域網路讀取原生虛擬磁碟檔中的原始資料,並在本地磁碟的差異虛擬磁碟檔中存取目標程式所產生的差異資料,藉以解決先前技術所存在的 問題,並可以達成增加儲存伺服器之存取效能並提高儲存伺服器所支援之虛擬機器數的技術功效。The system and method disclosed in the present invention are as above, and the difference from the prior art is that the host end of the present invention establishes a native virtual disk file in the storage server through the storage area network, and mirrors the image based on the native virtual disk file. The difference virtual disk file is created in the local disk. When the virtual machine on the host side mounts the difference virtual disk file, the virtual machine executes the target program, and the service host reads the original virtual disk file through the storage area network. The original data in the source, and access to the difference data generated by the target program in the difference virtual disk file of the local disk, thereby solving the prior art The problem is that it can achieve the technical effect of increasing the access performance of the storage server and increasing the number of virtual machines supported by the storage server.

以下將配合圖式及實施例來詳細說明本發明之特徵與實施方式,內容足以使任何熟習相關技藝者能夠輕易地充分理解本發明解決技術問題所應用的技術手段並據以實施,藉此實現本發明可達成的功效。The features and embodiments of the present invention will be described in detail below with reference to the drawings and embodiments, which are sufficient to enable those skilled in the art to fully understand the technical means to which the present invention solves the technical problems, and The achievable effects of the present invention.

本發明可以將做為基礎鏡像(Base Image)的原生虛擬磁碟(Parent Virtual Hard Disk,Parent VHD)檔設置在儲存伺服器,並將差異虛擬磁碟(Different VHD)檔設置在主機端(Host),使執行於主機端中的虛擬機器(Virtual Machine)共享同一份基礎鏡像,而虛擬機器在運作時所產生的差異資料則儲存在差異虛擬磁碟檔中,可以減低儲存伺服器的資料存取(I/O)負載。The invention can set the parent virtual disk (Parent Virtual Hard Disk, Parent VHD) file as a base image to the storage server, and set the difference virtual disk (Different VHD) file to the host end (Host ), the virtual machine (Virtual Machine) executing in the host side shares the same basic image, and the difference data generated by the virtual machine during operation is stored in the differential virtual disk file, which can reduce the storage of the data stored in the server. Take the (I/O) load.

其中,儲存伺服器更可以包含伺服快取(Cache),主機端也可以包含主機快取,透過伺服快取及/或主機快取,可以提高主機端存取基礎鏡像的速度,且主機快取更可以減少主機端存取基礎鏡像的網路流量。The storage server may further include a cache cache, and the host side may also include a host cache. Through the server cache and/or the host cache, the speed of the host side accessing the base image may be improved, and the host cache is cached. It can also reduce the network traffic of the host side accessing the base image.

以下先說明本發明的系統運作。本發明之系統含有至少一個儲存伺服器以及一個或多個主機端。其中,特別值得一提的是,在本發明中,主機端的數量通常會依據本發明之系統的使用者決定,越多的使用者往往會有越多的主機端200,而儲存伺服器100的數量則通常是依據主機端200的數量決定,當所有主機端200在正常運作時,若各個儲存伺服器100的存取效能或網路負載都達到一定比例,則在需要新增主機端的情況下,通常也需要增加 儲存伺服器100,使得儲存伺服器100的存取效能或網路負載不因此降低,進而影響各個主機端的資料存取效能。The operation of the system of the present invention will be described first. The system of the present invention includes at least one storage server and one or more host terminals. Among them, it is particularly worth mentioning that, in the present invention, the number of host terminals is usually determined by the user of the system of the present invention, and the more users tend to have more host terminals 200, while the storage server 100 The number is usually determined according to the number of the host end 200. When all the host terminals 200 are in normal operation, if the access performance or the network load of each storage server 100 reaches a certain ratio, then the host side needs to be added. , usually also need to increase The server 100 is stored so that the access performance or network load of the storage server 100 is not reduced, thereby affecting the data access performance of each host.

請先參照「第1圖」本發明所提之以儲存區域網路提供讀取基礎鏡像之伺服器元件示意圖所示,儲存伺服器100更包含儲存媒體110、目標模組(target)130、以及可附加的伺服快取150。Please refer to FIG. 1 for a schematic diagram of a server component for providing a read base image in a storage area network, and the storage server 100 further includes a storage medium 110, a target module 130, and Additional servo cache 150.

儲存媒體110負責儲存原生虛擬磁碟檔111。儲存媒體110通常為能夠不按順序隨機存取(random access)固定大小之資料片段(chunk)的區塊設備(block device),例如,硬碟、光碟等,但本發明沒有特別的限制。The storage medium 110 is responsible for storing the native virtual disk file 111. The storage medium 110 is generally a block device capable of random accessing a fixed-size chunk of data, for example, a hard disk, a compact disc, or the like, but the present invention is not particularly limited.

儲存媒體110所儲存之原生虛擬磁碟檔111在本發明中為唯讀(read only)的檔案。原生虛擬磁碟檔111通常包含由主機端200所安裝的目標程式,但本發明並不以此為限,在部分的實施例中,儲存媒體110所儲存之原生虛擬磁碟檔可以尚未安裝目標程式。其中,本發明所提的目標程式包含作業系統、應用軟體等可在虛擬機器中運行的程式,但本發明並不以上述為限。The native virtual disk file 111 stored by the storage medium 110 is a read only file in the present invention. The native virtual disk file 111 usually includes the target program installed by the host terminal 200. However, the present invention is not limited thereto. In some embodiments, the original virtual disk file stored in the storage medium 110 may not be installed. Program. The target program proposed by the present invention includes a program that can be run in a virtual machine such as an operating system or an application software, but the present invention is not limited to the above.

目標模組130提供主機端200透過儲存區域網路(Storage Area Network,SAN)與儲存伺服器100連接,負責提供主機端200掛載(mount)儲存媒體110,使得儲存媒體110成為主機端200的遠端磁碟。The target module 130 is connected to the storage server 100 through the storage area network (SAN), and is configured to provide the host 200 to mount the storage medium 110, so that the storage medium 110 becomes the host 200. Remote disk.

目標模組130也負責由儲存媒體110中讀出原生虛擬磁碟檔111所包含的目標程式,並傳送目標程式至主機端200,使得在主機端200中運行的虛擬機器可以執行目標程式。其中,特別值得一提的是,若儲存媒體110為區塊設備,則目標程式可能被儲存在一個至多個儲存區塊(block)中,目標模組130會讀取目標程 式的各個儲存區塊,並分別傳送至主機端200。The target module 130 is also responsible for reading the target program included in the native virtual disk file 111 from the storage medium 110 and transferring the target program to the host terminal 200, so that the virtual machine running in the host terminal 200 can execute the target program. In particular, if the storage medium 110 is a block device, the target program may be stored in one or more storage blocks, and the target module 130 may read the target program. Each storage block of the formula is transmitted to the host end 200, respectively.

伺服快取150為可附加在儲存伺服器100中的儲存元件,通常為讀取速度比儲存媒體110更快的儲存設備,例如隨機存取記憶體(Random Access Memory,RAM)、快閃記憶體(Flash)等,但伺服快取150並不以此為限。The servo cache 150 is a storage component that can be attached to the storage server 100, and is generally a storage device that reads faster than the storage medium 110, such as a random access memory (RAM), a flash memory. (Flash), etc., but the servo cache 150 is not limited to this.

伺服快取150負責儲存目標模組130由儲存媒體110中所讀出的目標程式,使目標模組130可以在需要再次至儲存媒體110中讀取目標程式時,先判斷伺服快取150中是否儲存目標程式,若伺服快取150中已儲存目標程式,則由伺服快取150讀取目標程式,若伺服快取150中沒有儲存目標程式,則目標模組130仍然會由儲存媒體110中讀取目標程式,並在讀出目標程式後,將所讀出的目標程式儲存至伺服快取150中。The servo cache 150 is responsible for storing the target program read by the target module 130 from the storage medium 110, so that the target module 130 can determine whether the servo cache 150 is needed when the target program needs to be read again in the storage medium 110. The target program is stored. If the target program is stored in the server cache 150, the target program is read by the server cache 150. If the target program is not stored in the server cache 150, the target module 130 is still read by the storage medium 110. The target program is fetched, and after reading the target program, the read target program is stored in the servo cache 150.

另外,若儲存媒體110為區塊設備時,伺服快取150中可能不會儲存完整的目標程式,也就是伺服快取150中可能不會儲存包含目標程式的所有儲存區塊,而是可能僅儲存包含目標程式的部分儲存區塊。如此,目標模組130在需要再次讀取目標程式時,會先判斷伺服快取150中是否儲存包含目標程式的儲存區塊,若伺服快取150中儲存了包含目標程式的一個或多個儲存區塊,則目標模組130會由伺服快取150中讀取儲存在伺服快取150中之包含目標程式的各個儲存區塊,並由儲存媒體110中讀取沒有儲存在伺服快取150中之包含目標程式的其他儲存區塊,以及將由儲存媒體110中所讀出的儲存區塊儲存在伺服快取150中,並分別將包含目標程式的所有儲存區塊傳送至主機端200。In addition, if the storage medium 110 is a block device, the complete target program may not be stored in the server cache 150, that is, the storage cache 150 may not store all the storage blocks including the target program, but may only Store some of the storage blocks containing the target program. In this manner, when the target module 130 needs to read the target program again, it first determines whether the storage block containing the target program is stored in the server cache 150, and if the server cache 150 stores one or more storages containing the target program. In the block, the target module 130 reads the storage blocks of the target program stored in the servo cache 150 from the servo cache 150, and reads them from the storage medium 110 and does not store them in the server cache 150. The other storage blocks of the target program are stored, and the storage blocks read by the storage medium 110 are stored in the servo cache 150, and all the storage blocks including the target program are respectively transmitted to the host terminal 200.

接著請參照「第2圖」本發明所提之以儲存區域網路提供讀 取基礎鏡像之主機端內部示意圖所示,主機端200更包含發起模組(initiator)210、本地磁碟230、虛擬機器處理模組250以及可附加的主機快取270。Please refer to "Figure 2" for the purpose of providing storage for the storage area network. As shown in the internal schematic diagram of the host image of the base image, the host terminal 200 further includes an initiator 210, a local disk 230, a virtual machine processing module 250, and an attachable host cache 270.

發起模組210負責透過儲存區域網路與儲存伺服器100連接,並掛載儲存伺服器100的儲存媒體110,使儲存媒體110成為主機端200的遠端磁碟。發起模組210也負責至儲存伺服器100下載儲存媒體110所儲存之原生虛擬磁碟檔111中的目標程式。The initiating module 210 is responsible for connecting to the storage server 100 through the storage area network, and mounting the storage medium 110 of the storage server 100 so that the storage medium 110 becomes the remote disk of the host end 200. The initiating module 210 is also responsible for the storage server 100 downloading the target program in the native virtual disk file 111 stored in the storage medium 110.

本地磁碟230負責儲存差異虛擬磁碟檔231。本地磁碟230與儲存伺服器100的儲存媒體110相似,通常也是區塊設備,但本地磁碟230並不以此為限。The local disk 230 is responsible for storing the difference virtual disk file 231. The local disk 230 is similar to the storage medium 110 of the storage server 100, and is usually also a block device, but the local disk 230 is not limited thereto.

本地磁碟230所儲存之差異虛擬磁碟檔231是以原生虛擬磁碟檔111為基礎鏡像所建立,而每一主機端200的本地磁碟230可以儲存一個或多個差異虛擬磁碟檔231。The difference virtual disk file 231 stored by the local disk 230 is established based on the native virtual disk file 111, and the local disk 230 of each host terminal 200 can store one or more differential virtual disk files 231. .

值得一提的是,由於原生虛擬磁碟檔111為唯讀檔,因此,因為需要對原生虛擬磁碟檔111中之內容進行新增、修改、刪除等寫入操作後所產生的資料會被儲存在差異虛擬磁碟檔231中(被產生的資料即為本發明所提之「差異資料」)。其中,若本地磁碟230為區塊設備,則差異虛擬磁碟檔231中會儲存原生虛擬磁碟檔111中產生變化的儲存區塊,也就是說,包含差異資料的儲存區塊會被儲存到差異虛擬磁碟檔231中。It is worth mentioning that since the native virtual disk file 111 is read-only, the data generated after the writing, adding, modifying, deleting, etc. of the content in the original virtual disk file 111 will be It is stored in the difference virtual disk file 231 (the generated data is the "difference data" mentioned in the present invention). If the local disk 230 is a block device, the difference virtual disk file 231 stores the storage block in the original virtual disk file 111, that is, the storage block containing the difference data is stored. Go to the difference virtual disk file 231.

虛擬機器處理模組250通常包含處理器(processor)以及記憶體(memory),但虛擬機器處理模組250並不以此為限。The virtual machine processing module 250 generally includes a processor and a memory, but the virtual machine processing module 250 is not limited thereto.

虛擬機器處理模組250負責執行虛擬機器251。每一主機端200的虛擬機器處理模組250可以執行一個或多個虛擬機器,但本 發明並沒有特別的限制。在部分的實施例中,虛擬機器處理模組250所執行的虛擬機器251與本地磁碟230所儲存的差異虛擬磁碟檔231具有一對一的對應關係。The virtual machine processing module 250 is responsible for executing the virtual machine 251. The virtual machine processing module 250 of each host end 200 can execute one or more virtual machines, but The invention is not particularly limited. In some embodiments, the virtual machine 251 executed by the virtual machine processing module 250 has a one-to-one correspondence with the difference virtual disk file 231 stored in the local disk 230.

當虛擬機器處理模組250執行虛擬機器251時,虛擬機器251會掛載相對應的差異虛擬磁碟檔231,而後會執行差異虛擬磁碟檔231中的目標程式。在虛擬機器251執行目標程式時,虛擬機器251或被執行的目標程式可能會需要讀取目標程式的設定檔、動態連結檔、資料檔等相關資料(但本發明並不以此為限),此時,若目標程式的相關資料為原生虛擬磁碟檔111中的原始資料,且相關資料的內容並沒有因為經過寫入操作而產生變化,如設定檔、動態連結檔等,則虛擬機器處理模組250會透過發起模組210至儲存伺服器100的儲存媒體110中讀取目標程式的相關資料,而若目標程式的相關資料經過新增、修改、刪除等寫入操作而成為產生變化的差異資料,如設定檔、資料檔等,則表示產生變化之相關資料被儲存在與被執行之虛擬機器251對應的差異虛擬磁碟檔231中,因此,虛擬機器處理模組250會由與被執行之虛擬機器251對應的差異虛擬磁碟檔231中讀取目標程式的相關資料。另外,在虛擬機器251執行目標程式時,虛擬機器251或被執行的目標程式也可能會需要進行寫入操作而產生差異資料,如暫存檔、快取等,虛擬機器處理模組250會將被產生的差異資料儲存到與被執行之虛擬機器251對應的差異虛擬磁碟檔231中。When the virtual machine processing module 250 executes the virtual machine 251, the virtual machine 251 mounts the corresponding differential virtual disk file 231, and then executes the target program in the differential virtual disk file 231. When the virtual machine 251 executes the target program, the virtual machine 251 or the executed target program may need to read related files of the target program, dynamic link files, data files, and the like (but the invention is not limited thereto). At this time, if the related data of the target program is the original data in the original virtual disk file 111, and the content of the related data does not change due to the writing operation, such as a profile, a dynamic link file, etc., the virtual machine processes The module 250 reads the related data of the target program through the initiating module 210 to the storage medium 110 of the storage server 100, and changes the related data of the target program by adding, modifying, deleting, etc. The difference data, such as the profile, the data file, etc., indicates that the relevant data for the change is stored in the difference virtual disk file 231 corresponding to the executed virtual machine 251, and therefore, the virtual machine processing module 250 is The related data of the target program is read in the difference virtual disk file 231 corresponding to the executed virtual machine 251. In addition, when the virtual machine 251 executes the target program, the virtual machine 251 or the executed target program may also need to perform a write operation to generate difference data, such as temporary archiving, cache, etc., and the virtual machine processing module 250 will be The generated difference data is stored in the difference virtual disk file 231 corresponding to the executed virtual machine 251.

另外,由於虛擬機器與一般電腦相同,也需要安裝有作業系統以及應用程式等目標程式才能夠運作,因此,虛擬機器處理模組250更可以提供虛擬機器251安裝作業系統以及應用程式等目 標程式。In addition, since the virtual machine is the same as the general computer, the target program such as the operating system and the application program needs to be installed to operate. Therefore, the virtual machine processing module 250 can provide the virtual machine 251 installation operating system and the application program. Standard program.

虛擬機器處理模組250可以在本地磁碟230上產生沒有任何資料的臨時虛擬磁碟檔(圖中未示),並執行虛擬機器。虛擬機器在被執行後,會掛載虛擬機器處理模組250所產生的臨時虛擬磁碟檔為虛擬機器中的磁碟機,並格式化該磁碟機。在虛擬機器安裝目標程式時,虛擬機器處理模組250會將虛擬機器安裝的目標程式儲存到所產生的臨時虛擬磁碟檔中,並在虛擬機器完成目標程式的安裝後,在虛擬機器所安裝的作業系統(也就是臨時虛擬磁碟檔)中建立代理程式(agent),而後,在虛擬機器處理模組250結束執行虛擬機器或虛擬機器卸載(unmount)虛擬機器處理模組250所產生的臨時虛擬磁碟檔時,虛擬機器處理模組250會將包含目標程式以及代理程式的虛擬磁碟檔複製到主機端200的遠端磁碟中,也就是複製到儲存伺服器100的儲存媒體110中,如此,被虛擬機器處理模組250複製到主機端200之遠端磁碟中的臨時虛擬磁碟檔即為本發明所提之原生虛擬磁碟檔111。The virtual machine processing module 250 can generate a temporary virtual disk file (not shown) without any data on the local disk 230 and execute the virtual machine. After the virtual machine is executed, the temporary virtual disk file generated by the virtual machine processing module 250 is mounted as a disk drive in the virtual machine, and the disk drive is formatted. When the virtual machine installs the target program, the virtual machine processing module 250 stores the target program of the virtual machine installation into the generated temporary virtual disk file, and installs the virtual machine after the virtual machine completes the installation of the target program. An agent is created in the operating system (that is, the temporary virtual disk file), and then the virtual machine processing module 250 ends executing the virtual machine or the virtual machine unmounting the temporary generated by the virtual machine processing module 250. In the virtual disk file, the virtual machine processing module 250 copies the virtual disk file containing the target program and the agent to the remote disk of the host 200, that is, to the storage medium 110 of the storage server 100. Thus, the temporary virtual disk file copied by the virtual machine processing module 250 to the remote disk of the host terminal 200 is the native virtual disk file 111 proposed by the present invention.

實務上,虛擬機器處理模組250提供虛擬機器安裝目標程式以建立原生虛擬磁碟檔111的方式並不以上述為限,虛擬機器處理模組250也可以透過設定主機的發起模組210,直接在主機端200的遠端磁碟(儲存伺服器100的儲存媒體110)上產生原生虛擬磁碟檔111,而後,虛擬機器處理模組250會與上述相同的,執行虛擬機器,並在虛擬機器安裝目標程式時,將虛擬機器安裝的目標程式儲存到所產生的原生虛擬磁碟檔111中,並在虛擬機器完成目標程式的安裝後,在虛擬機器所安裝的作業系統(也就是原生虛擬磁碟檔111)中建立代理程式,如此,原生虛擬磁碟檔 111便會包含目標程式與代理程式。In a practical manner, the virtual machine processing module 250 provides the virtual machine installation target program to establish the native virtual disk file 111. The virtual machine processing module 250 can also directly set the host startup module 210. The native virtual disk file 111 is generated on the remote disk of the host terminal 200 (the storage medium 110 of the storage server 100), and then the virtual machine processing module 250 executes the virtual machine in the same manner as described above, and is in the virtual machine. When the target program is installed, the target program of the virtual machine installation is stored in the generated native virtual disk file 111, and after the virtual machine completes the installation of the target program, the operating system installed on the virtual machine (that is, the native virtual magnetic file) Create an agent in the file 111), so, the native virtual disk file 111 will include the target program and the agent.

在虛擬機器處理模組250建立原生虛擬磁碟檔111後,可以在本地磁碟230中依據原生虛擬磁碟檔111建立差異虛擬磁碟檔231,並掛載所建立的差異虛擬磁碟檔231,藉以將目標程式的相關資料寫入差異虛擬磁碟檔231中。如此,在虛擬機器處理模組250執行與所建立之差異虛擬磁碟檔231對應之新的虛擬機器時,新的虛擬機器會先執行原生虛擬磁碟檔111中的代理程式,代理程式被虛擬機器執行後,會依據差異虛擬磁碟檔231中的相關資料設定新的虛擬機器的初始環境,使得新的虛擬機器的作業系統與應用程式等目標程式可以正常運作。After the virtual machine processing module 250 establishes the native virtual disk file 111, the difference virtual disk file 231 can be created in the local disk 230 according to the native virtual disk file 111, and the created differential virtual disk file 231 can be mounted. In order to write the relevant data of the target program into the difference virtual disk file 231. Thus, when the virtual machine processing module 250 executes a new virtual machine corresponding to the created differential virtual disk file 231, the new virtual machine first executes the agent in the native virtual disk file 111, and the agent is virtualized. After the machine is executed, the initial environment of the new virtual machine is set according to the relevant information in the difference virtual disk file 231, so that the target program such as the operating system and the application of the new virtual machine can operate normally.

主機快取270為可附加在主機端200中的儲存元件,例如,快閃記憶體、隨機存取記憶體等,但主機快取270並不以此為限。,一般而言,主機快取270的存取速度會優於本地磁碟230,但本發明並沒有特別的限制。The host cache 270 is a storage component that can be attached to the host 200, such as a flash memory, a random access memory, etc., but the host cache 270 is not limited thereto. In general, the access speed of the host cache 270 is superior to that of the local disk 230, but the present invention is not particularly limited.

主機快取270負責儲存發起模組210至儲存伺服器100所下載的目標程式,使發起模組210可以在再次需要至儲存伺服器100中下載目標程式時,先判斷主機快取270中是否儲存目標程式,若主機快取270中已儲存目標程式,則發起模組210將由主機快取270中讀取目標程式,若主機快取270中尚未儲存目標程式,則發起模組210才會由儲存伺服器100中下載目標程式,並在下載目標程式後,將所下載的目標程式儲存到主機快取270中。The host cache 270 is responsible for storing the target program downloaded by the initiating module 210 to the storage server 100, so that the initiating module 210 can first determine whether the host cache 270 is stored when the target program is downloaded to the storage server 100 again. The target program, if the target cache is stored in the host cache 270, the originating module 210 will read the target program from the host cache 270. If the target cache is not stored in the host cache 270, the launch module 210 will be stored. The target program is downloaded from the server 100, and after downloading the target program, the downloaded target program is stored in the host cache 270.

另外,若儲存伺服器100之儲存媒體110與本地磁碟230都為區塊設備時,主機快取270中可能不會儲存完整的目標程式,也就是主機快取270中可能不會儲存包含目標程式的所有儲存區 塊,而是可能僅儲存包含目標程式的部分儲存區塊。如此,發起模組210在需要再次讀取目標程式時,會先判斷主機快取270中是否儲存包含目標程式的儲存區塊,若主機快取270中儲存了包含目標程式的一個或多個儲存區塊,則發起模組210會由主機快取270中讀取被儲存在主機快取270中之包含目標程式的各個儲存區塊,並至由儲存伺服器100下載沒有被儲存在主機快取270中之包含目標程式的其他儲存區塊,並儲存到主機快取270中。In addition, if the storage medium 110 and the local disk 230 of the storage server 100 are both block devices, the host cache 270 may not store the complete target program, that is, the host cache 270 may not store the target. All storage areas of the program Block, but may only store some of the storage blocks containing the target program. In this way, when the target module needs to read the target program again, it first determines whether the storage block containing the target program is stored in the host cache 270, and if the host cache 270 stores one or more storages containing the target program. In the block, the initiating module 210 reads the storage blocks of the target program included in the host cache 270 from the host cache 270, and downloads by the storage server 100 is not stored in the host cache. The other storage blocks of the target program in 270 are stored in the host cache 270.

接著以一個實施例來解說本發明的運作系統與方法,並請參照「第3A圖」本發明所提之以儲存區域網路提供讀取基礎鏡像之方法流程圖。假設在本實施例中,包含一個儲存伺服器100以及至少一個主機端200,其中,儲存伺服器100與主機端200都支援本發明。另外,在主機端200的數量過多時,本發明中也可以包含兩個或兩個以上的儲存伺服器100。Next, an operational system and method of the present invention will be described with reference to an embodiment. Referring to FIG. 3A, a flowchart of a method for providing a read base image by a storage area network is provided. It is assumed that in the present embodiment, a storage server 100 and at least one host terminal 200 are included, wherein both the storage server 100 and the host terminal 200 support the present invention. In addition, when the number of the host terminals 200 is excessive, two or more storage servers 100 may be included in the present invention.

若儲存伺服器100的儲存媒體110中尚未儲存可以做為基礎鏡像的原生虛擬磁碟檔111,則管理者需要先建立可以做為基礎鏡像的原生虛擬磁碟檔111。如此,表示管理者需要操作其中一台主機端200,藉以建立可以做為基礎鏡像的原生虛擬磁碟檔111,其中,被管理者操作來建立可以做為基礎鏡像之原生虛擬磁碟檔111的主機端200在本發明中被稱為「設定主機」。If the native virtual disk file 111, which can be used as the base image, is not stored in the storage medium 110 of the storage server 100, the administrator needs to first create a native virtual disk file 111 that can be used as the base image. Thus, the manager needs to operate one of the host terminals 200 to establish a native virtual disk file 111 that can be used as a base image, wherein the administrator operates to create a native virtual disk file 111 that can be used as a base image. The host side 200 is referred to as a "setting host" in the present invention.

首先,設定主機中的發起模組210可以透過儲存區域網路掛載儲存伺服器100的儲存媒體110為設定主機的遠端磁碟(步驟310),而後,設定主機的虛擬機器處理模組250可以在遠端磁碟中建立可以做為基礎鏡像的原生虛擬磁碟檔111(步驟320)。First, the initiating module 210 in the setting host can mount the storage medium 110 of the storage server 100 through the storage area network as the remote disk of the setting host (step 310), and then set the virtual machine processing module 250 of the host. A native virtual disk file 111 that can be used as a base image can be created in the remote disk (step 320).

在本實施例中,假設設定主機的虛擬機器處理模組250可以 如「第3B圖」之流程所示,在設定主機的本地磁碟230上產生臨時虛擬磁碟檔(步驟321a),並執行虛擬機器(步驟322)。In this embodiment, it is assumed that the virtual machine processing module 250 of the host can be set. As shown in the flow of "FIG. 3B", a temporary virtual disk file is generated on the local disk 230 of the setting host (step 321a), and the virtual machine is executed (step 322).

在虛擬機器被虛擬機器處理模組250執行後,虛擬機器可以掛載本地磁碟230上的臨時虛擬磁碟檔(步驟323a)。之後,管理者可以透過設定主機,在虛擬機器中安裝作業系統以及應用程式等目標程式。After the virtual machine is executed by the virtual machine processing module 250, the virtual machine can mount the temporary virtual disk file on the local disk 230 (step 323a). After that, the administrator can install the target program such as the operating system and the application in the virtual machine by setting the host.

在虛擬機器安裝目標程式(步驟325)時,設定主機的虛擬機器處理模組250可以將虛擬機器所安裝的目標程式儲存到本地磁碟230上的臨時虛擬磁碟檔中(步驟326a),並可以在虛擬機器完成目標程式的安裝後,在儲存目標程式的臨時虛擬磁碟檔中建立代理程式(步驟327a)。最後,在虛擬機器被虛擬機器處理模組250結束執行,或虛擬機器卸載該虛擬磁碟檔(步驟328a)時,虛擬機器處理模組250可以將包含目標程式以及代理程式的臨時虛擬磁碟檔由設定主機的本地磁碟230複製到設定主機的遠端磁碟,成為原生虛擬磁碟檔(步驟329),如此,虛擬機器處理模組250便完成原生虛擬磁碟檔的建立。When the virtual machine installs the target program (step 325), the virtual machine processing module 250 of the set host can store the target program installed by the virtual machine into the temporary virtual disk file on the local disk 230 (step 326a), and After the virtual machine completes the installation of the target program, an agent is created in the temporary virtual disk file of the storage target program (step 327a). Finally, when the virtual machine is terminated by the virtual machine processing module 250, or the virtual machine unloads the virtual disk file (step 328a), the virtual machine processing module 250 can include the temporary virtual disk file containing the target program and the agent. The local disk 230 of the setting host is copied to the remote disk of the setting host to become the native virtual disk file (step 329). Thus, the virtual machine processing module 250 completes the creation of the native virtual disk file.

事實上,在本實施例中,設定主機的虛擬機器處理模組250也可以如「第3C圖」之流程所示,透過設定主機的發起模組210,直接在設定主機的遠端磁碟(儲存伺服器100的儲存媒體110)上產生原生虛擬磁碟檔111(步驟321b)後,執行虛擬機器(步驟322)。虛擬機器在執行後會掛載遠端磁碟上的原生虛擬磁碟檔(步驟323b)。In fact, in this embodiment, the virtual machine processing module 250 of the setting host may also directly set the remote disk of the host by setting the initiator module 210 of the host as shown in the flow of "3C". After the native virtual disk file 111 is generated on the storage medium 110) of the storage server 100 (step 321b), the virtual machine is executed (step 322). The virtual machine mounts the native virtual disk file on the remote disk after execution (step 323b).

之後,管理者可以透過設定主機,在虛擬機器中安裝目標程式。在虛擬機器安裝目標程式(步驟325)時,設定主機的虛擬機 器處理模組250可以將虛擬機器所安裝之目標程式儲存到遠端磁碟上的原生虛擬磁碟檔中(步驟326b),並可以在虛擬機器完成目標程式的安裝後,在包含目標程式的原生虛擬磁碟檔中建立代理程式(步驟327b)。如此,虛擬機器處理模組250便在遠端磁碟上建立包含目標程式以及代理程式的原生虛擬磁碟檔。After that, the administrator can install the target program on the virtual machine by setting the host. Set the host's virtual machine when the virtual machine installs the target program (step 325) The processing module 250 can store the target program installed by the virtual machine into the original virtual disk file on the remote disk (step 326b), and can include the target program after the virtual machine completes the installation of the target program. An agent is created in the native virtual disk file (step 327b). In this way, the virtual machine processing module 250 creates a native virtual disk file containing the target program and the agent on the remote disk.

接著回到「第3A圖」,設定主機的虛擬機器處理模組250在設定主機的遠端磁碟上,也就是在儲存伺服器100的儲存媒體110中建立原生虛擬磁碟檔111(步驟320)後,包含設定主機的所有的主機端都可以透過儲存區域網路掛載儲存伺服器100的儲存媒體110為各主機端上的遠端磁碟(步驟310)。其中,由於包含設定主機的所有的主機端都可以提供虛擬機器的執行,因此,在本發明中,所有的主機端都可以被稱為「服務主機」。Then, returning to "FIG. 3A", the virtual machine processing module 250 of the host is set to establish a native virtual disk file 111 on the remote disk of the setting host, that is, in the storage medium 110 of the storage server 100 (step 320). After that, all the host terminals including the setting host can mount the storage medium 110 of the storage server 100 to the remote disk on each host terminal through the storage area network (step 310). Wherein, since all the host terminals including the setting host can provide execution of the virtual machine, in the present invention, all the host terminals can be referred to as "service host".

在本發明中,設定主機的虛擬機器處理模組250在遠端磁碟上建立原生虛擬磁碟檔111(步驟320)的步驟,與所有主機端透過儲存區域網路掛載儲存伺服器100的儲存媒體110為各主機端上的遠端磁碟(步驟310)的步驟並沒有先後順序的分別,也就是說,包含設定主機的所有主機端可以先透過儲存區域網路掛載儲存伺服器100的儲存媒體110為各主機端上的遠端磁碟(步驟310),而後,設定主機的虛擬機器處理模組250才會在遠端磁碟上建立原生虛擬磁碟檔111(步驟320)。In the present invention, the virtual machine processing module 250 of the host is configured to establish a native virtual disk file 111 on the remote disk (step 320), and all the host terminals mount the storage server 100 through the storage area network. The steps of the storage medium 110 being the remote disk on each host end (step 310) are not sequential, that is, all the host terminals including the set host may first mount the storage server 100 through the storage area network. The storage medium 110 is a remote disk on each host (step 310), and then the virtual machine processing module 250 of the host is set to create a native virtual disk file 111 on the remote disk (step 320).

另外,在本發明中,由於各個服務主機(所有的主機端)接下來所執行的步驟都相同,因此,在後續的說明中,將只針對一個服務主機說明。In addition, in the present invention, since the steps performed by the respective service hosts (all the host terminals) are the same, in the following description, only one service host will be explained.

在各主機端透過儲存區域網路掛載儲存伺服器100的儲存媒 體110為各主機端上的遠端磁碟(步驟310),以及設定主機在遠端磁碟上建立原生虛擬磁碟檔111(步驟320)後,服務主機的虛擬機器處理模組250可以以遠端磁碟上的原生虛擬磁碟檔111為基礎鏡像,在服務主機的本地磁碟230中建立差異虛擬磁碟檔231(步驟330)。Mounting the storage medium of the storage server 100 through the storage area network at each host end The body 110 is a remote disk on each host end (step 310), and after the host is set up to create a native virtual disk file 111 on the remote disk (step 320), the virtual machine processing module 250 of the service host can The native virtual disk file 111 on the remote disk is the base image, and a differential virtual disk file 231 is created in the local disk 230 of the service host (step 330).

在實務上,服務主機的虛擬機器處理模組250可以建立多個差異虛擬磁碟檔231,每一個差異虛擬磁碟檔231都對應一個不同的虛擬機器。在本發明中,由於每一個虛擬機器的運作方式都相同,因此,在本實施例中,將只針對一個虛擬機器進行描述。In practice, the virtual machine processing module 250 of the service host can create a plurality of differential virtual disk files 231, each of which corresponds to a different virtual machine. In the present invention, since each virtual machine operates in the same manner, in the present embodiment, description will be made only for one virtual machine.

在服務主機的虛擬機器處理模組250以遠端磁碟上的原生虛擬磁碟檔111為基礎鏡像,在服務主機的本地磁碟230中建立差異虛擬磁碟檔231(步驟330)後,在服務主機的虛擬機器處理模組250執行與差異虛擬磁碟檔231對應的虛擬機器251(步驟352)時,若服務主機的虛擬機器處理模組250未曾執行過與所建立之差異虛擬磁碟檔231對應的虛擬機器251,則如「第3D圖」之流程所示,服務主機的虛擬機器處理模組250可以先將服務主機之遠端磁碟上的原生虛擬磁碟檔111中之目標程式的相關資料寫入差異虛擬磁碟檔231中(步驟340)。在本實施例中,服務主機的虛擬機器處理模組250可以執行如diskpart等工具程式,將差異虛擬磁碟檔231掛載為服務主機的磁碟機,並在服務主機掛載差異虛擬磁碟檔231所產生的磁碟機中寫入與差異虛擬磁碟檔231對應之虛擬機器的名稱、作業系統的網域存取權限、遠端桌面程式的使用者權限等相關資料,藉以將安裝在原生虛擬磁碟檔111中之目標程式的相關資料寫入差異虛擬磁碟檔231中。The virtual machine processing module 250 of the service host mirrors the native virtual disk file 111 on the remote disk, and establishes the difference virtual disk file 231 in the local disk 230 of the service host (step 330). When the virtual machine processing module 250 of the service host executes the virtual machine 251 corresponding to the difference virtual disk file 231 (step 352), if the virtual machine processing module 250 of the service host has not executed the virtual disk file that is different from the created virtual disk file 231 corresponding virtual machine 251, as shown in the flow of "3D", the virtual machine processing module 250 of the service host may first target the target virtual disk file 111 on the remote disk of the service host. The related data is written into the difference virtual disk file 231 (step 340). In this embodiment, the virtual machine processing module 250 of the service host can execute a utility such as a diskpart, mount the differential virtual disk file 231 as a disk drive of the service host, and mount the differential virtual disk on the service host. The disk machine generated by the file 231 writes the name of the virtual machine corresponding to the difference virtual disk file 231, the domain access authority of the operating system, the user authority of the remote desktop program, and the like, so as to be installed in the disk drive. The related data of the target program in the native virtual disk file 111 is written in the difference virtual disk file 231.

在服務主機的虛擬機器處理模組250將相關資料寫入差異虛擬磁碟檔中(步驟340)後,服務主機的虛擬機器處理模組250才可以執行與被寫入相關資料之差異虛擬磁碟檔231相對應的虛擬機器251(步驟352),虛擬機器251在被服務主機的虛擬機器處理模組250執行後,可以掛載相對應的差異虛擬磁碟檔231(步驟356),藉以在虛擬機器251中生成磁碟機,由於差異虛擬磁碟檔231是以服務主機之遠端磁碟上的原生虛擬磁碟檔111為基礎鏡像,因此,在虛擬機器中生成的磁碟機將包含原生虛擬磁碟檔111中的所有原始資料以及差異虛擬磁碟檔231中的差異資料,其中,差異虛擬磁碟檔231中的差異資料會覆蓋原生虛擬磁碟檔111中經過寫入操作的原始資料。After the virtual machine processing module 250 of the service host writes the related data into the difference virtual disk file (step 340), the virtual machine processing module 250 of the service host can execute the difference virtual disk with the related data being written. The virtual machine 251 corresponding to the file 231 (step 352), after being executed by the virtual machine processing module 250 of the service host, the virtual machine 251 can mount the corresponding differential virtual disk file 231 (step 356), thereby A disk drive is generated in the machine 251. Since the difference virtual disk file 231 is mirrored based on the native virtual disk file 111 on the remote disk of the service host, the disk drive generated in the virtual machine will contain the native device. All the original data in the virtual disk file 111 and the difference data in the difference virtual disk file 231, wherein the difference data in the difference virtual disk file 231 covers the original data in the original virtual disk file 111 after the write operation. .

在虛擬機器251掛載相對應的差異虛擬磁碟檔231(步驟356)後,虛擬機器251可以執行遠端磁碟上之原生虛擬磁碟檔111中的代理程式(步驟361),對虛擬機器251而言,也就是執行在虛擬機器251中生成之磁碟機中所包含的代理程式。After the virtual machine 251 mounts the corresponding differential virtual disk file 231 (step 356), the virtual machine 251 can execute the agent in the native virtual disk file 111 on the remote disk (step 361), for the virtual machine In the case of 251, that is, the agent included in the disk drive generated in the virtual machine 251 is executed.

代理程式在虛擬機器中被執行後,可以依據差異虛擬磁碟檔231中所儲存的相關資料設定虛擬機器251及/或目標程式的初始環境(步驟363),使得虛擬機器251可以順利運作,並正常執行在虛擬機器生成之磁碟機中的作業系統以及應用程式,也就是執行遠端磁碟上之原生虛擬磁碟檔111中的目標程式(步驟370),藉以讓虛擬機器的使用者操作虛擬機器。在本發明中,假設代理程式會設定虛擬機器的名稱、作業系統所在之網域的存取權限、作業系統中遠端桌面軟體之使用者權限等相關資料。After the agent is executed in the virtual machine, the initial environment of the virtual machine 251 and/or the target program may be set according to the related data stored in the difference virtual disk file 231 (step 363), so that the virtual machine 251 can operate smoothly, and The operating system and the application in the virtual machine-generated disk drive are normally executed, that is, the target program in the native virtual disk file 111 on the remote disk is executed (step 370), so that the user of the virtual machine operates. Virtual machine. In the present invention, it is assumed that the agent sets the name of the virtual machine, the access authority of the domain in which the operating system is located, and the user rights of the remote desktop software in the operating system.

繼續回到「第3A圖」,在服務主機的虛擬機器處理模組250 執行與所建立之差異虛擬磁碟檔231對應的虛擬機器251(步驟352)時,若服務主機的虛擬機器處理模組250曾經執行過與所建立之差異虛擬磁碟檔231對應的虛擬機器251,則在服務主機的虛擬機器處理模組250執行虛擬機器251(步驟352)後,虛擬機器251可以掛載相對應的差異虛擬磁碟檔231(步驟356),使得虛擬機器251依據差異虛擬磁碟檔231生成磁碟機,接著,虛擬機器251可以執行服務主機的遠端磁碟上之原生虛擬磁碟檔111中的目標程式(步驟370),對虛擬機器251而言,也就是執行在虛擬機器251中生成之磁碟機上的作業系統以及應用程式等目標程式,使得虛擬機器251可以正常開機並提供使用者操作虛擬機器251。Continue to "3A", the virtual machine processing module 250 on the service host When the virtual machine 251 corresponding to the created difference virtual disk file 231 is executed (step 352), if the virtual machine processing module 250 of the service host has executed the virtual machine 251 corresponding to the created difference virtual disk file 231. After the virtual machine processing module 250 of the service host executes the virtual machine 251 (step 352), the virtual machine 251 can mount the corresponding differential virtual disk file 231 (step 356), so that the virtual machine 251 virtual magnetic according to the difference. The disk file 231 generates a disk drive. Next, the virtual machine 251 can execute the target program in the native virtual disk file 111 on the remote disk of the service host (step 370), for the virtual machine 251, that is, The operating system on the disk drive and the target program such as the application generated in the virtual machine 251 enable the virtual machine 251 to be powered on normally and provide the user to operate the virtual machine 251.

在虛擬機器251執行目標程式(步驟370)的過程中,若虛擬機器251或目標程式需要讀取目標程式的相關資料,如記錄設定檔中的環境設定值等,若被讀取的相關資料未曾經過寫入操作,也就是相關資料並非儲存在差異虛擬磁碟檔231中,而是儲存在原生虛擬磁碟檔111中的原始資料,則服務主機的虛擬機器處理模組250可以透過服務主機的發起模組210至儲存伺服器100下載相關資料,例如,發起模組210發出相關資料的下載請求給儲存伺服器100,使得儲存伺服器100的目標模組130依據下載請求由儲存伺服器100的儲存媒體110中讀出相關資料並傳回給服務主機,而若被讀取的相關資料經過寫入操作,也就是相關資料為被儲存在差異虛擬磁碟檔231中的差異資料,則服務主機的虛擬機器處理模組250可以透過至差異虛擬磁碟檔231中讀取相關資料(步驟392)。In the process of executing the target program by the virtual machine 251 (step 370), if the virtual machine 251 or the target program needs to read related data of the target program, such as the environment setting value in the record setting file, if the related data that has been read has not been After the write operation, that is, the related data is not stored in the difference virtual disk file 231, but the original data stored in the native virtual disk file 111, the virtual machine processing module 250 of the service host can pass through the service host. The initiating module 210 sends the related information to the storage server 100. For example, the initiating module 210 sends a download request of the related data to the storage server 100, so that the target module 130 of the storage server 100 is stored by the storage server 100 according to the download request. The relevant information is read out from the storage medium 110 and sent back to the service host, and if the related data read is subjected to a write operation, that is, the related data is the difference data stored in the difference virtual disk file 231, the service host The virtual machine processing module 250 can read the related data through the difference virtual disk file 231 (step 392).

同樣在虛擬機器251執行目標程式(步驟370)的過程中,若 目標程式在執行過程中,需要在虛擬機器251中生成的磁碟機上存取所產生的差異資料時,在本實施例中,假設目標程式產生需要儲存的暫存資料時,服務主機的虛擬機器處理模組250可以將暫存資料(差異資料)儲存到與虛擬機器251對應的差異虛擬磁碟檔231中,或目標程式需要讀取暫存資料時,虛擬機器處理模組250可以由與虛擬機器251對應的差異虛擬磁碟檔231中讀取出目標程式所需要的暫存資料(步驟396)。Also in the process in which the virtual machine 251 executes the target program (step 370), When the target program needs to access the generated difference data on the disk drive generated in the virtual machine 251 during execution, in this embodiment, the virtual host of the service host is assumed to be generated when the target program generates the temporary storage data to be stored. The machine processing module 250 can store the temporary storage data (difference data) in the differential virtual disk file 231 corresponding to the virtual machine 251, or the virtual machine processing module 250 can be used when the target program needs to read the temporary storage data. The temporary virtual disk file 231 corresponding to the virtual machine 251 reads the temporary data required by the target program (step 396).

如此,服務主機中的一個或多個虛擬機器在執行時,若在各個虛擬機器中執行的目標程式將差異資料儲存在各個虛擬機器的磁碟機中,則會使得服務主機的虛擬機器處理模組250分別將各目標程式所產生的差異資料寫入執行各目標程式之虛擬機器所對應的差異虛擬磁碟檔中,也就是服務主機的虛擬機器處理模組250會將差異資料儲存在服務主機的本地磁碟230中,而當各個虛擬機器或在各個虛擬機器中執行的各個目標程式需要讀取相關資料時,若虛擬機器所對應的差異虛擬磁碟檔中存在該相關資料,則服務主機的虛擬機器處理模組250會由虛擬機器所對應的差異虛擬磁碟檔中讀取目標程式所需讀取的相關資料,也就是服務主機的虛擬機器處理模組250會由服務主機的本地磁碟230中讀出差異資料,而若虛擬機器所對應的差異虛擬磁碟檔中不存在該相關資料,也就是該相關資料為儲存在原生虛擬磁碟檔中的原始資料,則服務主機的虛擬機器處理模組250會透過服務主機的發起模組210至儲存伺服器100中下載原始資料。In this way, when one or more virtual machines in the service host are executed, if the target program executed in each virtual machine stores the difference data in the disk drive of each virtual machine, the virtual machine processing mode of the service host is made. The group 250 respectively writes the difference data generated by each target program into the difference virtual disk file corresponding to the virtual machine executing each target program, that is, the virtual machine processing module 250 of the service host stores the difference data in the service host. In the local disk 230, when each virtual machine or each target program executed in each virtual machine needs to read related materials, if the related data exists in the difference virtual disk file corresponding to the virtual machine, the service host The virtual machine processing module 250 reads the relevant data that the target program needs to read from the difference virtual disk file corresponding to the virtual machine, that is, the virtual machine processing module 250 of the service host is used by the local magnetic of the service host. The difference data is read in the disc 230, and if the related data does not exist in the difference virtual disk file corresponding to the virtual machine, The relevant information is stored as raw data in native file in the virtual disk, the host virtual machine processing service module 250 will download the raw data through the host initiates service module 210 to the storage server 100.

相似的,當虛擬機器的使用者在虛擬機器中安裝新的應用程式時,新的應用程式即為差異資料,虛擬機器會將新的應用程式 安裝至掛載差異虛擬磁碟檔所生成的磁碟機中,使得服務主機的虛擬機器處理模組250將新的應用程式寫入服務主機之本地磁碟230所儲存之與虛擬機器對應的差異虛擬磁碟檔中,而後在新的應用程式被虛擬機器執行時,服務主機的虛擬機器處理模組250會由服務主機之本地磁碟230所儲存之與虛擬機器對應的差異虛擬磁碟檔中讀出新安裝的應用程式。而當虛擬機器執行原先安裝在相對應之差異虛擬磁碟檔的基礎鏡像中之目標程式時,服務主機的虛擬機器處理模組250會透過服務主機的發起模組210至儲存伺服器100下載目標程式,例如,發起模組210發出目標程式的下載請求給儲存伺服器100,使得儲存伺服器100的目標模組130依據下載請求由儲存伺服器100的儲存媒體110中讀出目標程式並傳回給服務主機。Similarly, when a user of a virtual machine installs a new application on a virtual machine, the new application is a difference, and the virtual machine will use the new application. Installed into the disk drive generated by mounting the differential virtual disk file, so that the virtual machine processing module 250 of the service host writes the new application to the difference corresponding to the virtual machine stored in the local disk 230 of the service host. In the virtual disk file, and then when the new application is executed by the virtual machine, the virtual machine processing module 250 of the service host is stored in the virtual disk file corresponding to the virtual machine stored by the local disk 230 of the service host. Read the newly installed application. When the virtual machine executes the target program originally installed in the base image of the corresponding differential virtual disk file, the virtual machine processing module 250 of the service host downloads the target through the initiating module 210 of the service host to the storage server 100. For example, the initiating module 210 issues a download request of the target program to the storage server 100, so that the target module 130 of the storage server 100 reads the target program from the storage medium 110 of the storage server 100 according to the download request and returns the program. Give the service host.

在上述的實施例中,若服務主機還包含主機快取270,則當服務主機的虛擬機器處理模組250透過服務主機的發起模組210至儲存伺服器100下載目標程式或下載目標程式的相關資料時,服務主機的發起模組210可以在至儲存伺服器100下載的目標程式或相關資料前,先判斷主機快取270中是否儲存被下載的目標程式或相關資料,若是,則發起模組210可以直接由主機快取270中讀取被下載的目標程式或相關資料,並將由主機快取270中讀出的目標程式或相關資料提供給服務主機的虛擬機器處理模組250,若否,發起模組210才會至儲存伺服器100下載的目標程式或相關資料。In the above embodiment, if the service host further includes the host cache 270, when the virtual machine processing module 250 of the service host downloads the target program or downloads the target program through the initiating module 210 of the service host to the storage server 100. In the case of the data, the initiating module 210 of the service host can determine whether the downloaded target program or related data is stored in the host cache 270 before the target program or related data downloaded by the server 100 is downloaded. 210 can directly read the downloaded target program or related data from the host cache 270, and provide the target program or related data read by the host cache 270 to the virtual machine processing module 250 of the service host, and if not, The initiating module 210 will not store the target program or related data downloaded by the server 100.

若服務主機的本地磁碟230以及儲存伺服器100的儲存媒體110都是區塊設備,則如「第3E圖」之流程所示,在虛擬機器讀 取目標程式或目標程式讀取相關資料(原始資料)(步驟371)時,服務主機的虛擬機器處理模組250可以透過服務主機的發起模組210下載目標程式或相關資料,發起模組210可以判斷主機快取270中是否儲存目標程式或相關資料的任何儲存區塊(步驟372),若是,則發起模組210可以由主機快取270中讀出目標程式或相關資料的儲存區塊(步驟373),接著,發起模組210可以將沒有儲存在主機快取270中之目標程式或相關資料的儲存區塊的下載請求傳送至儲存伺服器100,藉以至儲存伺服器100下載沒有儲存在主機快取270中之目標程式或相關資料的儲存區塊(步驟375)。在本實施例中,假設目標程式或相關資料分布在兩個儲存區塊中,若主機快取270中儲存其中的一個儲存區塊的內容,則發起模組210在判斷出主機快取270中儲存有一個儲存區塊後,發起模組210會由主機快取270中讀出該儲存區塊,並傳送另外一個儲存區塊的下載請求至儲存伺服器100,藉以下載另一個儲存區塊。If the local disk 230 of the service host and the storage medium 110 of the storage server 100 are all block devices, the virtual machine reads as shown in the flow of "3E". When the target program or the target program reads the related data (original data) (step 371), the virtual machine processing module 250 of the service host can download the target program or related data through the initiating module 210 of the service host, and the initiating module 210 can Determining whether the host cache or any storage block of the related data is stored in the host cache 270 (step 372), and if so, the initiating module 210 can read the storage block of the target program or related data from the host cache 270 (steps) 373), then, the initiating module 210 can transmit a download request of the storage block of the target program or related data not stored in the host cache 270 to the storage server 100, so that the download of the storage server 100 is not stored in the host. The storage block of the target program or related data in 270 is cached (step 375). In this embodiment, it is assumed that the target program or related data is distributed in two storage blocks. If the content of one of the storage blocks is stored in the host cache 270, the initiating module 210 determines the host cache 270. After storing a storage block, the initiating module 210 reads the storage block from the host cache 270 and transmits a download request of another storage block to the storage server 100 to download another storage block.

在發起模組210接收到儲存伺服器100的目標模組130所傳回之目標程式或相關資料的儲存區塊後,發起模組210可以將接收自目標模組130之儲存區塊儲存到主機快取270中(步驟376),並由主機快取270中讀出之儲存區塊與接收自目標模組130之儲存區塊組合為目標程式或相關資料(步驟377),使得虛擬機器處理模組250可以將目標程式或相關資料提供給虛擬機器執行(步驟378)。After the initiating module 210 receives the storage block of the target program or related data returned by the target module 130 of the server 100, the initiating module 210 can store the storage block received from the target module 130 to the host. The cache 270 (step 376), and the storage block read by the host cache 270 and the storage block received from the target module 130 are combined into a target program or related data (step 377), so that the virtual machine processing module Group 250 can provide the target program or related material to the virtual machine for execution (step 378).

在上述的實施例中,若儲存伺服器100還包含伺服快取150,則當服務主機的虛擬機器處理模組250透過服務主機的發起模組 210至儲存伺服器100下載目標程式或下載目標程式的相關資料時,儲存伺服器100的目標模組130可以在至儲存伺服器100的儲存媒體110中讀取被下載的目標程式或相關資料前,先判斷伺服快取150中是否儲存被下載的目標程式或相關資料,若是,則目標模組130可以直接由伺服快取150中讀取被下載的目標程式或相關資料,並傳回服務主機,若否,目標模組130才會至儲存伺服器100的儲存媒體110中讀取被下載的目標程式或相關資料。In the above embodiment, if the storage server 100 further includes a server cache 150, when the virtual machine processing module 250 of the service host passes through the initiator module of the service host. When the storage server 100 downloads the target program or downloads the related data of the target program, the target module 130 of the storage server 100 can read the downloaded target program or related data in the storage medium 110 to the storage server 100. First, it is determined whether the downloaded target program or related data is stored in the server cache 150. If yes, the target module 130 can directly read the downloaded target program or related data from the server cache 150 and transmit the downloaded target program or related data to the service host. If not, the target module 130 reads the downloaded target program or related data into the storage medium 110 of the storage server 100.

若服務主機的本地磁碟230以及儲存伺服器100的儲存媒體110都是區塊設備,則如「第3F圖」之流程所示,儲存伺服器100的目標模組130在接收到服務主機的發起模組210所傳送之目標程式或相關資料之儲存區塊的下載請求(步驟381)後,可以先判斷伺服快取150中是否儲存被下載的目標程式或相關資料的任何儲存區塊(步驟382),若是,則目標模組130可以直接由伺服快取150中讀取被下載之目標程式或相關資料的儲存區塊(步驟383),並將由伺服快取150中讀出的儲存區塊傳回服務主機(步驟386),而後,目標模組130還可以至儲存媒體110中讀取沒有儲存在伺服快取150中之目標程式或相關資料的儲存區塊,並將由儲存媒體110中讀出的儲存區塊儲存到伺服快取150中(步驟385),以及將由儲存媒體110中讀出的儲存區塊傳回服務主機(步驟386)。在本實施例中,假設目標程式或相關資料分布在兩個儲存區塊中,若伺服快取150中儲存其中的一個儲存區塊的內容,則目標模組130在判斷出伺服快取150中儲存有一個儲存區塊後,會由伺服快取150中讀出該儲存區塊,並傳送由伺服快取150中讀出之儲存區塊至服務主機,目標模組130也會至儲存媒體110 中讀取另一個儲存區塊的內容,並傳送由儲存媒體110中讀出之儲存區塊至服務主機。If the local disk 230 of the service host and the storage medium 110 of the storage server 100 are all block devices, the target module 130 of the storage server 100 receives the service host as shown in the flow of "3F". After the download request of the target block or the storage block of the related data transmitted by the module 210 is initiated (step 381), it may be determined whether the stored cache target 150 stores any stored block of the downloaded target program or related data (steps). 382), if yes, the target module 130 can directly read the stored block of the downloaded target program or related data from the servo cache 150 (step 383), and store the storage block read by the servo cache 150. After being returned to the service host (step 386), the target module 130 can also read the storage block 110 to read the storage block of the target program or related data not stored in the servo cache 150, and read by the storage medium 110. The stored storage blocks are stored in the servo cache 150 (step 385), and the storage blocks read from the storage medium 110 are transferred back to the service host (step 386). In this embodiment, it is assumed that the target program or related data is distributed in two storage blocks. If the content of one of the storage blocks is stored in the server cache 150, the target module 130 determines the servo cache 150. After storing a storage block, the storage block is read out by the servo cache 150, and the storage block read by the servo cache 150 is transmitted to the service host, and the target module 130 also goes to the storage medium 110. The content of another storage block is read, and the storage block read out from the storage medium 110 is transferred to the service host.

綜上所述,可知本發明與先前技術之間的差異在於具有主機端透過儲存區域網路在儲存伺服器中建立原生虛擬磁碟檔,並以原生虛擬磁碟檔為基礎鏡像在本地磁碟中建立差異虛擬磁碟檔,當主機端所執行之虛擬機器掛載差異虛擬磁碟檔後,虛擬機器執行目標程式時,服務主機透過儲存區域網路讀取原生虛擬磁碟檔中的原始資料,並在本地磁碟的差異虛擬磁碟檔中存取目標程式所產生的差異資料之技術手段,藉由此一技術手段可以解決先前技術所存在基礎鏡像與差異磁碟設置在同一裝置容易造成存取效能低落的問題,進而達成增加儲存伺服器之存取效能並提高儲存伺服器所支援之虛擬機器數的技術功效。In summary, it can be seen that the difference between the present invention and the prior art is that the host side establishes a native virtual disk file in the storage server through the storage area network, and mirrors the local disk based on the native virtual disk file. The difference virtual disk file is created. When the virtual machine on the host side mounts the difference virtual disk file, the virtual host executes the target program, and the service host reads the original data in the original virtual disk file through the storage area network. And the technical means for accessing the difference data generated by the target program in the difference virtual disk file of the local disk, by which a technical means can solve the problem that the base image and the differential disk set in the prior art are easily caused in the same device. The problem of low access performance, thereby achieving the technical effect of increasing the access performance of the storage server and increasing the number of virtual machines supported by the storage server.

再者,本發明之以儲存區域網路提供讀取基礎鏡像之方法,可實現於硬體、軟體或硬體與軟體之組合中,亦可在電腦系統中以集中方式實現或以不同元件散佈於若干互連之電腦系統的分散方式實現。Furthermore, the method for providing a read base image by the storage area network of the present invention can be implemented in hardware, software or a combination of hardware and software, or can be implemented in a centralized manner in a computer system or distributed by different components. Implemented in a decentralized manner with several interconnected computer systems.

雖然本發明所揭露之實施方式如上,惟所述之內容並非用以直接限定本發明之專利保護範圍。任何本發明所屬技術領域中具有通常知識者,在不脫離本發明所揭露之精神和範圍的前提下,對本發明之實施的形式上及細節上作些許之更動潤飾,均屬於本發明之專利保護範圍。本發明之專利保護範圍,仍須以所附之申請專利範圍所界定者為準。While the embodiments of the present invention have been described above, the above description is not intended to limit the scope of the invention. Any modification of the form and details of the practice of the present invention, which is a matter of ordinary skill in the art to which the present invention pertains, is a patent protection of the present invention. range. The scope of the invention is to be determined by the scope of the appended claims.

100‧‧‧儲存伺服器100‧‧‧Storage server

110‧‧‧儲存媒體110‧‧‧Storage media

111‧‧‧原生虛擬磁碟檔111‧‧‧Native virtual disk file

130‧‧‧目標模組130‧‧‧Target Module

150‧‧‧伺服快取150‧‧‧Servo cache

200‧‧‧主機端200‧‧‧Host side

210‧‧‧發起模組210‧‧‧Initiation module

230‧‧‧本地磁碟230‧‧‧Local Disk

231‧‧‧差異虛擬磁碟檔231‧‧‧Differential virtual disk file

250‧‧‧虛擬機器處理模組250‧‧‧Virtual Machine Processing Module

251‧‧‧虛擬機器251‧‧‧Virtual Machine

270‧‧‧主機快取270‧‧‧Host cache

步驟310‧‧‧主機端透過儲存區域網路掛載儲存伺服器為遠端磁碟Step 310‧‧‧ The host side mounts the storage server as a remote disk through the storage area network

步驟320‧‧‧設定主機於遠端磁碟中建立原生虛擬磁碟檔Step 320‧‧‧Set the host to create a native virtual disk file on the remote disk

步驟321a‧‧‧設定主機於本地磁碟上產生臨時虛擬磁碟檔Step 321a‧‧‧Set the host to generate a temporary virtual disk file on the local disk

步驟321b‧‧‧設定主機於本地磁碟上產生原生虛擬磁碟檔Step 321b‧‧‧Set the host to generate the native virtual disk file on the local disk

步驟322‧‧‧設定主機執行虛擬機器Step 322‧‧‧Set the host to execute the virtual machine

步驟323a‧‧‧虛擬機器掛載臨時虛擬磁碟檔Step 323a‧‧‧Virtual Machine Mount Temporary Virtual Disk File

步驟323b‧‧‧虛擬機器掛載原生虛擬磁碟檔Step 323b‧‧‧Virtual Machine Mounts Native Virtual Disk File

步驟325‧‧‧虛擬機器安裝目標程式Step 325‧‧‧Virtual Machine Installation Target Program

步驟326a‧‧‧設定主機儲存目標程式至臨時虛擬磁碟檔中Step 326a‧‧‧Set the host to store the target program to the temporary virtual disk file

步驟326b‧‧‧設定主機儲存目標程式至原生虛擬磁碟檔中Step 326b‧‧‧Set the host to store the target program to the original virtual disk file

步驟327a‧‧‧設定主機在臨時虛擬磁碟檔中建立代理程式Step 327a‧‧‧Set the host to create an agent in the temporary virtual disk file

步驟327b‧‧‧設定主機在原生虛擬磁碟檔中建立代理程式Step 327b‧‧‧Set the host to create an agent in the native virtual disk file

步驟328‧‧‧虛擬機器結束執行或卸載臨時虛擬磁碟檔Step 328‧‧‧The virtual machine ends execution or uninstalls the temporary virtual disk file

步驟329‧‧‧設定主機複製臨時虛擬磁碟檔至遠端磁碟為原生虛擬磁碟檔Step 329‧‧‧Set the host to copy the temporary virtual disk file to the remote disk for the native virtual disk file

步驟330‧‧‧服務主機以原生虛擬磁碟檔為基礎鏡像,於服務主機之本地磁碟中建立差異虛擬磁碟檔Step 330‧‧‧ The service host mirrors the original virtual disk file and creates a differential virtual disk file in the local disk of the service host

步驟340‧‧‧服務主機寫入相關資料至差異虛擬磁碟檔中Step 340‧‧‧ The service host writes the relevant data to the difference virtual disk file

步驟352‧‧‧服務主機執行與差異虛擬磁碟檔對應之虛擬機器Step 352‧‧‧ The service host executes the virtual machine corresponding to the differential virtual disk file

步驟356‧‧‧虛擬機器掛載相對應之差異虛擬磁碟檔Step 356‧‧‧Virtual machine mounts the corresponding difference virtual disk file

步驟361‧‧‧虛擬機器執行原生虛擬磁碟檔中之代理程式Step 361‧‧‧Virtual Machine Executes the Agent in the Native Virtual Disk File

步驟363‧‧‧代理程式依據相關資料設定虛擬機器及/或目標程式之初始環境Step 363‧‧‧ The agent sets the initial environment of the virtual machine and/or target program based on the relevant data

步驟370‧‧‧虛擬機器透過相對應之差異虛擬磁碟檔執行原生虛擬磁碟檔中之目標程式Step 370‧‧‧ The virtual machine executes the target program in the native virtual disk file through the corresponding difference virtual disk file

步驟371‧‧‧虛擬機器讀取目標程式Step 371‧‧‧Virtual machine read target program

步驟372‧‧‧服務主機判斷目標程式之儲存區塊是否儲存於主機快取中Step 372‧‧‧ The service host determines whether the storage block of the target program is stored in the host cache

步驟373‧‧‧服務主機由主機快取讀取儲存區塊Step 373‧‧‧ The service host reads the storage block from the host cache

步驟375‧‧‧服務主機至儲存伺服器下載未儲存於主機快取中之儲存區塊Step 375‧‧‧Service Host to Storage Server Download the storage block not stored in the host cache

步驟376‧‧‧服務主機儲存所下載之儲存區塊至主機快取中Step 376‧‧‧ The service host stores the downloaded storage block to the host cache

步驟377‧‧‧服務主機組合儲存區塊為目標程式Step 377‧‧‧ service host combination storage block is the target program

步驟378‧‧‧虛擬機器執行目標程式Step 378‧‧‧Virtual Machine Execution Target Program

步驟381‧‧‧儲存伺服器接收與目標程式之儲存區塊對應之下載請求Step 381‧‧‧ The storage server receives the download request corresponding to the storage block of the target program

步驟382‧‧‧儲存伺服器判斷目標程式之儲存區塊是否儲存在儲存伺服器之伺服快取中Step 382‧‧‧ The storage server determines whether the storage block of the target program is stored in the server cache of the storage server

步驟383‧‧‧儲存伺服器由伺服快取中讀取儲存區塊Step 383‧‧‧ Storage server reads the storage block from the servo cache

步驟384‧‧‧儲存伺服器由儲存媒體中讀取儲存區塊Step 384‧‧‧ The storage server reads the storage block from the storage medium

步驟385‧‧‧儲存伺服器儲存儲存區塊至伺服快取中Step 385‧‧‧Save the server storage storage block to the servo cache

步驟386‧‧‧儲存伺服器傳回儲存區塊Step 386‧‧‧Save the server back to the storage block

步驟392‧‧‧當虛擬機器讀取目標程式之相關資料時,服務主機由與虛擬機器對應之差異虛擬磁碟檔中讀取相關 資料Step 392‧‧‧ When the virtual machine reads the related data of the target program, the service host is read by the difference virtual disk file corresponding to the virtual machine. data

步驟396‧‧‧當目標程式存取所產生之差異資料時,服務主機至與虛擬機器對應之差異虛擬磁碟檔中存取差異資料Step 396‧‧‧ When the target program accesses the difference data generated, the service host accesses the difference data in the difference virtual disk file corresponding to the virtual machine

第1圖為本發明所提之以儲存區域網路提供讀取基礎鏡像之 伺服器元件示意圖。Figure 1 is a diagram of the present invention for providing a read base image in a storage area network. Schematic diagram of the server components.

第2圖為本發明所提之以儲存區域網路提供讀取基礎鏡像之主機端元件示意圖。FIG. 2 is a schematic diagram of a host-side component for providing a read base image in a storage area network according to the present invention.

第3A圖為本發明所提之以儲存區域網路提供讀取基礎鏡像之方法流程圖。FIG. 3A is a flow chart of a method for providing a read base image by a storage area network according to the present invention.

第3B圖為本發明所提之建立原生虛擬磁碟檔之詳細方法流程圖。FIG. 3B is a flow chart of a detailed method for establishing a native virtual disk file according to the present invention.

第3C圖為本發明所提之另一種建立原生虛擬磁碟檔之詳細方法流程圖。FIG. 3C is a flow chart showing another detailed method for establishing a native virtual disk file according to the present invention.

第3D圖為本發明所提之設定初始環境之詳細方法流程圖。Figure 3D is a flow chart of a detailed method for setting an initial environment according to the present invention.

第3E圖為本發明所提之結合主機快取下載目標程式之方法流程圖。FIG. 3E is a flow chart of a method for combining a host cache download target program according to the present invention.

第3F圖為本發明所提之結合伺服快取讀取目標程式之方法流程圖。FIG. 3F is a flow chart of a method for combining a servo cache read target program according to the present invention.

步驟310‧‧‧主機端透過儲存區域網路掛載儲存伺服器為遠端磁碟Step 310‧‧‧ The host side mounts the storage server as a remote disk through the storage area network

步驟320‧‧‧設定主機於遠端磁碟中建立原生虛擬磁碟檔Step 320‧‧‧Set the host to create a native virtual disk file on the remote disk

步驟330‧‧‧服務主機以原生虛擬磁碟檔為基礎鏡像,於服務主機之本地磁碟中建立差異虛擬磁碟檔Step 330‧‧‧ The service host mirrors the original virtual disk file and creates a differential virtual disk file in the local disk of the service host

步驟352‧‧‧服務主機執行與差異虛擬磁碟檔對應之虛擬機器Step 352‧‧‧ The service host executes the virtual machine corresponding to the differential virtual disk file

步驟356‧‧‧虛擬機器掛載相對應之差異虛擬磁碟檔Step 356‧‧‧Virtual machine mounts the corresponding difference virtual disk file

步驟370‧‧‧虛擬機器透過相對應之差異虛擬磁碟檔執行原生虛擬磁碟檔中之目標程式Step 370‧‧‧ The virtual machine executes the target program in the native virtual disk file through the corresponding difference virtual disk file

步驟392‧‧‧當虛擬機器讀取目標程式之相關資料時,服務主機由與虛擬機器對應之差異虛擬磁碟檔中讀取相關資料Step 392‧‧‧ When the virtual machine reads the related data of the target program, the service host reads the related data from the difference virtual disk file corresponding to the virtual machine.

步驟396‧‧‧當目標程式存取所產生之差異資料時,服務主機至與虛擬機器對應之差異虛擬磁碟檔中存取差異資料Step 396‧‧‧ When the target program accesses the difference data generated, the service host accesses the difference data in the difference virtual disk file corresponding to the virtual machine

Claims (10)

一種以儲存區域網路提供讀取基礎鏡像之方法,係提供執行虛擬機器之至少一主機端讀取一儲存伺服器上之基礎鏡像(Base Image),該些主機端中包含一設定主機及至少一服務主機,該方法至少包含下列步驟:各該主機端(Host)透過儲存區域網路(Storage Area Network,SAN)掛載(mount)該儲存伺服器為一遠端磁碟;該設定主機於該遠端磁碟中建立一原生虛擬磁碟(Parent Virtual Hard Disk,Parent VHD)檔;各該服務主機以該原生虛擬磁碟檔為基礎鏡像,於各該服務主機之本地磁碟中建立至少一差異虛擬磁碟(Different VHD)檔;該些服務主機至少其中之一執行與該些差異虛擬磁碟檔其中之一對應之一虛擬機器(Virtual Machine,VM);該虛擬機器掛載相對應之差異虛擬磁碟檔;該虛擬機器透過相對應之差異虛擬磁碟檔執行該原生虛擬磁碟檔中之一目標程式;當該虛擬機器讀取該目標程式之一相關資料時,各該服務主機由與該虛擬機器對應之差異虛擬磁碟檔中讀取該相關資料;及當該目標程式存取所產生之一差異資料時,各該服務主機至與該虛擬機器對應之差異虛擬磁碟檔中存取該差異資料。A method for providing a read base image by using a storage area network, wherein at least one host computer executing the virtual machine reads a base image (Base Image) on a storage server, where the host end includes a setting host and at least a service host, the method includes at least the following steps: each host (host) mounts the storage server as a remote disk through a storage area network (SAN); A remote virtual disk (Parent Virtual Hard Disk, Parent VHD) file is created in the remote disk; each service host mirrors the original virtual disk file, and at least creates a local disk in each service host. a differential virtual disk (Different VHD) file; at least one of the service hosts performs a virtual machine (VM) corresponding to one of the different virtual disk files; the virtual machine mounts correspondingly a virtual disk file; the virtual machine executes one of the target files in the native virtual disk file through the corresponding difference virtual disk file; when the virtual machine reads one of the target programs Data, each service host reads the related data from a difference virtual disk file corresponding to the virtual machine; and when the target program accesses a difference data generated, each service host to the virtual machine The difference data is accessed in the corresponding difference virtual disk file. 如申請專利範圍第1項所述之以儲存區域網路提供讀取基礎 鏡像之方法,其中該虛擬機器透過相對應之差異虛擬磁碟檔執行該原生虛擬磁碟檔中之該目標程式之步驟更包含該儲存伺服器判斷儲存該目標程式之至少一儲存區塊(block)儲存在該儲存伺服器之一伺服快取(cache)中時,由該伺服快取中讀取各該儲存區塊之步驟。The reading base is provided by the storage area network as described in item 1 of the patent application scope. The method of mirroring, wherein the step of executing, by the virtual machine, the target program in the native virtual disk file through the corresponding difference virtual disk file further comprises the storage server determining to store at least one storage block of the target program (block The step of reading each of the storage blocks from the servo cache when stored in a servo cache of one of the storage servers. 如申請專利範圍第1項所述之以儲存區域網路提供讀取基礎鏡像之方法,其中該虛擬機器透過相對應之差異虛擬磁碟檔執行該原生虛擬磁碟檔中之該目標程式之步驟,更包含各該服務主機判斷該目標程式之各儲存區塊是否儲存於各該服務主機之主機快取中,若是,則各該服務主機由該主機快取讀取各該儲存區塊,若否,則各該服務主機至該儲存伺服器下載未儲存於該主機快取中之其他儲存區塊,並儲存所下載之儲存區塊至該主機快取中之步驟。The method for reading a base image by using a storage area network as described in claim 1, wherein the virtual machine executes the target program in the native virtual disk file by using a corresponding differential virtual disk file. And each of the service hosts determines whether each storage block of the target program is stored in a host cache of each service host, and if so, each service host reads the storage blocks by the host cache, if No, each service host downloads the other storage blocks that are not stored in the host cache to the storage server, and stores the downloaded storage blocks into the host cache. 如申請專利範圍第1項所述之以儲存區域網路提供讀取基礎鏡像之方法,其中該設定主機於該遠端磁碟中建立一原生虛擬磁碟檔之步驟更包含該設定主機於該設定主機之本地磁碟上產生一臨時虛擬磁碟檔,並執行一虛擬機器,當該虛擬機器掛載該臨時虛擬磁碟檔後,該虛擬機器安裝該目標程式時,儲存該目標程式至該臨時虛擬磁碟檔中,並在該臨時虛擬磁碟檔中建立一代理程式(agent),及當該虛擬機器結束執行或卸載(unmount)該臨時虛擬磁碟檔時,複製該臨時虛擬磁碟檔至該遠端磁碟為該原生虛擬磁碟檔之步驟,或包含該設定主機於該遠端磁碟上產生該原生虛擬磁碟檔,並執行一虛擬機器,當虛擬機器掛載該虛擬磁碟檔後,該虛擬機器安 裝該目標程式時,儲存該目標程式至該原生虛擬磁碟檔中,並於該原生虛擬磁碟檔中提供建立一代理程式之步驟。The method for providing a read base image by using a storage area network according to the first aspect of the patent application, wherein the step of setting the host to create a native virtual disk file in the remote disk further includes the setting host Setting a temporary virtual disk file on the local disk of the host, and executing a virtual machine. When the virtual machine mounts the temporary virtual disk file, the virtual machine stores the target program to the target program. Copying the temporary virtual disk in the temporary virtual disk file and creating an agent in the temporary virtual disk file, and when the virtual machine finishes executing or unmounting the temporary virtual disk file The step of the remote disk being the native virtual disk file, or the setting host generates the native virtual disk file on the remote disk, and executing a virtual machine, when the virtual machine mounts the virtual disk After the disk file, the virtual machine When the target program is loaded, the target program is stored in the native virtual disk file, and a step of establishing an agent is provided in the native virtual disk file. 如申請專利範圍第1項所述之以儲存區域網路提供讀取基礎鏡像之方法,其中該方法於該些服務主機至少其中之一執行與該些差異虛擬磁碟檔其中之一對應之該虛擬機器之步驟前,更包含各該服務主機寫入該相關資料至該差異虛擬磁碟檔中之步驟,且該方法於該虛擬機器透過相對應之差異虛擬磁碟檔執行該原生虛擬磁碟檔中之該目標程式之步驟前,更包含該虛擬機器執行該原生虛擬磁碟檔中之一代理程式,使該代理程式依據該相關資料設定該虛擬機器及/或該目標程式之初始環境之步驟。The method for reading a base image by using a storage area network as described in claim 1, wherein the method performs at least one of the service hosts corresponding to one of the differential virtual disk files. Before the step of the virtual machine, the method further includes the step of writing, by the service host, the related data to the differential virtual disk file, and the method executes the native virtual disk on the virtual machine through the corresponding difference virtual disk file. Before the step of the target program in the file, the virtual machine further executes an agent in the native virtual disk file, so that the agent sets the virtual machine and/or the initial environment of the target program according to the related data. step. 一種以儲存區域網路提供讀取基礎鏡像之伺服器,係提供執行虛擬機器之至少一主機端讀取基礎鏡像,該伺服器至少包含:一儲存媒體,用以儲存一原生虛擬磁碟檔,該原生虛擬磁碟檔中包含一目標程式;及一目標模組(target),用以提供該主機端透過儲存區域網路掛載該儲存媒體為一遠端磁碟,藉以使該主機端以該原生虛擬磁碟檔為基礎鏡像建立至少一差異虛擬磁碟檔,及用以於該主機端所執行之一虛擬機器透過相對應之差異虛擬磁碟檔執行該目標程式時,傳送該目標程式至該主機端。A server for providing a read base image by using a storage area network, which provides at least one host side read base image of a virtual machine, the server at least comprising: a storage medium for storing a native virtual disk file, The target virtual disk file includes a target program; and a target module is configured to provide the host device to mount the storage medium as a remote disk through the storage area network, so that the host device The native virtual disk file establishes at least one difference virtual disk file for the base image, and transmits the target program when the virtual machine executed by the host terminal executes the target program through the corresponding difference virtual disk file To the host side. 如申請專利範圍第6項所述之以儲存區域網路提供讀取基礎鏡像之伺服器,其中該伺服器更包含一伺服快取,用以儲存包含該目標程式之至少一儲存區塊,使該目標模組於傳送該 目標程式至該主機端時,先判斷該伺服快取中是否儲存各該儲存區塊,若是,則該目標模組由該伺服快取中讀取各該儲存區塊,並傳送各該儲存區塊至該主機端。The server of the storage area network provides a server for reading a basic image, as described in claim 6, wherein the server further includes a servo cache for storing at least one storage block including the target program. The target module transmits the When the target program is to the host, it is first determined whether the storage block is stored in the servo cache, and if so, the target module reads each of the storage blocks from the servo cache, and transmits each storage area. Block to the host side. 一種以儲存區域網路提供讀取基礎鏡像之主機端,該主機端至少包含:一發起模組(initiator),用以透過儲存區域網路掛載一儲存伺服器之一儲存媒體為一遠端磁碟,該儲存媒體中儲存一原生虛擬磁碟檔,該原生虛擬磁碟檔中包含一目標程式,及用以下載該目標程式;一本地磁碟,用以儲存至少一差異虛擬磁碟檔,各該差異虛擬磁碟係以該原生虛擬磁碟檔為基礎鏡像所建立;及一虛擬機器處理模組,用以執行與各該差異虛擬磁碟檔對應之一虛擬機器,使該虛擬機器執行該目標程式,及用以於該虛擬機器讀取該目標程式之一相關資料時,由與該虛擬機器對應之差異虛擬磁碟檔中讀取該相關資料,並於該目標程式儲存所產生之一差異資料時,將該差異資料儲存至與該虛擬機器對應之差異虛擬磁碟檔中。A host computer that provides a read base image in a storage area network, the host end includes at least: an initiator to mount a storage server as a remote end through a storage area network a storage disk having a native virtual disk file, the native virtual disk file containing a target program and a program for downloading the target program, and a local disk for storing at least one difference virtual disk file Each of the differential virtual disks is created based on the native virtual disk file; and a virtual machine processing module is configured to execute a virtual machine corresponding to each of the different virtual disk files to make the virtual machine Executing the target program, and when the virtual machine reads the related material of the target program, the related data is read by the difference virtual disk file corresponding to the virtual machine, and is generated by the target program storage. When one of the differences is the data, the difference data is stored in the difference virtual disk file corresponding to the virtual machine. 如申請專利範圍第8項所述之以儲存區域網路提供讀取基礎鏡像之主機端,其中該主機端更包含一主機快取,用以儲存儲存該目標程式之至少一儲存區塊,使該發起模組下載該目標程式時,先判斷該主機快取中是否儲存各該儲存區塊,若是,則該發起模組由該主機快取中讀取各該儲存區塊,若否,則該發起模組下載未儲存於該主機快取中之其他儲存區塊,並將所下載之儲存區塊儲存至該主機快取中。The host side of the storage area network for reading the base image, wherein the host side further includes a host cache for storing at least one storage block of the target program, as described in claim 8 When the initiating module downloads the target program, it first determines whether the storage block is stored in the host cache, and if so, the initiating module reads each of the storage blocks from the host cache, and if not, The initiating module downloads other storage blocks that are not stored in the host cache, and stores the downloaded storage blocks into the host cache. 如申請專利範圍第8項所述之以儲存區域網路提供讀取基礎鏡像之主機端,其中該虛擬機器處理模組更用以在該本地磁碟上產生一臨時虛擬磁碟檔,並執行該虛擬機器,當該虛擬機器掛載該臨時虛擬磁碟檔後,安裝該目標程式時,該虛擬機器處理模組儲存該目標程式至該臨時虛擬磁碟檔中,並在該臨時虛擬磁碟檔中建立一代理程式,當該虛擬機器結束執行或卸載該虛擬磁碟檔時,該虛擬機器處理模組複製該臨時虛擬磁碟檔至該遠端磁碟為該原生虛擬磁碟檔,並將該相關資料寫入該差異虛擬磁碟檔中,使該虛擬機器於執行該目標程式前先執行該代理程式,藉以由該代理程式依據該相關資料設定該虛擬機器及/或該目標程式之初始環境,或該虛擬機器處理模組更用以在該遠端磁碟上產生該原生虛擬磁碟檔,並執行該虛擬機器,當該虛擬機器掛載該原生虛擬磁碟檔後,該虛擬機器安裝該目標程式時,該虛擬機器處理模組儲存該目標程式至該原生虛擬磁碟檔中,並在該原生虛擬磁碟檔中建立該代理程式,並將該相關資料寫入該差異虛擬磁碟檔中,使該虛擬機器於執行該目標程式前先執行該代理程式,藉以由該代理程式依據該相關資料設定該虛擬機器及/或該目標程式之初始環境。For example, in the storage area network, the storage area network provides a host side for reading the base image, wherein the virtual machine processing module is further configured to generate a temporary virtual disk file on the local disk and execute The virtual machine, when the virtual machine mounts the temporary virtual disk file, when the target program is installed, the virtual machine processing module stores the target program into the temporary virtual disk file, and on the temporary virtual disk Establishing an agent in the file, when the virtual machine finishes executing or uninstalling the virtual disk file, the virtual machine processing module copies the temporary virtual disk file to the remote disk as the native virtual disk file, and Writing the relevant information into the differential virtual disk file, so that the virtual machine executes the agent program before executing the target program, so that the agent sets the virtual machine and/or the target program according to the related data. The initial environment, or the virtual machine processing module is further configured to generate the native virtual disk file on the remote disk, and execute the virtual machine, when the virtual machine mounts the virtual virtual After the virtual disk machine installs the target program, the virtual machine processing module stores the target program into the native virtual disk file, and creates the agent in the native virtual disk file, and the The related information is written into the difference virtual disk file, so that the virtual machine executes the agent program before executing the target program, so that the agent sets the virtual machine and/or the initial environment of the target program according to the related data. .
TW101138401A 2012-10-18 2012-10-18 Server, host and method for reading base image through storage area network TWI460584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101138401A TWI460584B (en) 2012-10-18 2012-10-18 Server, host and method for reading base image through storage area network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101138401A TWI460584B (en) 2012-10-18 2012-10-18 Server, host and method for reading base image through storage area network

Publications (2)

Publication Number Publication Date
TW201416850A TW201416850A (en) 2014-05-01
TWI460584B true TWI460584B (en) 2014-11-11

Family

ID=51293807

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101138401A TWI460584B (en) 2012-10-18 2012-10-18 Server, host and method for reading base image through storage area network

Country Status (1)

Country Link
TW (1) TWI460584B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300076A1 (en) * 2008-05-30 2009-12-03 Novell, Inc. System and method for inspecting a virtual appliance runtime environment
US20110231844A1 (en) * 2008-01-31 2011-09-22 Israel Zvi Ben-Shaul Desktop delivery for a distributed enterprise
TW201214282A (en) * 2010-09-27 2012-04-01 Ibm Method and system for running virtual machine image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110231844A1 (en) * 2008-01-31 2011-09-22 Israel Zvi Ben-Shaul Desktop delivery for a distributed enterprise
US20090300076A1 (en) * 2008-05-30 2009-12-03 Novell, Inc. System and method for inspecting a virtual appliance runtime environment
TW201214282A (en) * 2010-09-27 2012-04-01 Ibm Method and system for running virtual machine image

Also Published As

Publication number Publication date
TW201416850A (en) 2014-05-01

Similar Documents

Publication Publication Date Title
US9697130B2 (en) Systems and methods for storage service automation
JP5496254B2 (en) Converting a machine to a virtual machine
US9613039B2 (en) File system snapshot data management in a multi-tier storage environment
JP3641183B2 (en) Method and system for providing instantaneous backup in a RAID data storage system
US8966188B1 (en) RAM utilization in a virtual environment
US9058123B2 (en) Systems, methods, and interfaces for adaptive persistence
US8639876B2 (en) Extent allocation in thinly provisioned storage environment
US20230229637A1 (en) Intelligent file system with transparent storage tiering
US20110078682A1 (en) Providing Object-Level Input/Output Requests Between Virtual Machines To Access A Storage Subsystem
US8812677B2 (en) Data processing method and apparatus for remote storage system
US8578064B2 (en) Interception and management of I/O operations on portable storage devices
WO2019061352A1 (en) Data loading method and device
JP2007334878A (en) Long-term data archiving system and method
US20110145496A1 (en) Trace-assisted startup optimization from a virtual disk
JP4278452B2 (en) Computer system
CN101546252A (en) Storage apparatus and control method for same
CN110806911B (en) Cloud desktop management and control method, device and system
US20140082275A1 (en) Server, host and method for reading base image through storage area network
US8769196B1 (en) Configuring I/O cache
US8356140B2 (en) Methods and apparatus for controlling data between storage systems providing different storage functions
TWI460584B (en) Server, host and method for reading base image through storage area network
US20180316758A1 (en) Method and apparatus for logical mirroring to a multi-tier target node
EP3591531B1 (en) Instant restore and instant access of hyper-v vms and applications running inside vms using data domain boostfs
Carlson A different approach to solid state storage in the cloud
JP2013228827A (en) Computer system and installation method

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees