Computer implementations, computer systems, and computer programs for managing virtual disks.
Patent Information
- Application Number
- JP2024521192
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-11-04
- Filing Date
- 2022-11-01
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-11-01
Smart Images

Figure 0007913827000001 
Figure 0007913827000002 
Figure 0007913827000003
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to improvements in computer systems, and more specifically relates to methods, apparatuses, computer systems, and computer program products for managing virtual storage for virtual machines. Background Art
[0002] A hypervisor can create and operate virtual machines. Through the use of a hypervisor, a host computer can support multiple guest virtual machines by virtually sharing resources such as memory, storage, and processors. For example, a hypervisor can use a disk image file to provide a guest virtual machine with access to a hard disk on the host computer. This disk image file is also referred to as a virtual disk image file.
[0003] In a guest virtual machine, a virtual disk is a file on the host computer that appears as a physical disk drive to the guest operating system. The hypervisor can attach and detach virtual disks to and from guest virtual machines. When a physical storage device is removed, the hypervisor can unmount the disk image. In a similar manner, when physical storage is resized, the virtual disk can be resized, or other operations such as creation or deletion of a virtual disk can occur. Summary of the Invention
[0004] According to one exemplary embodiment, a computer implementation method manages virtual disks. Multiple processor units detect the attachment of storage to a host operating system. The multiple processor units mount the storage to a set of mount points. The multiple processor units create a set of virtual disks and assign the set of virtual disks to a guest in an operation in which instructions for the operation are performed without interruption. According to another exemplary embodiment, a computer system and computer program product for managing virtual disks are provided. [Brief explanation of the drawing]
[0005] [Figure 1] This figure shows a cloud computing environment in which exemplary embodiments may be implemented.
[0006] [Figure 2] This figure shows an abstraction model layer according to an exemplary embodiment.
[0007] [Figure 3] This is a diagrammatic representation of a network of a data processing system in which exemplary embodiments may be implemented.
[0008] [Figure 4] This is a block diagram of a virtual disk management environment according to an exemplary embodiment.
[0009] [Figure 5] This is a message flow diagram illustrating the attachment of a virtual disk to a guest operating system according to an exemplary embodiment.
[0010] [Figure 6] This is a message flow diagram illustrating the removal of a virtual disk from a guest operating system according to an exemplary embodiment.
[0011] [Figure 7] FIG. 1 is a message flow diagram of resizing a virtual disk for a guest operating system according to an exemplary embodiment.
[0012] [Figure 8] FIG. 2 is a flowchart of a process for managing a virtual disk according to an exemplary embodiment.
[0013] [Figure 9] FIG. 3 is a flowchart of a process for managing a virtual disk according to an exemplary embodiment.
[0014] [Figure 10] FIG. 4 is a flowchart of a process for mounting storage according to an exemplary embodiment.
[0015] [Figure 11] FIG. 5 is a flowchart of a process for creating and allocating a virtual disk in an atomic operation according to an exemplary embodiment.
[0016] [Figure 12] FIG. 6 is a flowchart of a process for managing a virtual disk according to an exemplary embodiment.
[0017] [Figure 13] FIG. 7 is a flowchart of a process for managing a virtual disk according to an exemplary embodiment.
[0018] [Figure 14] FIG. 8 is a flowchart of a process for managing a virtual disk according to an exemplary embodiment.
[0019] [Figure 15] FIG. 9 is a flowchart of a process for managing a virtual disk according to an exemplary embodiment.
[0020] [Figure 16] FIG. 1 is a block diagram of a data processing system according to an exemplary embodiment. DETAILED DESCRIPTION OF EMBODIMENTS
[0021] The present invention may be a system, a method, and / or a computer program product integrated at any possible level of technical detail. The computer program product may include a computer-readable storage medium (or multiple computer-readable storage media) having computer-readable program instructions for causing a processor to carry out aspects of the present invention.
[0022] A computer-readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. The computer-readable storage medium may be, but is not limited to, for example, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer-readable storage medium includes: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disks (DVD), memory sticks, floppy disks, punched cards, mechanically encoded devices such as raised structures in grooves for recording instructions, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium should not be construed as a transitory signal per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted through a wire.
[0023] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to each computing / processing device, or to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical transmission fibers, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface within each computing / processing device receives computer-readable program instructions from the network and transfers them for storage on a computer-readable storage medium within the respective computing / processing device.
[0024] The computer-readable program instructions for performing the operation of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for integrated circuits, or source code or object code written in any combination of one or more programming languages, including Smalltalk®, C++ or similar object-oriented programming languages, and procedural programming languages such as the "C" programming language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or wide area network (WAN), or this connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, for example, an electronic circuit including a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA) may be personalized by executing computer-readable program instructions by utilizing state information of computer-readable program instructions in order to perform an aspect of the present invention.
[0025] Aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It will be understood that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0026] These computer-readable program instructions may be provided to a computer or other programmable data processing device processor to create a machine, thereby creating means for instructions executed via the computer or other programmable data processing device processor to implement functions / operations specified in one or more blocks of a flowchart and / or block diagram. These computer-readable program instructions, which can instruct a computer, programmable data processing device, and / or other device to function in a particular manner, may be stored on a computer-readable storage medium, so that a computer-readable storage medium storing instructions comprises a product containing instructions that implements the modes of functions / operations specified in one or more blocks of a flowchart and / or block diagram.
[0027] Furthermore, by loading computer-readable program instructions onto a computer, other programmable data processing device, or other device and executing a series of operational steps on the computer, other programmable device, or other device to generate computer implementation processing, the instructions executed on the computer, other programmable device, or other device can implement the functions / operations specified in one or more blocks of a flowchart and / or block diagram.
[0028] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of the system, method, and computer program product according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of instructions comprising one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions described in the blocks may be performed in an order different from the order shown in the drawings. For example, two consecutively shown blocks may actually be implemented as a single stage and executed simultaneously, substantially simultaneously, partially or entirely in a temporally overlapping manner, or, depending on the functions involved, the blocks may be executed in reverse order. It should also be noted that each block in the block diagram and / or flowchart diagram, and combinations of blocks in the block diagram and / or flowchart diagram, may be implemented by a dedicated hardware-based system that performs a specified function or operation, or a combination of dedicated hardware and computer instructions.
[0029] Accordingly, exemplary embodiments provide methods, apparatus, systems, and computer program products for automatically encrypting sensitive data. In exemplary embodiments, sensitive data may be retrieved from a location identified in configuration information. The sensitive data may be automatically encrypted using the configuration information and stored during the deployment of a container for the application. Furthermore, exemplary embodiments recognize and consider that changes to the sensitive data may be detected, and that the sensitive data may be automatically encrypted and automatically deployed for use by the container for the application. This detection of changes to the sensitive data may be detected using checksums.
[0030] While this disclosure includes a detailed description of cloud computing, it should be understood that the implementation of the teachings described herein is not limited to cloud computing environments. Rather, embodiments of the present invention can be implemented in conjunction with any other type of computing environment that is currently known or may be developed in the future.
[0031] Cloud computing is a service delivery model that enables 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 can be rapidly provisioned and deployed with minimal management effort or interaction with service providers. This cloud model may include at least five characteristics, at least three service models, and at least four deployment models.
[0032] The characteristics are as follows:
[0033] On-demand self-service: Cloud consumers can unilaterally provision computing functions such as server time and network storage automatically as needed, without requiring human interaction with the service provider.
[0034] Broad network access: Features that facilitate use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs®) are available over the network and accessed through standard mechanisms.
[0035] Resource Pool: A provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically allocated and reallocated as needed. Consumers generally do not have control or knowledge of the exact location of the resources provided, but there is location independence in that they may be able to specify the location at a higher level of abstraction (e.g., country, state, or data center).
[0036] Rapid scalability: Features can be provisioned quickly and scalably, sometimes automatically, to scale out quickly, and released quickly to scale in quickly. To consumers, the features available for provisioning often appear unlimited and can be purchased in any quantity at any time.
[0037] Measured Services: Cloud systems automatically control and optimize resource usage by leveraging metric capabilities at an appropriate level of abstraction for the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, thereby providing transparency to both service providers and consumers.
[0038] The service model is as follows:
[0039] Software as a Service (SaaS): The functionality provided to consumers is the use of a provider's application running on a cloud infrastructure. The application is accessible from various client devices through a thin client interface such as a web browser (e.g., web-based email). Consumers do not manage or control the underlying cloud infrastructure, including the network, servers, operating system, storage, or even individual application functions, with the possible exception of limited user-specific application configuration settings.
[0040] Platform as a Service (PaaS): The functionality offered to consumers is the deployment of applications created or acquired by the consumer, using programming languages and tools supported by the provider, onto a cloud infrastructure. Consumers do not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but they have control over the deployed applications and, in some cases, the application hosting environment configuration.
[0041] Infrastructure as a Service (IaaS): The functionality provided to consumers is the provisioning of processing, storage, networking, and other basic computing resources that enable consumers to deploy and run any software, including operating systems and applications. Consumers do not manage or control the underlying cloud infrastructure, but they have control over the operating system, storage, and deployed applications, and possibly limited control over selected networking components (e.g., host firewalls).
[0042] The deployment model is as follows:
[0043] Private Cloud: Cloud infrastructure is operated solely for a specific organization. It may be managed by the organization or a third party, and may reside on-premises or off-premises.
[0044] Community Cloud: A cloud infrastructure is shared by several organizations to support a specific community that shares common interests (e.g., mission, security requirements, policies, and compliance considerations). It may be managed by the organization or a third party and may reside on-premises or off-premises.
[0045] Public cloud: Cloud infrastructure is made available to the general public or large industry groups and is owned by organizations that sell cloud services.
[0046] Hybrid Cloud: Cloud infrastructure remains an independent entity, but it is a composite of two or more clouds (private, community, or public) that are joined together by standardized or proprietary technologies (e.g., cloud burst for load balancing across clouds) that enable data and application portability.
[0047] Cloud computing environments are service-oriented, emphasizing statelessness, low coupling, modularity, and semantic interoperability. At the heart of cloud computing lies an infrastructure that includes a network of interconnected nodes.
[0048] Referring now to Figure 1, a diagram is shown illustrating a cloud computing environment in which an exemplary embodiment may be implemented. In this exemplary example, the cloud computing environment 100 includes a set of one or more cloud computing nodes 110 to which local computing devices used by cloud consumers, such as a personal digital assistant or smartphone 120A, a desktop computer 120B, a laptop computer 120C, and / or an automotive computer system 120N, can communicate.
[0049] The cloud computing node 110 may communicate with one or more networks and may be physically or virtually grouped into one or more networks, such as private, community, public, or hybrid clouds or a combination thereof. This enables the cloud computing environment 100 to provide infrastructure, platforms, and / or software as a service, eliminating the need for cloud consumers such as local computing devices 120A-120N to maintain resources on their local computing devices. The types of local computing devices 120A-120N are intended for illustrative purposes only, and it is understood that the cloud computing node 110 and the cloud computing environment 100 can communicate with any type of computerized device, for example, using a web browser, via any type of network and / or network addressable connection.
[0050] Referring now to Figure 2, a diagram is shown illustrating an abstraction model layer according to an exemplary embodiment. The set of functional abstraction layers shown in this exemplary example may be provided by a cloud computing environment, such as cloud computing environment 100 in Figure 1. It should be understood in advance that the components, layers, and functionalities shown in Figure 2 are intended to be illustrative only, and embodiments of the present invention are not limited thereto. As shown, the following layers and corresponding functionalities are provided:
[0051] The abstraction layer 200 of the cloud computing environment includes a hardware and software layer 202, a virtualization layer 204, a management layer 206, and a workload layer 208. The hardware and software layer 202 includes hardware and software components of the cloud computing environment. Hardware components may include, for example, a mainframe 210, a RISC (Reduced Instruction Set Computer) architecture-based server 212, a server 214, a blade server 216, a storage device 218, and network and networking components 220. In some exemplary embodiments, software components may include, for example, network application server software 222 and database software 224.
[0052] The virtualization layer 204 provides an abstraction layer that may provide examples of virtual entities, namely virtual servers 226, virtual storage 228, virtual networks 230 including virtual private networks, virtual applications and operating systems 232, and virtual clients 234.
[0053] In one example, the management layer 206 may provide the functions described below. Resource provisioning 236 provides the dynamic procurement of computing resources and other resources used to perform tasks within the cloud computing environment. In this exemplary example, virtual disk management 237 in resource provisioning can manage resources in the form of virtual disks.
[0054] Measurement and pricing 238 provides cost tracking for the use of resources within the cloud computing environment and accounts or bills for the consumption of those resources. For example, these resources may include application software licenses. Security provides identity verification for cloud consumers and tasks, and protection of data and other resources. The user portal 240 provides consumers and system administrators with access to the cloud computing environment. Service level management 242 provides cloud computing resource allocation and management to ensure that required service levels are met. Service level agreement (SLA) planning and execution 244 provides advance preparation and procurement of cloud computing resources for anticipated future needs in accordance with the SLA.
[0055] Workload layer 208 provides examples of capabilities that can be utilized in a cloud computing environment. Exemplary workloads and capabilities that may be provided by workload layer 208 may include mapping and navigation 246, software development and lifecycle management 248, provision of virtual classroom education 250, data analytics processing 252, transaction processing 254, and container orchestration 256.
[0056] The exemplary embodiments recognize and consider several different considerations. For example, the exemplary embodiments recognize and consider that managing the lifecycle of storage devices available for use by nested virtualized guests can be difficult when the hypervisor does not provide or support passthrough or partial virtualization of storage devices. The exemplary embodiments recognize and consider the attachment, detachment, and update of the lifecycle. The exemplary embodiments recognize and consider that it is desirable to automate the discovery process of attached storage devices for use by guests running under the hypervisor. The exemplary embodiments recognize and consider that automating this process may include using disk image files that are compatible with the hypervisor.
[0057] Referring now to Figure 3, a pictorial representation of a network of a data processing system in which an exemplary embodiment may be implemented is shown. The network data processing system 300 is a network of computers in which an exemplary embodiment may be implemented. The network data processing system 300 includes a network 302. The network 302 is a medium used to provide communication links between various devices and computers connected together within the network data processing system 300. The network 302 may include wired or wireless links, or connections such as fiber optic cables.
[0058] In the example shown, server computers 304 and 306 are connected to network 302 along with storage unit 308. In addition, client devices 310 are connected to network 302. As shown, client devices 310 include client computers 312, 314, and 316. Client devices 310 may be, for example, computers, workstations, or network computers. In the example shown, server computer 304 provides information to client devices 310, such as boot files, operating system images, and applications. Furthermore, client devices 310 may also include other types of client devices, such as mobile phones 318, tablet computers 320, and smart glasses 322. In this exemplary example, server computers 304, 306, storage unit 308, and client devices 310 are network devices connected to network 302, where network 302 is the medium of communication for these network devices. Some or all of the client devices 310 may form the Internet of Things (IoT). In IoT, these physical devices connect to network 302 and can exchange information with each other on network 302.
[0059] In this example, client device 310 is a client of server computer 304. The network data processing system 300 may include additional server computers, client computers, and other devices not shown. Client device 310 is connected to network 302 using at least one of wired, fiber optic, or wireless connections.
[0060] Program code located within the network data processing system 300 can be stored on a computer-recordable storage medium and downloaded to the data processing system or other devices for use. For example, program code can be stored on a computer-recordable storage medium on a server computer 304 and downloaded to a client device 310 over the network 302 for use on the client device 310.
[0061] In the example shown, the network data processing system 300 is the Internet using network 302, which represents a worldwide collection of networks and gateways communicating with each other using a set of protocols called the Transmission Control Protocol / Internet Protocol (TCP / IP). At the heart of the Internet is a backbone of high-speed data communication lines between major nodes or host computers consisting of thousands of commercial, government, educational, and other computer systems routing data and messages. Naturally, the network data processing system 300 can also be implemented using several different types of networks. For example, network 302 may consist of at least one of the following: the Internet, an intranet, a local area network (LAN), a metropolitan area network (MAN), or a wide area network (WAN). Figure 3 is intended as an example and not an architectural limitation of different exemplary embodiments.
[0062] As used herein, “multiple” means one or more items when used in relation to an item. For example, “multiple different types of networks” means one or more different types of networks.
[0063] Furthermore, the phrase "at least one of" means, when used with a list of items, that any one or more different combinations of the enumerated items may be used, and that only one of each item in the list may be required. In other words, "at least one of" means that any combination of items and the number of items in the list may be used, but not all items in the list are required. An item can be a specific object, thing, or category.
[0064] For example, without limitation, “at least one of item A, item B, or item C” could include item A, item A and item B, or item B. This example could also include item A, item B, and item C, or item B and item C. Naturally, any combination of these items is possible. In some exemplary examples, “at least one of” could, for example, without limitation, two of item A, one of item B, ten of item C, four of item B and seven of item C, or other preferred combinations.
[0065] As shown, the virtual disk manager 330 operates on server computer 304 with a hypervisor 332 to manage a virtual disk 334 for a guest virtual machine 336 using block storage 338. In this exemplary example, block storage 338 is physical storage comprising one or more physical storage devices. These physical devices store data in byte units that are blocked or grouped into segments, each having its own entrance. In other examples, block storage 338 may be virtual storage.
[0066] The virtual disk manager 330 can create a virtual disk 334 and allocate it to the guest virtual machine 336. In this exemplary example, the creation of the virtual disk 334 occurs when the existence of block storage 338 is discovered. This discovery can be performed in several different ways. For example, the discovery of block storage 338 can be performed using event-driven notifications or queries.
[0067] As shown, the hypervisor 332 attaches the virtual disk 334 to the guest virtual machine 336 as allocated by the virtual disk manager 330. The virtual disk 334 is viewed by the guest virtual machine 336 with characteristics and format that the guest virtual machine 336 expects and will use. Characteristics may include, for example, format, size, or capacity, or other characteristics that make the virtual disk 334 appear like an actual physical device.
[0068] The virtual disk manager 330 may also act to remove virtual disk 334 when block storage 338 is removed or lost. This situation may be detected using event-driven notifications or scheduled queries. The virtual disk manager 330 may notify the hypervisor 332 that the virtual disk is to be removed from use by the guest virtual machine 336. As another example, the virtual disk manager 330 may also add, remove, or resize virtual disk 334 in response to a resize of block storage 338.
[0069] The example of managing virtual disk 334 is one example of an implementation for managing virtual disks for a guest virtual machine 336. In other exemplary examples, the virtual disk manager 330 may manage one or more virtual disks for a single guest virtual machine. In yet another exemplary example, there may be more than one block storage.
[0070] Referring now to Figure 4, a block diagram of a virtual disk management environment according to an exemplary embodiment is shown. In this exemplary example, the virtual disk management environment 400 includes components that can be implemented on hardware such as the hardware shown in the cloud computing environment 100 in Figure 1 or the network data processing system 300 in Figure 3.
[0071] In this exemplary example, the virtual disk management system 402 in the virtual disk management environment 400 comprises several different components. As shown, the virtual disk management system 402 comprises a computer system 404 and a virtual disk manager 406. The virtual disk manager 406 is located within the computer system 404.
[0072] The virtual disk manager 406 may be implemented in software, hardware, firmware, or a combination thereof. If software is used, the operations performed by the virtual disk manager 406 may be implemented in program instructions configured to run on hardware such as a processor unit. If firmware is used, the operations performed by the virtual disk manager 406 may be implemented in program instructions and data stored in persistent memory for operation on a processor unit. If hardware is used, the hardware may include circuitry that operates to perform the operations of the virtual disk manager 406.
[0073] In exemplary examples, the hardware can take the form of at least one of a circuit system, an integrated circuit, an application-specific integrated circuit (ASIC), a programmable logic device, or any other suitable type of hardware configured to perform multiple operations. In the case of a programmable logic device, the device may be configured to perform multiple operations. The device may be reconfigured at a later point in time, or it may be permanently configured to perform multiple operations. Programmable logic devices include, for example, programmable logic arrays, programmable array logic, field-programmable logic arrays, field-programmable gate arrays, and other suitable hardware devices. Additionally, these operations may be implemented in organic components integrated with inorganic components, or entirely composed of organic components without human intervention. For example, these operations may be implemented as circuits within organic semiconductors.
[0074] The computer system 404 is a physical hardware system and includes one or more data processing systems. If there are more than one data processing systems in the computer system 404, those data processing systems communicate with each other using a communication medium. The communication medium may be a network. The data processing systems may be selected from at least one of a computer, a server computer, a tablet computer, or several other suitable data processing systems.
[0075] As shown, the computer system 404 includes a plurality of processor units 408 capable of executing program instructions 410 that implement a process in an exemplary example. As used herein, a processor unit within a plurality of processor units 408 is a hardware device and consists of hardware circuits, such as hardware circuits on an integrated circuit, that respond to and process instructions and program code that operate the computer. When the plurality of processor units 408 execute program instructions 410 for a process, the plurality of processor units 408 are one or more processor units that may be on the same computer or on different computers. In other words, a process can be distributed among processor units on the same or different computers within the computer system. Furthermore, the plurality of processor units 408 can be of the same type or different types of processor units. For example, the plurality of processor units can be at least one of a single-core processor, a dual-core processor, a multi-processor core, a general-purpose central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), or any other type of processor unit.
[0076] As shown, the virtual disk manager 406 detects the attachment of storage 412 to the host operating system 414. This detection can be performed using a discovery process. Discovery can be performed in several different ways. For example, discovery may use event-driven notifications to initiate the discovery of storage devices, or it may involve the use of scheduled queries to initiate the discovery of block storage. Storage 412 may be virtual storage. For example, storage 412 may be virtual storage in a nested virtualization system.
[0077] In this exemplary example, storage 412 exists when storage 412 is attached to the host operating system 414. Storage 412 may take several different forms. For example, storage 412 may use one or more storage architectures selected from at least one of block storage, file storage, object storage, or any other suitable type of storage architecture. The storage device in storage 412 may be selected from at least one of hard disk drives, solid-state disk drives, or any other suitable type of storage device.
[0078] In response to storage 412, the virtual disk manager 406 mounts storage 412 to a set of mount points 416. In this exemplary example, the set of mount points 416 is a set of locations in a set of partitions 418 for storage 412. The set of partitions 418 may be one or more partitions. Each mount point may be a directory in a file system.
[0079] Before mounting storage 412, the virtual disk manager 406 creates a set of partitions 418 for the set of virtual disks 420. The virtual disk manager 406 also creates a set of filesystems 422 in the set of partitions 418 for the set of virtual disks 420 before mounting storage 412. In order to mount the storage to the set of mount points 416, the set of filesystems 422 in the set of partitions 418 is mounted to the set of mount points 416 by the virtual disk manager 406. In this exemplary example, the set of virtual disk image files 424 is for the set of virtual disks 420 and is located in the set of filesystems 422.
[0080] The virtual disk manager 406 creates a set of virtual disks 420 and assigns the set of virtual disks 420 to the guest 426 in operation 428, in which instructions for an atomic operation are executed without interruption. In this exemplary example, operation 428 is an atomic operation 429. In other words, the instructions to create and assign the virtual disks 420 are executed without other intervening instructions being processed for other operations that are not part of an atomic operation. For example, operation 428 can create and assign the set of virtual disks 420 to the guest 426 without being interrupted by the execution of other stages or operations that may affect the creation and assignment of the set of virtual disks 420 to the guest 426.
[0081] For example, the instructions for performing the steps in operation 428 are executed in such a way that instructions for other steps or operations that are not part of operation 428 affect the creation and allocation of the set of virtual disks 420. In another exemplary example, operation 428 may also include attaching the set of virtual disks 420 to guest 426. In this exemplary example, guest 426 may be selected from a group that includes an operating system, a guest operating system, a virtual machine, or any other suitable component that may be considered a guest.
[0082] The creation of the set of virtual disks 420 is performed by creating a set of virtual disk image files 424 in storage 412. Each virtual disk image file in the set of virtual disk image files 424 corresponds to a virtual disk and virtual disk 420. If a single virtual disk exists in the set of virtual disks 420, then a single virtual disk image exists in the set of virtual disk image files 424.
[0083] The allocation of the set of virtual disks 420 to guest 426 can be done by updating the guest configuration 430 of hypervisor 432 for guest 426. Hypervisor 432 can then use the guest configuration 430 attached to the set of virtual disks 420 for guest 426.
[0084] In this exemplary example, the hypervisor 432 is a component capable of running one or more virtual machines, and the virtual machines are referred to as guests or guest virtual machines. The hypervisor 432 may consist of at least one of software, firmware, or hardware. In this shown example, the guest configuration 430 is a configuration file containing information that identifies the configuration for guest 426. For example, the guest configuration 430 may describe virtual hardware resources for guest 426, including a set of virtual disk image files 424 for a set of virtual disks 420.
[0085] In this exemplary example, a partition in the set of partitions 418 may have one or more sets of virtual disk image files 424. In other words, a partition may have more than one virtual disk. Additionally, a file system in the set of file systems 422 may also have one or more sets of virtual disk image files 424.
[0086] Furthermore, if there are more than one virtual disk image file in the set of virtual disk image files 424, those virtual disk image files may be for the same or different types of virtual disks. These formats may be for the types of physical disk devices that guest 426 can or is expected to use.
[0087] As a result, the use of atomic operation 429 provides at least one of the following: improved accuracy or security in providing virtual disks 420 to guests. Furthermore, the use of atomic operation 429 reduces the possibility of man-in-the-middle attacks (MITM) and prevents virtual disks from becoming orphaned. For example, by placing a set of virtual disks 420 in a pool or waiting to allocate a set of virtual disks 420 at a later time, it is possible that a different guest other than guest 426 may end up attaching to the set of virtual disks 420.
[0088] In addition to creating a set of virtual disks 420 and assigning them to the guest 426, the virtual disk manager 406 can also perform other operations in managing the set of virtual disks 420. For example, the virtual disk manager 406 can detect a resize 434 of storage 412. In response to detecting the resize 434, the virtual disk manager 406 can update the guest configuration 430 for the guest 426 to reflect the resize 434 of the set of virtual disks 420.
[0089] In one exemplary example, the virtual disk manager 406 detects a resize 434 of storage 412, which adds storage device 436 to storage 412. In this instance, the virtual disk manager 406 creates a new set of virtual disks 438 for storage device 436 and allocates the new set of virtual disks 438 to guest 426 in a new atomic operation 440, in which instructions for the new atomic operation 440 are executed without interruption.
[0090] In another exemplary example, the virtual disk manager 406 detects a resize 434 of storage 412, which removes storage device 436 from storage 412. In response to the resize 434, the virtual disk manager 406 removes multiple virtual disks 420 having multiple virtual disk image files 442 located on storage device 436. The virtual disk manager 406 also unmounts the set of partitions 418 for storage 412 corresponding to storage device 436.
[0091] In yet another exemplary example, the virtual disk manager 406 detects the detachment of storage 412. In this exemplary example, the detachment of storage 412 means that an event has been detected in which storage 412 has been removed, is missing, or otherwise inaccessible. In response to detecting the detachment of storage 412, the virtual disk manager 406 updates the guest configuration 430 for guest 426 to remove the set of virtual disks 420. In this case, the virtual disk manager 406 unmounts storage 412 from the set of mount points 416.
[0092] Computer system 404 can be configured using software, hardware, firmware, or a combination thereof to perform at least one of the steps, operations, or actions described in different exemplary examples. As a result, computer system 404 operates as a dedicated computer system within computer system 404, enabling the virtual disk manager 406 to manage virtual disks that are not orphaned or exposed before being attached to a guest. In particular, the virtual disk manager 406 transforms computer system 404 into a dedicated computer system compared to a currently available general-purpose computer system that does not have the virtual disk manager 406.
[0093] In an exemplary example, the use of a virtual disk manager 406 in computer system 404 integrates the process into a practical application for managing virtual disks, thereby improving the performance of computer system 404. In other words, the virtual disk manager 406 in computer system 404 targets a practical application of the process of managing virtual disks within the virtual disk manager 406 in computer system 404, including creating virtual disks and allocating them to guests in a manner that does not leave the virtual disks exposed, or to pools where the virtual disks may be used for purposes other than attaching to guests. In this exemplary example, the virtual disk manager 406 in computer system 404 intervenes during the creation and allocation of virtual disks, performing the creation and allocation of virtual disks using atomic operations that do not result in other operations that may involve virtual disks.
[0094] In this way, the virtual disk manager 406 in computer system 404 provides a practical application of the method of the present invention to improve the functionality of computer system 404. In one or more of the different exemplary examples, when a storage device is attached, a disk (physical / virtual) preparation process occurs, in which a virtual disk image file is created and mounted via the hypervisor for use by the guest. When the storage device is detached, a process occurs to unmount the disk image file via the hypervisor, which involves any additional cleanup on the host operating system. When the storage device is resized, the virtual disk may be resized accordingly by resizing the virtual disk image file, or managed by creating or deleting the virtual disk by creating or deleting the virtual disk image file.
[0095] The illustrative virtual disk management environment 400 in Figure 4 is not intended to imply any physical or architectural limitations on how the exemplary embodiment may be implemented. Other components may be used in addition to or instead of those shown. Some components may be unnecessary. Also, the blocks are presented to show several functional components. One or more of these blocks may be combined, separated, combined into different blocks, or separated into different blocks when implemented in the exemplary embodiment.
[0096] For example, the virtual disk manager 406 may operate to manage virtual disks for one or more hypervisors, in addition to or instead of the hypervisor 432. In another exemplary example, there may be one or more guests in addition to the guest 426 that is provided to the virtual disk by the virtual disk manager 406 via the hypervisor 432. In yet another exemplary example, the virtual disk manager 406 may be part of the storage controller currently used to manage access to the storage 412.
[0097] Figures 5 to 7 are message flow diagrams illustrating the management of virtual disks for a guest operating system. In the illustrative examples, messages may be data, extracts, commands, and electrical signals, or at least one of other suitable types of signals that may be used for messages.
[0098] First, referring to Figure 5, a message flow diagram is shown illustrating the attachment of a virtual disk to a guest operating system according to an exemplary embodiment. In this example, block storage 500 is an example of storage 412 shown in Figure 4. In this exemplary example, block storage 500 attaches to the host operating system 502 (message m1).
[0099] There is a discovery stage in which an event-driven notification or query may be used from the virtual disk manager 504 to the host operating system 502 to initiate the discovery of block storage 500 (message m2). Once discovery is initiated, the virtual disk manager 504 may receive a list of block storage devices found by the host operating system 502 during the discovery process performed by the host operating system 502 (message m3). The virtual disk manager 504 verifies the list of block storage devices received from the host operating system 502 to determine whether a new block storage device exists or whether there has been a change in the block storage devices attached to the host operating system 502. In this example, the attachment of block storage 500 is identified by verifying the list of block storage devices received from the host operating system 502.
[0100] Upon detecting the attachment of block storage 500, the virtual disk manager 504 sends a message to the host operating system 502 to prepare partitions and file systems for block storage 500 (message m4). This step may be omitted if block storage 500 is already prepared to have partitions and file systems for virtual disks.
[0101] The virtual disk manager 504 sends a message to the host operating system 502 (message m5) to mount a partition of block storage so that it can be accessed by the host operating system 502 and the guest operating system 506. In this example, the guest operating system 506 is an operating system running in a virtual machine. Symmetrically, the host operating system 502 resides on a computer system and interacts with hardware. The computer system may be a physical or virtual computer system, and the hardware may be physical or virtual hardware, including nested virtualization. Due to nested virtualization, the host operating system 502 may be a guest operating system of another hypervisor running in a virtual machine.
[0102] In this exemplary example, the virtual disk manager 504 performs an atomic operation 508. In this exemplary example, the atomic operation 508 includes executing instructions to perform steps that include creating a virtual disk and allocating the virtual disk to the guest operating system 506. When creating the virtual disk, a virtual disk image file is created that is compatible with or available to the hypervisor 510. This creation of the virtual disk image file marks the beginning of the atomic operation 508. If a virtual disk image already exists in the partition and block storage 500, this step in the atomic operation 508 may be omitted.
[0103] When allocating a virtual disk to the guest operating system 506, atomic operation 508 updates the guest configuration 512. This update is performed to include a new virtual disk image for use by the guest operating system 506 (message m6). In other words, updating the guest configuration 512 is part of atomic operation 508. Therefore, the stages of creating and allocating the virtual disk in atomic operation 508 can be performed without interruption by other stages for processes, threads, programs, or other types of execution units that may allocate or attach the virtual disk to guests other than the intended guest, which is the guest operating system 506.
[0104] The virtual disk manager 504 may notify the hypervisor 510 that the guest configuration 512 has been updated (message m7). This notification may be unnecessary if automatic discovery is not performed by the hypervisor 510.
[0105] This update to guest configuration 512 is used by hypervisor 510 to attach a virtual disk (message m8). The guest operating system 506 can then use the virtual disk.
[0106] Referring to Figure 6, a message flow diagram illustrating the removal of a virtual disk from a guest operating system according to an exemplary embodiment is shown. In this example, block storage 500 detaches from the host operating system 502 (message n1). Detection of this detachment may be performed via event-driven notification or by the virtual disk manager 504 initiating discovery using a query (message n2). In this discovery process, the host operating system 502 returns a list of devices to the virtual disk manager 504 (message n3). The virtual disk manager 504 may parse the list of devices to determine that block storage 500 has been detached.
[0107] In response to detecting the detachment of block storage 500, the virtual disk manager 504 updates the guest configuration 512 to remove the virtual disk image for the virtual disk used by the guest operating system 506 (message n4). The virtual disk manager 504 notifies the hypervisor 510 of the update to the guest configuration 512 (message n5). The hypervisor 510 may then detach the guest operating system 506 (message n6).
[0108] In response to detecting the detachment of block storage 500, the virtual disk manager 504 may send a message to the host operating system 502 to unmount the partition that was in block storage 500 (message n7).
[0109] Next, referring to Figure 7, a message flow diagram for resizing a virtual disk for a guest operating system is shown according to an exemplary embodiment. In this example, block storage 500 is resized, and a resized message is sent to the host operating system 502 (message p1).
[0110] This resize detection can be performed via event-driven notification or by the virtual disk manager 504 initiating discovery using a query (message p2). In this discovery process, the host operating system 502 returns a list of devices to the virtual disk manager 504 (message p3). The virtual disk manager 504 can parse the list of devices to determine that the block storage 500 has been resized.
[0111] The virtual disk manager 504 instructs the host operating system 502 to resize the partition to the new size (message p4). If the partition resizing reduces the block storage 500, one or more virtual disks may be removed to reduce the space available to the guest operating system 506. The removal of one or more virtual disks from use by the guest operating system 506 may be performed by updating the guest configuration 512 to remove the virtual disk image files (message p5).
[0112] If resizing a partition increases the amount of space it has, the virtual disk manager 504 performs an atomic operation 700 to create one or more virtual disks for the increased space resulting from the resizing of the block storage 500 and allocate one or more virtual disks to the guest operating system 506. The creation of one or more virtual disk image files for one or more virtual disks is the initial stage of the atomic operation 700. The allocation of virtual disks may be reflected by updating the guest configuration 512 to include a virtual disk image for each virtual disk allocated to the guest operating system 506 (message p5). This update of the guest configuration 512 is the second stage of the atomic operation 700 in this example. As shown, these two stages may be performed without interruption by stages for processes, threads, programs, or other types of execution units that may allocate or attach virtual disks to guests other than the intended guest, the guest operating system 506.
[0113] In either case, the virtual disk manager 504 notifies the hypervisor 510 of the update to the guest configuration 512 (message p6). The hypervisor 510 may attach or detach virtual disks from the guest operating system 506 based on the addition or removal of virtual disk image files from the guest configuration 512 (message p7).
[0114] The use of atomic operation 508 in Figure 5 and atomic operation 700 in Figure 7 provides improved resource management that surpasses current techniques that allow virtual disks to be placed in a pool or left unattached for a period of time. The use of atomic operations ensures that there are no orphaned virtual disks that could be subjected to man-in-the-middle (MITM) attacks, interception, or attachment to another guest operating system. Additionally, atomic operations can also trigger the attachment of an entire block storage device, thereby eliminating wasted orphaned space that could remain unused.
[0115] Next, referring to Figure 8, a flowchart of a process for managing a virtual disk according to an exemplary embodiment is shown. The process in Figure 8 can be implemented in hardware, software, or both. When implemented in software, the process may take the form of program instructions that operate on one or more processor units located in one or more hardware devices within one or more computer systems. For example, the process may be implemented in the virtual disk manager 406 within the computer system 404 in Figure 4.
[0116] The process begins with a step (stage 800) that detects the attachment of storage to the host operating system. The process then mounts the storage to a set of mount points (stage 802).
[0117] The process creates a set of virtual disks and assigns this set of virtual disks to the guest in an operation where instructions for the operation are executed without interruption (stage 804). The process then terminates.
[0118] Referring now to Figure 9, a flowchart of the process for managing virtual disks according to an exemplary embodiment is shown. The steps in this flowchart are examples of additional steps that may be performed in conjunction with the steps in Figure 8.
[0119] The process creates a set of partitions for the set of virtual disks before mounting the storage (stage 900). The process creates a set of filesystems within the set of partitions for the set of virtual disks before mounting the storage, where the set of virtual disk image files is for the set of virtual disks and is located within the set of filesystems (stage 902). The process then terminates.
[0120] Referring to Figure 10, a flowchart of the process for mounting storage according to an exemplary embodiment is shown. This flowchart is an example of an implementation of step 802 in Figure 8.
[0121] The process mounts the set of filesystems on the set of partitions to the set of mount points (stage 1000). The process then terminates.
[0122] Figure 11 shows a flowchart of the process for creating and allocating a virtual disk in an atomic operation, according to an exemplary embodiment. This flowchart is an example of an implementation of step 804 in Figure 8. The steps in this flowchart are implemented so that, in an atomic operation, instructions for the atomic operation are executed without interruption.
[0123] The process creates a set of virtual disk image files in storage, where this set of virtual disk image files is for a set of virtual disks (stage 1100). The process updates the hypervisor's guest configuration for the guest, where the hypervisor uses the guest configuration to attach the set of virtual disks to the guest (stage 1102). The process then terminates.
[0124] Referring to Figure 12, a flowchart of the process for managing a virtual disk according to an exemplary embodiment is shown. The steps in this flowchart are examples of additional steps that may be performed in conjunction with the steps in Figure 8.
[0125] The process detects the storage resize (stage 1200). The process updates the guest configuration for the guest to reflect the resize of the set of virtual disks (stage 1202). The process then terminates.
[0126] Next, referring to Figure 13, a flowchart of the process for managing a virtual disk according to an exemplary embodiment is shown. The steps in this flowchart are examples of additional steps that may be performed in conjunction with the steps in Figure 8.
[0127] The process detects a storage resize, which adds a storage device to the storage (stage 1300). The process creates a new set of virtual disks for the storage device and allocates this new set of virtual disks to the guest in a new atomic operation, where instructions for the new atomic operation are executed without interruption by multiple processor units (stage 1302). The process then terminates.
[0128] Referring now to Figure 14, a flowchart of the process for managing virtual disks according to an exemplary embodiment is shown. The steps in this flowchart are examples of additional steps that may be performed in conjunction with the steps in Figure 8.
[0129] The process detects a storage resize, and this resize removes the storage device from storage (stage 1400). The process removes multiple virtual disks that have multiple virtual disk image files located within the storage device (stage 1402).
[0130] The process unmounts the set of partitions for storage (stage 1404). The process then terminates.
[0131] Figure 15 shows a flowchart of a process for managing virtual disks according to an exemplary embodiment. The steps in this flowchart are examples of additional steps that may be performed in conjunction with the steps in Figure 8.
[0132] The process detects the storage detachment (stage 1500). In response to detecting the storage detachment, the process updates the guest configuration for the guest to remove the set of virtual disks (stage 1502).
[0133] The process unmounts the storage from the set of mount points (stage 1504). The process then terminates.
[0134] The flowcharts and block diagrams in the different embodiments shown illustrate the architecture, function, and operation of several possible implementations of the apparatus and method in the exemplary embodiments. In this regard, each block in the flowchart or block diagram may represent at least one of a module, segment, function, or part of an operation or stage. For example, one or more of these blocks may be implemented as program instructions, hardware, or a combination of program instructions and hardware. When implemented in hardware, the hardware may take the form of an integrated circuit manufactured or configured to perform one or more operations in the flowchart or block diagram, for example. When implemented as a combination of program instructions and hardware, the implementation may take the form of firmware. Each block in the flowchart or block diagram may be implemented using a dedicated hardware system that performs different operations or combinations of dedicated hardware and program instructions operated by the dedicated hardware.
[0135] In some alternative implementations of the exemplary embodiments, one or more functions shown in a block may be performed in an order other than that shown in the drawing. For example, in some cases, depending on the related functions, two consecutively shown blocks may be executed substantially simultaneously, and these blocks may, in some cases, be executed in reverse order. In addition, other blocks may be added to those shown in the flowchart or block diagram.
[0136] Referring now to Figure 16, a block diagram of a data processing system according to an exemplary embodiment is shown. The data processing system 1600 may be used to implement the cloud computing node 110 in Figure 1, the personal digital assistant (PDA) or smartphone 120A in Figure 1, the desktop computer 120B, the laptop computer 120C, and / or the automotive computer system 120N. The data processing system 1600 may be used to implement the computers in the hardware and software layer 202 in Figure 2, as well as the server computers 304, 306, and client devices 310 in Figure 3. The data processing system 1600 may also be used to implement the computer system 404 in Figure 4. In this exemplary example, the data processing system 1600 includes a processor unit 1604, memory 1606, persistent storage 1608, a communication unit 1610, an input / output (I / O) unit 1612, and a communication framework 1602 that provides communication between the display 1614. In this example, the communication framework 1602 takes the form of a bus system.
[0137] The processor unit 1604 functions to execute instructions for software that can be loaded into memory 1606. The processor unit 1604 comprises one or more processors. For example, the processor unit 1604 may be selected from at least one of a multicore processor, a central processing unit (CPU), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a network processor, or some other suitable type of processor. Furthermore, the processor unit 1604 may be implemented using one or more heterogeneous processor systems in which a primary processor and secondary processors reside on a single chip. As another exemplary example, the processor unit 1604 may be a symmetrical multiprocessor system containing multiple processors of the same type on a single chip.
[0138] Memory 1606 and persistent storage 1608 are examples of storage device 1616. A storage device is any number of hardware capable of storing information, such as, for example, data, program instructions in a functional form, or at least one of other suitable information, either temporarily, permanently, or both temporarily and permanently. In these exemplary examples, storage device 1616 may also be referred to as computer-readable storage device. Memory 1606 in these examples may be, for example, random-access memory or any other suitable volatile or non-volatile storage device. Persistent storage 1608 may take various forms depending on the particular implementation.
[0139] For example, persistent storage 1608 may include one or more components or devices. For example, persistent storage 1608 may be a hard drive, a solid-state drive (SSD), flash memory, a rewritable optical disk, a rewritable magnetic tape, or any combination thereof. The media used by persistent storage 1608 may be removable. For example, a removable hard drive may be used for persistent storage 1608.
[0140] In these exemplary examples, the communication unit 1610 provides communication with other data processing systems or devices. In these exemplary examples, the communication unit 1610 is a network interface card.
[0141] The input / output unit 1612 enables the input and output of data to and from other devices that may be connected to the data processing system 1600. For example, the input / output unit 1612 may provide a connection for user input through at least one of a keyboard, mouse, or some other suitable input device. Furthermore, the input / output unit 1612 may send output to a printer. The display 1614 provides a mechanism for displaying information to the user.
[0142] Instructions for at least one of an operating system, an application, or a program may reside in a storage device 1616 that communicates with the processor unit 1604 through a communication framework 1602. Processes of different embodiments may be executed by the processor unit 1604 using computer implementation instructions that may reside in memory, such as memory 1606.
[0143] These instructions are referred to as program instructions, computer-readable program instructions, or computer-accessible program instructions, which can be read and executed by the processor in the processor unit 1604. In different embodiments, the program instructions may be implemented on different physical storage media or computer-readable storage media, such as memory 1606 or persistent storage 1608.
[0144] The program instruction 1618 is located in a functional form on a computer-readable medium 1620 that is selectively removable and can be loaded or transferred onto a data processing system 1600 for execution by a processor unit 1604. In these exemplary examples, the program instruction 1618 and the computer-readable medium 1620 form a computer program product 1622. In the exemplary examples, the computer-readable medium 1620 is a computer-readable storage medium 1624.
[0145] The computer-readable storage medium 1624 is not a medium for propagating or transmitting the program instructions 1618, but rather a physical or tangible storage device used to store the program instructions 1618. As used herein, the computer-readable storage medium 1624 is not construed as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses passing through optical fiber cables), or electrical signals transmitted through wires.
[0146] Alternatively, program instruction 1618 may be transmitted to data processing system 1600 using a computer-readable signal medium. The computer-readable signal medium is a signal, and could be, for example, a data signal containing program instruction 1618. For example, the computer-readable signal medium could be at least one of an electromagnetic signal, an optical signal, or any other suitable type of signal. These signals may be transmitted via a connection, such as a wireless connection, fiber optic cable, coaxial cable, wire, or any other suitable type of connection.
[0147] Furthermore, as used herein, “computer-readable medium 1620” may be singular or plural. For example, program instructions 1618 may reside in computer-readable medium 1620 in the form of a single storage device or storage system. In another example, program instructions 1618 may reside in computer-readable medium 1620 distributed across multiple data processing systems. In other words, some instructions within program instructions 1618 may reside in one data processing system, while other instructions within program instructions 1618 may reside in one data processing system. For example, some of program instructions 1618 may reside in computer-readable medium 1620 on a server computer, while other parts of program instructions 1618 may reside in computer-readable medium 1620 located on a set of client computers.
[0148] The different components shown for data processing system 1600 are not intended to impose any architectural limitations on how different embodiments may be implemented. In some exemplary examples, one or more components may be incorporated into another component, or otherwise form part of another component. For example, memory 1606 or part thereof may be incorporated into processor unit 1604 in some exemplary examples. Different exemplary embodiments may be implemented in a data processing system that includes components in addition to, or instead of, those shown for data processing system 1600. Other components shown in Figure 16 may be modified from those shown in the exemplary examples. Different embodiments may be implemented using any hardware device or hardware system capable of operating program instructions 1618.
[0149] Accordingly, exemplary embodiments of the present invention provide a computer implementation method, a computer system, and a computer program product for managing virtual disks. In one exemplary example, multiple processor units detect the attachment of storage to a host operating system. The multiple processor units mount the storage to a set of mount points. The multiple processor units create a set of virtual disks and assign the set of virtual disks to a guest in an operation in which instructions for the operation are executed without interruption. As a result, the possibility that a virtual disk may be attached to a guest operating system other than the specified operating system can be reduced by using an operation in which instructions are executed without interruption, such as an atomic operation. In the exemplary example, this risk can be reduced because the creation and attachment of the virtual disk are performed without interruption by a process that may attach the disk to a different guest before the virtual disk is attached to the intended guest.
[0150] The descriptions of different exemplary embodiments are presented for illustrative and explanatory purposes and are not intended to be comprehensive or to limit the embodiments of the disclosed form. Different exemplary examples describe components that perform an action or operation. In exemplary embodiments, components may be configured to perform the described action or operation. For example, a component may have a configuration or design for a structure that provides the component with the ability to perform the action or operation described in the exemplary example as being performed by the component. Furthermore, to the extent that the terms “includes,” “including,” “has,” and “contains” and their variations are used herein, such terms are intended to be comprehensive in the same manner as the term “comprises” as an open transitional term, without excluding any additional or other elements.
[0151] The descriptions of various embodiments of the present invention are presented for illustrative purposes only and are not intended to be comprehensive or limitless to the disclosed embodiments. Not all embodiments include all the features described in the exemplary examples. Furthermore, different exemplary embodiments may offer different features compared to other exemplary embodiments. Many modifications and variations will become apparent to those skilled in the art without departing from the scope and spirit of the embodiments described. The terminology used herein has been selected to best describe the principles of the embodiments, their practical applications, or technical improvements to the technology found in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein. 。 [Item 1] A computer implementation method for managing virtual disks, wherein the computer implementation method is: The stage in which multiple processor units detect the attachment of storage to the host operating system; The steps include mounting the storage to a set of mount points using the plurality of processor units; and The steps include: creating a set of virtual disks using the plurality of processor units, and assigning the set of virtual disks to a guest in the operation in which the plurality of processor units execute instructions for the operation without interruption. A computer implementation method comprising the following features. [Item 2] The steps include: creating a set of partitions for the set of virtual disks using the plurality of processor units before mounting the storage; and The step of the plurality of processor units creating a set of file systems in the set of partitions for the set of virtual disks before mounting the storage, where the set of virtual disk image files is for the set of virtual disks and is located in the set of file systems. A computer implementation method as described in item 1, further comprising the features described in item 1. [Item 3] The step of mounting the storage to the set of mount points by the aforementioned multiple processor units is as follows: The step of mounting the set of file systems in the set of partitions to the set of mount points by the plurality of processor units is included. Computer implementation method as described in item 2. [Item 4] The operation is an atomic operation, in which the set of virtual disks is created by the multiple processor units and the instructions for the operation are executed by the multiple processor units without interruption, and the step of allocating the set of virtual disks to the guest is: The steps include the creation of a set of virtual disk image files in the storage by the plurality of processor units, wherein the set of virtual disk image files is for the set of virtual disks; and The step involves updating the guest configuration of the hypervisor for the guest using the multiple processor units, wherein the hypervisor uses the guest configuration to attach the set of virtual disks to the guest. The computer implementation method described in item 1, including the method described in item 1. [Item 5] The steps include detecting the resizing of the storage using the plurality of processor units; and The step of updating the guest configuration for the guest using the plurality of processor units to reflect the resizing of the set of virtual disks. A computer implementation method as described in item 1, further comprising the features described in item 1. [Item 6] The plurality of processor units detect the resizing of the storage, where the resizing adds a storage device to the storage; and The steps include: creating a new set of virtual disks for the storage device using the plurality of processor units; and allocating the new set of virtual disks to the guest in the new atomic operation in which the instructions for the new atomic operation are executed without interruption by the plurality of processor units. A computer implementation method as described in item 1, further comprising the features described in item 1. [Item 7] The plurality of processor units detect the resizing of the storage, and the resizing removes the storage device from the storage; The step of removing multiple virtual disks having multiple virtual disk image files located in the storage device using the multiple processor units; and The step of unmounting the set of partitions for the storage by the multiple processor units. A computer implementation method as described in item 1, further comprising the features described in item 1. [Item 8] The steps include detecting the detachment of the storage by the plurality of processor units; and The steps include updating the guest configuration for the guest using the plurality of processor units to remove the set of virtual disks in response to detecting the detachment of the storage; and The step of unmounting the storage from the set of mount points by the plurality of processor units. A computer implementation method as described in item 1, further comprising the features described in item 1. [Item 9] The computer implementation method described in item 1, wherein the guest is selected from a group including an operating system, a guest operating system, and a virtual machine. [Item 10] Multiple processor units, where the multiple processor units are: Procedure for detecting storage attachments to the host operating system; Procedure for mounting the aforementioned storage to a set of mount points; and A procedure for creating a set of virtual disks and assigning the set of virtual disks to a guest in the operation in which the instructions for the operation are performed without interruption. Execute program instructions to perform the task. A computer system equipped with the following features. [Item 11] The aforementioned multiple processor units: A procedure for creating a set of partitions for the set of virtual disks before mounting the storage; and Before mounting the storage, a procedure for creating a set of file systems in the set of partitions for the set of virtual disks, wherein the set of virtual disk image files is for the set of virtual disks and is located in the set of file systems. A computer system as described in item 10, which executes the program instructions for performing the above. [Item 12] When the plurality of processor units mount the storage to the set of mount points, the plurality of processor units: Execute the program instructions for mounting the set of file systems in the set of partitions to the set of mount points. The computer system described in item 11. [Item 13] The operation is an atomic operation, and in the operation in which the multiple processor units create the set of virtual disks and the instructions for the operation are executed without interruption, in the step of allocating the set of virtual disks to the guest, the multiple processor units: A procedure for creating a set of virtual disk image files in the aforementioned storage, wherein the set of virtual disk image files is for the set of virtual disks; and A procedure for updating the guest configuration of the hypervisor for the guest, wherein the hypervisor uses the guest configuration to attach the set of virtual disks to the guest. A computer system as described in item 10, which executes the program instructions for performing the above. [Item 14] The aforementioned multiple processor units: A procedure for detecting the resizing of the aforementioned storage; and A procedure to update the guest configuration for the aforementioned guest to reflect the resizing of the set of virtual disks. A computer system as described in item 10, which executes the program instructions for performing the above. [Item 15] The aforementioned multiple processor units: A procedure for detecting the resizing of the storage; a procedure for adding a storage device to the storage as a result of the resizing; and A procedure to create a new set of virtual disks for the storage device and to assign the new set of virtual disks to the guest in the new atomic operation in which the instructions for the new atomic operation are executed without interruption. A computer system as described in item 10, which executes the program instructions for performing the above. [Item 16] The aforementioned multiple processor units: A procedure for detecting the resizing of the storage, wherein the resizing removes the storage device from the storage; A procedure for removing multiple virtual disks having multiple virtual disk image files located on the aforementioned storage device; and Procedure for unmounting the set of partitions for the aforementioned storage A computer system as described in item 10, which executes the program instructions for performing the above. [Item 17] The aforementioned multiple processor units: A procedure for detecting the detachment of the aforementioned storage; and A procedure for updating the guest configuration for the guest to remove the set of virtual disks in response to detecting the detachment of the storage; and Procedure for unmounting the aforementioned storage from the set of mount points A computer system as described in item 10, which executes the program instructions for performing the above. [Item 18] The computer system described in item 10, wherein the guest is selected from a group including an operating system, a guest operating system, and a virtual machine. [Item 19] A computer program product for managing virtual disks, wherein the computer program product comprises a computer-readable storage medium having program instructions embodied therein, and the program instructions are transmitted to a computer system: Multiple processor units detect storage attachments to the host operating system; The plurality of processor units mount the storage to a set of mount points; and The plurality of processor units create a set of virtual disks, and the plurality of processor units allocate the set of virtual disks to the guest in an atomic operation in which instructions for an atomic operation are executed without interruption. A computer program product that is executable by the computer system to perform the method. [Item 20] The steps include: creating a set of partitions for the set of virtual disks using the plurality of processor units before mounting the storage; and The step of the plurality of processor units creating a set of file systems in the set of partitions for the set of virtual disks before mounting the storage, where the set of virtual disk image files is for the set of virtual disks and is located in the set of file systems. A computer program product as described in item 19, further comprising the features described above.
Claims
1. A computer implementation method for managing virtual disks, wherein the computer implementation method is: The stage in which multiple processor units detect the attachment of storage to the host operating system; The steps include mounting the storage to a set of mount points using the plurality of processor units; and The step involves the multiple processor units creating a set of virtual disks by atomic operation and assigning the set of virtual disks to the guest. A computer implementation method comprising the above.
2. The steps include: creating a set of partitions for the set of virtual disks using the plurality of processor units before mounting the storage; and The step of the plurality of processor units creating a set of file systems in the set of partitions for the set of virtual disks before mounting the storage, where the set of virtual disk image files is for the set of virtual disks and is located in the set of file systems. The computer implementation method according to claim 1, further comprising:
3. The step of mounting the storage to the set of mount points by the aforementioned multiple processor units is as follows: The step of mounting the set of file systems in the set of partitions to the set of mount points by the plurality of processor units is included. The computer implementation method according to claim 2.
4. The step of attaching the set of virtual disks to the guest by a hypervisor for the guest. Furthermore, The aforementioned storage is a physical storage device. The computer implementation method according to claim 3.
5. The step of creating the set of virtual disks using the plurality of processor units and assigning the set of virtual disks to the guest: The step involves the creation of a set of virtual disk image files in the storage by the aforementioned plurality of processor units, wherein the set of virtual disk image files is for the set of virtual disks. The computer implementation method according to claim 1, including the method described in claim 1.
6. The step of creating the set of virtual disks using the plurality of processor units and assigning the set of virtual disks to the guest: The step involves updating the guest configuration of the hypervisor for the guest using the multiple processor units, wherein the hypervisor uses the guest configuration to attach the set of virtual disks to the guest. The computer implementation method according to claim 1, including the method described in claim 1.
7. The step of creating the set of virtual disks with the plurality of processor units and assigning the set of virtual disks to the guest: The steps include the creation of a set of virtual disk image files in the storage by the plurality of processor units, wherein the set of virtual disk image files is for the set of virtual disks; and The step involves updating the guest configuration of the hypervisor for the guest using the multiple processor units, wherein the hypervisor uses the guest configuration to attach the set of virtual disks to the guest. The computer implementation method according to claim 1, including the method described in claim 1.
8. The steps include detecting the resizing of the storage using the plurality of processor units; and The step of updating the guest configuration for the guest using the plurality of processor units to reflect the resizing of the set of virtual disks. A computer implementation method according to any one of claims 1 to 7, further comprising the above.
9. The plurality of processor units detect the resizing of the storage, where the resizing adds a storage device to the storage; and The step involves the plurality of processor units creating a new set of virtual disks for the storage device through a new atomic operation and allocating the new set of virtual disks to the guest. A computer implementation method according to any one of claims 1 to 7, further comprising the above.
10. The plurality of processor units detect the resizing of the storage, and the resizing removes the storage device from the storage; The step of removing multiple virtual disks having multiple virtual disk image files located in the storage device using the multiple processor units; and The step of unmounting the set of partitions for the storage by the multiple processor units. A computer implementation method according to any one of claims 1 to 7, further comprising the above.
11. The step of detecting the detachment of the storage by the plurality of processor units; and The steps include updating the guest configuration for the guest using the plurality of processor units to remove the set of virtual disks in response to detecting the detachment of the storage; and The step of unmounting the storage from the set of mount points by the plurality of processor units. A computer implementation method according to any one of claims 1 to 7, further comprising the above.
12. Multiple processor units, where the multiple processor units are: Procedure for detecting storage attachments to the host operating system; Procedure for mounting the aforementioned storage to a set of mount points; and A procedure for creating a set of virtual disks using an atomic operation and assigning the set of virtual disks to a guest. Execute program instructions to perform the task. A computer system equipped with the following features.
13. The aforementioned multiple processor units: A procedure for creating a set of partitions for the set of virtual disks before mounting the storage; and Before mounting the storage, a procedure for creating a set of file systems in the set of partitions for the set of virtual disks, wherein the set of virtual disk image files is for the set of virtual disks and is located in the set of file systems. The computer system according to claim 12, which executes the program instructions for performing the above.
14. When the plurality of processor units mount the storage to the set of mount points, the plurality of processor units: Execute the program instructions for mounting the set of file systems in the set of partitions to the set of mount points. The computer system according to claim 13.
15. In the step of creating a set of virtual disks and assigning the set of virtual disks to the guest, the plurality of processor units: A procedure for creating a set of virtual disk image files in the aforementioned storage, wherein the set of virtual disk image files is for the set of virtual disks; and A procedure for updating the guest configuration of the hypervisor for the guest, wherein the hypervisor uses the guest configuration to attach the set of virtual disks to the guest. The computer system according to claim 12, which executes the program instructions for performing the above.
16. The aforementioned multiple processor units: A procedure for detecting the resizing of the aforementioned storage; and A procedure to update the guest configuration for the aforementioned guest to reflect the resizing of the set of virtual disks. A computer system according to any one of claims 12 to 15, which executes the program instructions for performing the above.
17. The aforementioned multiple processor units: A procedure for detecting the resizing of the storage; a procedure for adding a storage device to the storage as a result of the resizing; and A procedure to create a new set of virtual disks for the storage device through a new atomic operation and to assign the new set of virtual disks to the guest. A computer system according to any one of claims 12 to 15, which executes the program instructions for performing the above.
18. The aforementioned multiple processor units: A procedure for detecting the resizing of the storage, wherein the resizing removes a storage device from the storage; A procedure for removing multiple virtual disks having multiple virtual disk image files located in the aforementioned storage device; and Procedure for unmounting the set of partitions for the aforementioned storage A computer system according to any one of claims 12 to 15, which executes the program instructions for performing the above.
19. The aforementioned multiple processor units: A procedure for detecting the detachment of the storage; and A procedure for updating the guest configuration for the guest to remove the set of virtual disks in response to detecting the detachment of the storage; and Procedure for unmounting the aforementioned storage from the set of mount points A computer system according to any one of claims 12 to 15, which executes the program instructions for performing the above.
20. A computer program for managing virtual disks, which is installed on a computer system: A procedure for detecting storage attachments to the host operating system using multiple processor units; A procedure for mounting the storage to a set of mount points using the plurality of processor units; and The procedure involves creating a set of virtual disks by atomic operation using the aforementioned multiple processor units, and then assigning the set of virtual disks to a guest. A computer program designed to execute something.
21. To the aforementioned computer system: A procedure for creating a set of partitions for the set of virtual disks by the plurality of processor units before mounting the storage; The procedure for creating a set of file systems in the set of partitions for the set of virtual disks before mounting the storage by the multiple processor units, wherein the set of virtual disk image files is for the set of virtual disks and is located in the set of file systems. A computer program according to claim 20 for further execution.
Citation Information
Patent Citations
A method and system for dynamic expansion of logical volumes based on LVM
CN106168885B
Dynamically expandable and contractible fault-tolerant storage system with virtual hot spare
JP2011198383A
Methods, systems, and computer programs for data migration.
JP2015519667A
Virtual network interface object
JP2016136740A
System and method for converting a physical disk to a virtual disk
US20150012570A1