The present application claims priority to Chinese Patent Application Ser. No. 201310064426.9, filed Feb. 28, 2013, which is herein incorporated by reference.
The present invention relates to virtual appliances, and more particularly, the present invention relates to a method and apparatus for providing a virtual appliance.
With the development of virtual technology, a virtual machine is able to provide various applications and services, like a true, stand-alone computer. On this basis, one or more virtual machines may be packaged together to provide a pre-built software environment, thus forming a virtual appliance. For instance, in one example, three virtual machines: VM1, VM2 and VM3, may be used to build a virtual appliance, wherein the three virtual machines are installed with different software programs to perform different functions, respectively. For example, virtual machine VM1 may be used to perform a variety of applications, VM2 may be used to provide a database, and VM3 may be used as a proxy server. These “dedicated” virtual machines are packaged together to provide a complete operating environment collectively, thereby forming a virtual appliance. In this example, the multiple virtual machines forming the virtual appliance are maintained, updated, and managed collectively as a unit.
To form a desired virtual appliance, there are a variety of standards and approaches for packaging virtual machines that appear in the prior art. Open Virtualization Format (OVF) is a standard in common use currently, for packaging and distributing virtual appliances. With the OVF standard, virtual appliances may be installed and deployed across platforms simply and flexibly. According to the OVF standard, multiple virtual machines are packaged into one OVF package. Typically, an OVF package comprises an OVF descriptor with suffix .ovf, and further optionally comprises a manifest with suffix .mf and a certificate with suffix .cert. The OVF descriptor is used to describe configuration information of each virtual machine included in the OVF package. In addition, the OVF package also generally includes disk image files of respective virtual machines forming the virtual appliance. These files store data in virtual disks in the form of images. Accordingly, a disk image file usually has a large size, often about hundreds of Gigabytes (GB) or more.
According to user demands for various virtual appliances, many data centers are configured to provide virtual appliances, such as in an OVF form, to users according to user needs. In particular, in a cloud computing environment, especially in an Infrastructure as a Service (IaaS) mode, a cloud data center may provide virtual machines and virtual appliances to diverse users. However, as mentioned before, an image file involved in a virtual appliance often reaches hundreds of GB in size, and therefore, it often takes a long time to read such a file and transfer it over the network to a user terminal. For example, today's cloud data centers usually need to take tens of minutes to provide a single virtual machine. On the other hand, many cloud data centers use centralized servers to store and distribute virtual machine related data. Such centralized servers have limited network interfaces, which becomes a bottleneck for processing a large number of network requests. Therefore, in a case where a large population of users request access to or to obtain virtual appliances at the same time, the performance of cloud data centers providing virtual appliances will be further reduced.
Therefore it is desired to improve the existing solutions to improve the performance of the provisioning of virtual appliances.
According to one embodiment, a method for providing a virtual appliance is provided. The method comprises obtaining metadata of a specific virtual appliance based on a received request for obtaining the specific virtual appliance, the metadata describing information about virtual machines involved in the specific virtual appliance, determining an association relationship between the specific virtual appliance and at least one other virtual appliance according to the metadata, and providing resource, information for obtaining the specific virtual appliance according to the association relationship, the resource information including a plurality of resource addresses, at least one of the plurality of resource addresses pointing to a storage location of the at least one other virtual appliance.
According to another embodiment, an apparatus for providing a virtual appliance is provided. The apparatus comprises a metadata obtaining unit configured to obtain metadata of a specific virtual appliance based on a received request for obtaining the specific virtual appliance, the metadata describing information about virtual machines involved in the specific virtual appliance, an association relationship determining unit configured to determine an association relationship between the specific virtual appliance and at least one other virtual appliance according to the metadata, and a resource information providing, unit configured to provide resource information for obtaining the specific virtual appliance according to the association relationship, the resource information including a plurality of resource addresses, at least one of the plurality of resource addresses pointing to a storage location of the at least one other virtual appliance.
Other aspects and embodiments of the present invention will become apparent from the following detailed description, which, when taken in conjunction with the drawings, illustrate by way of example the principles of the invention.
Through the more detailed description of some embodiments of the present disclosure in the accompanying drawings, the above and other objects, features, and advantages of the present disclosure will become more apparent, wherein the same reference generally refers to the same components in the embodiments of the present disclosure.
The following description is made for the purpose of illustrating the general principles of the present invention and is not meant to limit the inventive concepts claimed herein. Further, particular features described herein may be used in combination with other described features in each of the various possible combinations and permutations.
Unless otherwise specifically defined herein, all terms are to be given their broadest possible interpretation including meanings implied from the specification as well as meanings understood by those skilled in the art and/or as defined in dictionaries, treatises, etc.
It must also be noted that, as used in the specification and the appended claims, the singular forms “a,” “an” and “the” include plural referents unless otherwise specified.
Considering the problems described previously, it is proposed to improve the provision of a virtual appliance to improve efficiency according to various embodiments described herein.
According, to one general embodiment, a method for providing a virtual appliance is provided. The method comprises obtaining metadata of a specific virtual appliance based on a received request for obtaining, the specific virtual appliance, the metadata describing information about virtual machines involved in the specific virtual appliance, determining an association relationship between the specific virtual appliance and at least one other virtual appliance according to the metadata, and providing resource information for obtaining the specific virtual appliance according to the association relationship, the resource information including a plurality of resource addresses, at least one of the plurality of resource addresses pointing to a storage location of the at least one other virtual appliance.
According to another general embodiment, an apparatus for providing a virtual appliance is provided. The apparatus comprises a metadata obtaining unit configured to obtain metadata of a specific virtual appliance based on a received request for obtaining the specific virtual appliance, the metadata describing information about virtual machines involved in the specific virtual appliance, an association relationship determining unit configured to determine an association relationship between the specific virtual appliance and at least one other virtual appliance according to the metadata, and a resource information providing unit configured to provide resource information for obtaining the specific virtual appliance according to the association relationship, the resource information including a plurality of resource addresses, at least one of the plurality of resource addresses pointing to a storage location of the at least one other virtual appliance.
With the method and apparatus according to various embodiments, more resource options may be provided to a user when the user requests a cloud data center to obtain a virtual appliance, thereby improving the efficiency of the user obtaining the virtual appliance and reducing network transmission pressure on the cloud data center.
Some preferable embodiments will be described in more detail with reference to the accompanying drawings, in which preferable embodiments of the present disclosure have been illustrated. However, the present disclosure may be implemented in various manners, and thus should not be construed to be limited to the embodiments disclosed herein. On the contrary, those embodiments are provided for the thorough and complete understanding of the present disclosure, and completely conveying the scope of the present disclosure to those skilled in the art.
It is understood in advance that although this disclosure includes a detailed description on cloud computing, implementation of the teachings recited herein are not limited to a cloud computing environment. Rather, embodiments are capable of being implemented in conjunction with any other type of computing environment now known or later developed.
Cloud computing is a model of service delivery for enabling convenient, on demand network access to a shared pool of configurable computing resources (e.g. networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that may be rapidly provisioned and released with minimal management effort or interaction with a provider of the service. This cloud model may include at least five characteristics, at least three service models, and at least four deployment models.
Characteristics are as follows:
Service Models are as follows:
Deployment Models are as follows:
A cloud computing environment is service oriented with a focus on statelessness, low coupling, modularity, and semantic interoperability. At the heart of cloud computing is an infrastructure comprising a network of interconnected nodes.
Referring now to
In cloud computing node 10 there is a computer system/server 12, which is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and/or configurations that may be suitable for use with computer system/server 12 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, a distributed cloud computing environments that include any of the above systems or devices, and the like.
Computer system/server 12 may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, and so on that perform particular tasks or implement particular abstract data types. Computer system/server 12 may be practiced in distributed cloud computing, environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed, cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
As shown in
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer system/server 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server 12, and it includes both volatile and non-volatile media, removable and non-removable media.
System memory 28 may include computer system readable media in the from of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32. Computer system/server 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only storage system 34 may be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a “hard drive”). Although not shown, a magnetic disk drive for reading from and writing to a removable, non-volatile magnetic disk (e.g., a “floppy disk”), and an optical disk drive for reading from or writing to a removable, non-volatile optical disk such as a CD-ROM, DVD-ROM or other optical media may be provided. In such instances, each may be connected to bus 18 by one or more data media interfaces. As will be further depicted and described below, memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments.
Program/utility 40, having a set (at least one) of program modules 42, may be stored in memory 28 by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data or some combination thereof, may include an implementation of a networking environment. Program modules 42 generally carry out the functions and/or methodologies of embodiments as described herein.
Computer system/server 12 may also communicate with one or more external devices 14 such as a keyboard, a pointing device, a display 24, etc.; one or more devices that enable a user to interact with computer system/server 12; and/or any devices (e.g., network card, modem, etc.) that enable computer system/server 12 to communicate with one or more other computing devices. Such communication may occur via Input/Output (I/O) interfaces 22. Still yet, computer system/server 12 may communicate with one or more networks such as a local area network (LAN), a general wide area network (WAN), and/or a public network (e.g., the Internet) via network adapter 20. As depicted, network adapter 20 communicates with the other components of computer system/server 12 via bus 18. It should be understood that although not shown, other hardware and/or software components could be used in conjunction with computer system/server 12. Examples include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
Referring now to
Referring now to
Hardware and software layer 60 includes hardware and software components. Examples of hardware components include mainframes, in one example IBM® zSeries® systems; RISC (Reduced Instruction Set Computer) architecture based servers, in one example IBM pSeries® systems; IBM xSeries® systems; IBM BladeCenter® systems; storage devices; networks and networking components. Examples of software components include network application server software, in one example IBM WebSphere® application server software; and database software, in one example IBM DB2® database software. (IBM, zSeries, pSeries, xSeries, BladeCenter, WebSphere, and DB2 are trademarks of International Business Machines Corporation registered in many jurisdictions worldwide).
Virtualization layer 62 provides an abstraction layer from which the following examples of virtual, entities may be provided: virtual servers; virtual storage; virtual networks, including virtual private networks; virtual applications and operating systems; and virtual clients.
In one example, management layer 64 may provide the functions described below. Resource provisioning provides dynamic procurement Of computing resources and other resources that are utilized to perform tasks within the cloud computing environment. Metering and Pricing provide cost tracking as resources are utilized within the cloud computing environment, and billing or invoicing for consumption of these resources. In one example, these resources may comprise application software licenses. Security provides identity verification for cloud consumers and tasks, as well as protection for data and other resources. User portal provides access to the cloud computing environment for consumers and system administrators. Service level management provides cloud computing resource allocation and management such that required service levels are met. Service Level Agreement (SLA) planning and fulfillment provide pre-arrangement for, and procurement of cloud computing resources for which a future requirement is anticipated in accordance with an SLA.
Workloads layer 66 provides examples of functionality for which the cloud computing environment may be utilized. Examples of workloads and functions which may be provided, from this layer include: mapping and navigation; software development and lifecycle management; virtual classroom education delivery; data analytics processing; transaction processing; and provision of virtual appliances.
The embodiments will be described below. In one embodiment, in order to provide a virtual appliance to a user, metadata corresponding to the virtual appliance is analyzed first the metadata describing information of virtual machines involved in the virtual appliance. Through the analysis of such metadata, an association relationship or “dependency” relationship between the virtual appliance and other virtual appliances may be determined, which shows whether different virtual appliances share the same or similar virtual machine therebetween. Based on such association relationship, a plurality of resource addresses may be returned to a user when the user requests to obtain this virtual appliance, such resource addresses including not only a resource address pointing to a storage location of this virtual appliance in a cloud data center, but also resource addresses pointing to other virtual appliances associated with this virtual appliance. Thus, the user may selectively obtain a desired virtual appliance through the resource addresses pointing to the other virtual appliances, thereby improving downloading speed and reducing transmission pressure of the cloud data center.
First, in step 402, based on a received request for obtaining a specific virtual appliance, metadata for describing the virtual appliance is obtained. More specifically, step 402 includes, first, determining the specific virtual appliance to be obtained based on the received request, and then, obtaining corresponding metadata based on the determined virtual appliance.
In general, the user request comprises a unique identifier of the specific virtual appliance to be obtained. Based on the identifier, the cloud data center may determine the specific virtual appliance. In one embodiment, the user may also specify one or more virtual machines and request the data center to package them into the specific virtual appliance. In this case, per the request from the user, the cloud data center may package the specified virtual machine(s) to form the desired virtual appliance. The virtual appliance formed is just the specific virtual appliance to be obtained.
In one embodiment in order to accelerate the transmission of image files in the virtual appliance, it is desired to adopt a peer-to-peer (P2P) transmission manner. The P2P transmission manner has been known to those skilled in the art. For P2P transmission, the user needs to firstly obtain torrent seed file, which comprises server information and target file information. Specifically, the server information specifies the address of a server and settings of the server. However, the server is only responsible for providing information of available download sources of the target file, and does not necessarily store the target file. The target file information is a file generated by the server by dividing the target file into blocks virtually and encoding each block specifically. Once the user is connected to the server through the seed file, the server recognizes the target file involved in the seed file, and returns information of available download sources of the target file to the user. The user may then obtain the target file from the available download sources. In the case of providing a virtual appliance by the cloud data center, the cloud data center may act as the server of the P2P transmission. Accordingly, in one embodiment, the user may use the torrent seed file to request for obtaining the specific virtual appliance. In response to such request issued by using the torrent file, in step 402, the specific virtual appliance to be obtained may be determined through analysis of target file information in the torrent file.
On the basis of determining the specific virtual appliance to be obtained, metadata corresponding to the specific virtual appliance may be obtained. In general, a virtual appliance is formed by compressing and packaging one or more virtual machines, and accordingly, a virtual appliance may correspond to a compressed package or a data packet formed by packaging, which contains disk image files of packaged virtual machines. In one embodiment, the metadata of the virtual appliance may be embodied as attribute information of the compressed package or data packet. In another embodiment, the above data packet directly comprises a descriptor file describing each virtual machine. Such descriptor file may be used as metadata of the corresponding virtual appliance. Therefore, the process of obtaining metadata of the specific virtual appliance may comprise extracting the descriptor file describing the involved virtual machines from the packaged data packet corresponding to the specific virtual appliance and using the descriptor file as metadata of the specific virtual appliance.
In one embodiment, the specific virtual appliance is formed by packaging the virtual machine using the OVF standard, and therefore corresponds to an OVF package stored in the cloud data center. As mentioned before, the OVF package comprises an OVF descriptor for describing configuration information of respective virtual machines involved in the virtual appliance. Therefore, the OVF descriptor may act as metadata of the specific virtual appliance. Accordingly, in step 402, the metadata of the specific virtual appliance may be obtained by extracting the OVF descriptor from the corresponding OVF package.
In another embodiment, the specific virtual appliance uses other standards for packaging, thereby corresponding to data packets of different formats. In this case, similarly, descriptor files of different formats may be extracted with respect to the formats of the data packets as metadata of the virtual appliance.
On the basis of metadata of the specific virtual appliance requested by the user, in step 404, according, to the metadata above, the association relationship between the specific virtual appliance and at least one other virtual appliance is determined, the association relationship being intended to show sharing relation of the same or similar virtual machine between the specific virtual appliance and other virtual appliances.
In a specific example, metadata of the specific virtual appliance is an OVF descriptor. As know to those skilled in the art, the OVF descriptor comprises a plurality of sections, describing disk information, network configuration information, software information, etc. respectively.
Then, in step 442, the virtual machine information obtained in step 441 is compared to virtual machine information corresponding to at least one other virtual appliance. It may be appreciated that, for other virtual appliances, corresponding metadata thereof may be obtained similarly, and then the virtual machine information involved may be obtained from the metadata. Thus, the virtual machine information corresponding to the specific virtual appliance may be compared to the virtual machine information corresponding to other virtual appliances. Since virtual machine. information may comprise a plurality of items, the above comparison comprises comparing contents of respective items contained in the virtual machine information one by one.
Further, in step 443, in response to virtual machine information of a certain virtual machine in the specific virtual appliance being identical with virtual machine information of a corresponding virtual machine in the at least one other virtual appliance, the association relationship is determined as the specific virtual appliance and the at least one other virtual appliance sharing the above certain virtual machine.
In one embodiment, if each item in virtual machine information of two virtual machines is the same correspondingly, then it is considered that the virtual machine information is the same. In another embodiment, a proportion may be predetermined, and if there are a predetermined proportion of items in the virtual machine information of two virtual mach les being the same, it is considered that the virtual machine information is the same. In step 443, any of the above criteria may be used to determine whether the virtual machine information is the same. In the case that virtual machine information of a certain virtual machine in the specific virtual appliance is determined as the same as virtual machine information of a corresponding virtual machine in another virtual appliance, in one embodiment, the two virtual machines may be considered the same; accordingly, it is considered that the specific virtual appliance and the another virtual appliance share the certain virtual machine.
In one embodiment, the description about virtual machine in metadata further additionally includes customization information, which indicates settings by users to specific applications of a virtual machine. In one embodiment, for example in the case of OVF descriptor, the customization information is recorded in the form of a script. The OVF descriptor introduces customization information through script reference. If virtual machines VM1 and VM2 have the same virtual machine information, but VM2 additionally comprises customization information, VM2 may be obtained by applying customization information of VM2 on the basis of obtaining image of VM1. In such case, if the virtual machine information of two virtual machines is the same but the customization information is different, it may be considered that the two virtual machines are similar virtual machines. Accordingly, in one embodiment, on the basis of step 443, additionally, in response to the virtual machine information of the certain virtual machine being the same as the virtual machine information of the corresponding virtual machine while the customization information being different, the association relationship is determined as the specific virtual appliance arid the at least one other virtual appliance partially sharing the certain virtual machine hereinabove.
In one embodiment, the association relationship comprises a direct association relationship between the specific virtual appliance and the at least one other virtual appliance. In one embodiment, the association relationship further comprises an indirect association relationship between the specific the specific virtual appliance and at least one other virtual appliance. In an example, the specific virtual appliance and virtual appliance 1 share several virtual machines, and hence have a direct association relationship. At the same time, the virtual appliance 1 and another virtual appliance 2 also have an association relationship of virtual machine sharing. Then, it may be considered that the specific virtual appliance and the virtual appliance 2 have an indirect association relationship by means of the intermediate virtual appliance 1.
The above association relationship may be recorded in a variety of forms in one embodiment, the association relationship is recorded in the form of a list including identifiers of other virtual appliances associated with the specific virtual appliance. In another embodiment, the association relationship is recorded in the form of a topological graph. Such graphic recording manner is especially suitable for simultaneously recording direct and indirect association relationships between various virtual appliances.
In one embodiment, the association relationship further comprises information about degree of association between the specific virtual appliance and at least one other virtual appliance. The degree of association depends on the following factors: number of virtual machines shared by the specific virtual appliance and other virtual appliances, the degree of sharing (complete sharing or partial sharing), type of association (direct association or indirect association), etc. The degree of association may be quantified based on the above factors.
In one embodiment, in response to the request in step 402, the steps 441-443 above are executed in real time, so as to determine the association relationship between the specific virtual appliance and other virtual appliances. In another embodiment, based on metadata of respective virtual appliances, a record of association relationship between respective virtual appliances is pre-calculated and maintained. It may be appreciated that, by taking respective virtual appliances in the cloud data center as the “specific virtual appliance” and thus executing the above steps 441-443, association relationships among various virtual appliances may be calculated, thereby forming the record of association relationship. When information of the virtual appliances changes, the above association relationships may be updated, thereby maintaining the record of association relationship. In such case, in step 404, information related with the specific virtual appliance may be read from the pre-calculated and maintained record of association relationship, thereby determining the association relationship between the specific virtual appliance and other virtual appliances.
On the basis of determining the association relationship between the specific virtual appliance and other virtual appliances, in step 406, according to the association relationship, resource information for obtaining the specific virtual appliance is provided, including resource addresses pointing to other virtual appliances.
Then, in step 462, a plurality of resource addresses are generated, wherein at least one resource address points to the storage location of the at least one other virtual appliance. Specifically, in one embodiment, the plurality of resource addresses generated include at least one resource address pointing to the storage location of the specific virtual appliance, and at least one resource address pointing to the storage location of the at least one other virtual appliance. According to one embodiment, the resource addresses are provided in the form of http URL links.
As mentioned before, in one embodiment, the storage location is a storage location in the cloud data center. Based on such storage location, a resource address pointing to the storage location in the cloud data center may he generated. Since the storage locations of respective virtual appliances in the cloud data center are fixed, then in one embodiment, correspondence relationships between various virtual appliances and respective resource addresses pointing to their storage locations may be pre-maintained. In step 462, the resource address pointing to the specific virtual appliance and the resource address pointing to the at least one other virtual appliance may be generated according to the pre-maintained correspondence relationship.
In one embodiment, the storage locations further comprise storage locations of the specific virtual appliance and the at least one other virtual appliance in user devices of other users. At the time, in step 462, resource addresses pointing to the user devices of other users are generated. In one example, such resource addresses may comprise IP addresses, ports, access paths and the like of the user devices of other users.
Then, in step 463, resource information is provided based on the plurality of resource addresses. In one embodiment, the plurality of resource addresses generated in step 462 is directly provided as resource information. In another embodiment, the plurality of resource addresses generated in step 462 is ordered. The ordering may be performed according to one or more of the following criteria: degree of association between a virtual appliance related to the resource address and the specific virtual appliance, average access speed of a download source to which the resource address points, real-time access speed and the like. Thus, a plurality of resource addresses ordered is provided in resource information.
In one embodiment, the resource information also includes annotation information provided for at least a portion of the plurality of resource addresses. Such annotation information may further complementarily describe the resource addresses, for example, by specifying data portion (such as, which virtual machine) shared by the virtual appliance related to the resource address and the specific virtual appliance to he obtained, whether the sharing type is complete or partial sharing, and the like. Thus, the annotation information may help users in obtaining the required data portions accurately via the resource addresses.
Since resource information returned to the user provides a plurality of optional resource addresses for the user, the user may obtain the desired specific virtual appliance via these resource addresses selectively. In particular, when the resource address directly pointing to the storage location of the specific virtual appliance in the cloud data center is unavailable or the download speed is not ideal, part of virtual machine data of the specific virtual appliance may be obtained indirectly via resource addresses pointing to other virtual appliances associated. More specifically, in the P2P transmission manner, the user may also download and obtain from other users data of the specific virtual appliance and other virtual appliances associated thereto, thereby further increasing speed and. efficiency of data obtaining. It may be appreciated that, in such case, the user will obtain data pieces of the specific virtual appliance from different resource addresses. As mentioned before, torrent file provided directed to the P2P transmission comprises target file information, which is a file generated by dividing the target file into a plurality of blocks and encoding the respective blocks. Here, Hash encoding is most commonly used. The Hash encoding is to encode inputted file contents into specific numbers using Hash function. By performing the same hash encoding on the downloaded file contents and comparing them with corresponding specific numbers stored in the torrent file, it may be determined whether the downloaded file contents are correct and complete. Therefore, in a case where the user obtains different data pieces of the specific virtual appliance from a plurality of different resource addresses respectively, the torrent file may be used to guarantee completeness and correctness of the data pieces from different resource addresses.
Thus, in addition to obtaining data of virtual appliance VA1806 from S1804 storing VA1806 directly, user A 802 may further obtain data of virtual machines VM1808 and VM2810 from S2822 storing VA2814 based on Add2828, and obtain data of virtual machine VM3818 for virtual machine 820) from S3824 storing VA3816 based on Add3830, thereby obtaining, all virtual machine data requested by VA1806. In a case where VA1806 partially shares a certain virtual machine with another virtual appliance, the user may obtain the desired virtual machine according to annotation information of the resource address and further applying customization information on the basis of the virtual machine downloaded. When P2P transmission is supported, user A 802 may also further obtain data of VA1806, VA2814, and VA3816 from user devices of other users having already downloaded or currently downloading VA1806, VA2814, and VA3816, respectively, thereby obtaining all data of the required specific virtual appliance VA1806. These download paths are shown by dotted lines.
As compared to the way of directly downloading VA1806 only from the cloud data center 800 in the prior art, the example of
Based on the same inventive concept, another embodiment also presents an apparatus for providing a virtual appliance.
In one embodiment, the metadata obtaining unit 92 may be configured to determine the specific virtual, appliance to be obtained based on the received request and obtain corresponding metadata based on the determined virtual appliance.
Further, according to one embodiment, the request for obtaining the specific virtual appliance may be issued by using a seed the in the P2P transmision; accordingly, the metadata obtaining unit 92 may be configured to determine the specific virtual appliance to be obtained through the analysis on target file information in the seed file.
According to one embodiment, the metadata obtaining unit 92 may be further configured to extract a descriptor file for describing virtual machines involved from a packaged data packet corresponding to the specific virtual appliance, and take the descriptor file as metadata of the specific virtual appliance.
In one embodiment, the association relationship determining unit 94 may include (not shown): a virtual machine information obtaining module configured to obtain virtual machine information of respective virtual machines involved in the specific virtual appliance from the metadata; a virtual machine information comparing module configured to compare the obtained virtual machine information of respective virtual machines involved in the specific virtual appliance to virtual machine information corresponding to at least one other virtual appliance; and a determining module configured to determine, in response to virtual machine information of a certain virtual machine in the specific virtual appliance being the same as virtual machine information of corresponding virtual machine in the at least one other virtual appliance, the association relationship as that the specific virtual appliance and the at least one other virtual appliance share the certain virtual machine.
According to one embodiment, the determining module may be further configured to, in response to virtual machine information of the certain virtual machine being the same as virtual machine information of the corresponding virtual machine but their customization information being different, determine the association relationship as that the specific virtual appliance and the at least one other virtual appliance share the certain virtual machine partially.
In one embodiment, the association relationship determining unit 94 may be configured to read information related with the specific virtual appliance from a pre-calculated and maintained association relationship record, thereby determining the association relationship between the specific virtual appliance and the at least one other virtual appliance.
In one embodiment, the resource information providing unit 96 may include (not shown): a storage location determining module configured to determine storage locations of the specific virtual appliance and the at least one other virtual appliance associated thereto according to the association relationship; a resource address generating module configured to generate a plurality of resource addresses, at least one of which points to a storage location of the at least one other virtual appliance; and a providing module configured to provide resource information based on the plurality of resource addresses.
According to one embodiment, the storage locations may comprise storage locations of the specific virtual appliance and the at least one other virtual appliance in a user device of other users.
According to another embodiment, the providing module may be configured to order the plurality of resource addresses generated; and provide the ordered plurality of resource addresses in resource information.
According to one embodiment, the resource information may further comprise annotation information provided for at least pan of the plurality of resource addresses, the annotation information comprising at least one of: data portion shared and sharing type.
In another embodiment, the apparatus 900 may be included in a cloud data center. In another embodiment, the apparatus 900 may be embodied as an independent tool in communication with a cloud data center, thus assisting the cloud data center in providing the virtual appliance to the user.
The specific way of implementing the apparatus 900 for providing a virtual appliance may be obtained by referring to the description of the method of
With the method and apparatus of the embodiments described herein, when a user requests a cloud data center for obtaining a virtual appliance, more resource options may be provided, to the user, thereby improving the efficiency of the user obtaining the virtual appliance and reducing network transmission pressure on the cloud data center.
The descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Number | Date | Country | Kind |
---|---|---|---|
201310064426.9 | Feb 2013 | CN | national |