File-based Virtual Disk Management

The virtual disk manager employs atomic operations to securely and efficiently manage virtual disks, addressing issues of orphaned disks and attachment vulnerabilities, thereby improving virtual disk management in guest virtual machines.

JP2024539856AActive Publication Date: 2024-10-31INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2024521192
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-11-04
Filing Date
2022-11-01
Publication Date
2024-10-31
Estimated Expiration
2042-11-01

AI Technical Summary

Technical Problem

Existing systems face challenges in efficiently managing virtual disks for guest virtual machines, particularly in detecting and managing changes to storage devices, which can lead to orphaned or improperly attached disks, and are vulnerable to man-in-the-middle attacks.

Method used

A virtual disk manager operates using atomic operations to detect storage changes and manage virtual disks, ensuring they are created, attached, resized, or detached without interruption, thereby preventing orphaned disks and ensuring secure attachment to the intended guest.

Benefits of technology

This approach enhances the accuracy and security of virtual disk management by reducing the risk of orphaned disks and man-in-the-middle attacks, while optimizing resource utilization and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024539856000001_ABST
    Figure 2024539856000001_ABST
Patent Text Reader

Abstract

A computer implemented method manages virtual disks, where a plurality of processing units detects attachment of storage to a host operating system, where the plurality of processing units mounts the storage to a set of mount points, where the plurality of processing units creates a set of virtual disks and assigns the set of virtual disks to a guest in an operation where instructions for the operation are executed by the plurality of processing units without interruption. According to another exemplary embodiment, a computer system and computer program product for managing virtual disks are provided.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates generally to improvements in computer systems, and more particularly, to methods, apparatus, computer systems, and computer program products for managing virtual storage for virtual machines. [Background technology]

[0002] A hypervisor can create and run virtual machines. The hypervisor allows a host computer to support multiple guest virtual machines by virtually sharing resources such as memory, storage, and processors. For example, the hypervisor can provide the guest virtual machines access to a hard disk on the host computer using a disk image file, also referred to as a virtual disk image file.

[0003] A virtual disk is a file on the host computer that appears in a guest virtual machine as a physical disk drive to the guest operating system. The hypervisor can attach and detach virtual disks to a guest virtual machine. When a physical storage device is removed, the hypervisor can unmount the disk image. In a similar manner, when the physical storage is resized, the virtual disk can be resized, or other operations such as creating or deleting virtual disks can occur. Summary of the Invention

[0004] According to one exemplary embodiment, a computer implemented method manages virtual disks. A plurality of processing units detects attachment of storage to a host operating system. The plurality of processing units mounts the storage to a set of mount points. The plurality of processing units creates a set of virtual disks and assigns the set of virtual disks to a guest in an operation where instructions for the operation are executed by the plurality of processing units without interruption. According to another exemplary embodiment, a computer system and computer program product for managing virtual disks are provided. [Brief description of the drawings]

[0005] [Figure 1] FIG. 1 illustrates a cloud computing environment in which exemplary embodiments may be implemented.

[0006] [Diagram 2] FIG. 1 is an illustration of abstraction model layers in accordance with an illustrative embodiment.

[0007] [Diagram 3] 1 is a pictorial representation of a network of data processing systems in which an illustrative embodiment may be implemented.

[0008] [Figure 4] 1 is a block diagram of a virtual disk management environment in accordance with an illustrative embodiment.

[0009] [Diagram 5] FIG. 4 is a message flow diagram illustrating attaching a virtual disk to a guest operating system according to an example embodiment.

[0010] [Figure 6] FIG. 4 is a message flow diagram illustrating removal of a virtual disk from a guest operating system in accordance with an example embodiment.

[0011] [Figure 7] FIG. 4 is a message flow diagram for resizing a virtual disk for a guest operating system according to an example embodiment.

[0012] [Figure 8] 1 is a flowchart of a process for managing virtual disks in accordance with an illustrative embodiment.

[0013] [Figure 9] 1 is a flowchart of a process for managing virtual disks in accordance with an illustrative embodiment.

[0014] [Figure 10] 1 is a flowchart of a process for mounting storage in accordance with an illustrative embodiment.

[0015] [Figure 11] 4 is a flowchart of a process for creating and allocating virtual disks in an atomic operation in accordance with an example embodiment.

[0016] [Figure 12] 1 is a flowchart of a process for managing virtual disks in accordance with an illustrative embodiment.

[0017] [Figure 13] 1 is a flowchart of a process for managing virtual disks in accordance with an illustrative embodiment.

[0018] [Figure 14] 1 is a flowchart of a process for managing virtual disks in accordance with an illustrative embodiment.

[0019] [Figure 15] 1 is a flowchart of a process for managing virtual disks in accordance with an illustrative embodiment.

[0020] [Figure 16] 1 is a block diagram of a data processing system in accordance with an illustrative embodiment; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0021] The present invention may be a system, method and / or computer program product integrated at any possible level of technical detail. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions for causing a processor to implement aspects of the present invention.

[0022] A computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, 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 above. A non-exhaustive list of more specific examples of computer readable storage media includes the following: portable computer diskettes, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), static random access memories (SRAMs), portable compact disk read-only memories (CD-ROMs), digital versatile disks (DVDs), memory sticks, floppy disks, punch cards or mechanically encoded devices such as ridge structures in grooves with instructions recorded thereon, and any suitable combination of the above. Computer-readable storage medium, as used herein, should not be construed as a transitory signal per se, such as electric waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted over electrical wires.

[0023] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to the respective computing / processing device or to an external computer or 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 comprise copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and transfers the computer-readable program instructions for storage in the computer-readable storage medium in the respective computing / processing device.

[0024] The computer readable program instructions for carrying out the operations of the present invention may be either assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or source or object code written in any combination of one or more programming languages, including object oriented programming languages ​​such as Smalltalk, C++ or similar, and procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer readable program instructions may execute 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 the connection may be to an external computer (e.g., through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) may execute computer readable program instructions to personalize the electronic circuitry by utilizing state information of the computer readable program instructions to perform aspects of the invention.

[0025] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0026] These computer readable program instructions may be provided to a processor of a computer or other programmable data processing apparatus to produce a machine, whereby the instructions, executed via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. These computer readable program instructions, which can direct a computer, programmable data processing apparatus, and / or other device to function in a particular manner, may be stored on a computer readable storage medium, such that a computer readable storage medium having instructions stored thereon comprises an article of manufacture including instructions that implement aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0027] Furthermore, computer-readable program instructions may be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be executed on the computer, other programmable apparatus, or other device to produce a computer-implemented process, such that the instructions executing on the computer, other programmable apparatus, or other device implement the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.

[0028] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams 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 noted in the blocks may occur in a different order than that noted in the figures. For example, two blocks shown in succession may in fact be realized as one step and may be executed simultaneously, substantially simultaneously, partially or fully in a time-overlapping manner, or the blocks may possibly be executed in the reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowchart diagrams, and combinations of blocks in the block diagrams and / or flowchart diagrams, may be implemented by a dedicated hardware-based system that executes the specified functions or operations, or executes a combination of dedicated hardware and computer instructions.

[0029] Thus, the exemplary embodiments provide methods, apparatus, systems, and computer program products for automatically encrypting sensitive data. In the exemplary embodiments, the sensitive data may be obtained from a location identified in configuration information. The sensitive data may be automatically encrypted using the configuration information and stored during deployment of a container for an application. The exemplary embodiments also recognize and take into account that modifications of the sensitive data may be detected and the sensitive data may be automatically encrypted and automatically deployed for use by a container for an application. This detection of modifications of the sensitive data may be detected using a checksum.

[0030] Although this disclosure includes detailed descriptions of cloud computing, it should be understood that implementation of the teachings described herein is not limited to a cloud computing environment. Rather, embodiments of the invention can be implemented in conjunction with any other type of computing environment now known or later developed.

[0031] 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 can be rapidly provisioned and released with minimal administrative effort or interaction with the service provider. The cloud model can 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 capacity, such as server time and network storage, automatically as needed without requiring human interaction with the provider of the service.

[0034] Broad Network Access: Functionality that facilitates use by heterogeneous thin or thick client platforms (eg, cell phones, laptops and PDAs) is available over the network and accessed through standard mechanisms.

[0035] Resource Pool: Provider computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically allocated and reallocated according to demand. There is location independence in that consumers generally have no control or knowledge over the exact location of the provided resources, but it may be possible to specify the location at a higher level of abstraction (e.g., country, state, or data center).

[0036] Rapid Elasticity: Capabilities can be rapidly and elastically provisioned, in some cases automatically, to quickly scale out, and rapidly released to quickly scale in. To the consumer, the capabilities available for provisioning often appear unlimited and can be purchased in any quantity at any point in time.

[0037] Metered Services: Cloud systems automatically control and optimize resource usage by leveraging metering capabilities at a level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency to both providers and consumers of the services utilized.

[0038] The service model is as follows:

[0039] Software as a Service (SaaS): The functionality offered to the consumer is the use of a provider's applications running on a cloud infrastructure. The applications are accessible from a variety of client devices through thin-client interfaces such as web browsers (e.g., web-based email). The consumer does not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, 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 the consumer is the deployment of applications created or acquired by the consumer, written using programming languages ​​and tools supported by the provider, onto a cloud infrastructure. The consumer does not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but does have control over the deployed applications and, in some cases, the application hosting environment configuration.

[0041] Infrastructure as a Service (IaaS): The functionality offered to the consumer is to provision processing, storage, networking, and other basic computing resources on which the consumer can deploy and run any software, which may include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure, but does have control over the operating systems, storage, deployed applications, and possibly limited control over selected networking components (e.g., host firewalls).

[0042] The deployment model is as follows:

[0043] Private Cloud: The cloud infrastructure is operated solely for an organization. It may be managed by the organization or a third party and may exist on-premise or off-premise.

[0044] Community Cloud: Cloud infrastructure is shared by several organizations to support a particular community with shared concerns (e.g., mission, security requirements, policies, and compliance considerations). It may be managed by the organizations or a third party and may exist on-premise or off-premise.

[0045] Public Cloud: The cloud infrastructure is made available to the general public or large industry organizations and is owned by organizations that sell cloud services.

[0046] Hybrid Cloud: A cloud infrastructure is a composite of two or more clouds (private, community, or public) that remain unique entities but are bound together by standardized or proprietary technologies (e.g., cloud bursting for load balancing between clouds) that enable data and application portability.

[0047] Cloud computing environments are service-oriented with an emphasis on statelessness, low coupling, modularity, and semantic interoperability. At the heart of cloud computing is an infrastructure that includes a network of interconnected nodes.

[0048] 1, a diagram illustrating a cloud computing environment in which an exemplary embodiment may be implemented is shown. In this illustrative example, cloud computing environment 100 includes a set of one or more cloud computing nodes 110 with which local computing devices used by cloud consumers, such as, for example, a personal digital assistant or smartphone 120A, a desktop computer 120B, a laptop computer 120C, and / or an automobile computer system 120N, may communicate.

[0049] Cloud computing nodes 110 may communicate with one or more networks and with each other, and may be physically or virtually grouped into one or more networks, such as the private, community, public, or hybrid clouds described above, or combinations thereof. This enables cloud computing environment 100 to provide infrastructure, platform, and / or software as a service that does not require cloud consumers, such as local computing devices 120A-120N, to maintain resources on the local computing devices. It is understood that the types of local computing devices 120A-120N are intended as examples only, and that cloud computing nodes 110 and cloud computing environment 100 may communicate with any type of computerized device, for example, using a web browser, over any type of network and / or network addressable connection.

[0050]

[0023] Referring now to Figure 2, a diagram illustrating abstraction model layers according to an exemplary embodiment is shown. The set of functional abstraction layers shown in this illustrative 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 functions shown in Figure 2 are intended to be merely illustrative, and embodiments of the present invention are not limited thereto. As shown, the following layers and corresponding functions are provided:

[0051] Cloud computing environment abstraction layer 200 includes hardware and software layer 202, virtualization layer 204, management layer 206, and workload layer 208. Hardware and software layer 202 includes hardware and software components of the cloud computing environment. The hardware components may include, for example, mainframe 210, reduced instruction set computer (RISC) architecture based servers 212, servers 214, blade servers 216, storage devices 218, and network and networking components 220. In some exemplary embodiments, the software components may include, for example, network application server software 222 and database software 224.

[0052] The virtualization layer 204 provides an abstraction layer over which examples of virtual entities, namely virtual servers 226, virtual storage 228, virtual networks including virtual private networks 230, virtual applications and operating systems 232, and virtual clients 234 may be provided.

[0053] In one example, management layer 206 may provide the functionality described below: Resource provisioning 236 provides dynamic procurement of computing resources and other resources utilized to execute tasks within a cloud computing environment. In this illustrative example, virtual disk management 237 in resource provisioning may manage resources in the form of virtual disks.

[0054] Metering and pricing 238 provides cost tracking as resources are utilized within the cloud computing environment and accounting or billing for the consumption of these resources. In one example, these resources may include application software licenses. Security provides identity verification of cloud consumers and tasks, and protection of data and other resources. User portal 240 provides access to the cloud computing environment for consumers and system administrators. Service level management 242 provides cloud computing resource allocation and management so that required service levels are met. Service level agreement (SLA) planning and fulfillment 244 provides advance provisioning and procurement of cloud computing resources for anticipated future needs according to SLAs.

[0055] The workload layer 208 provides examples of functions for which a cloud computing environment may be utilized. Exemplary workloads and functions that may be provided by the workload layer 208 may include mapping and navigation 246, software development and lifecycle management 248, virtual classroom instructional delivery 250, data analytics processing 252, transaction processing 254, and container orchestration 256.

[0056] The exemplary embodiments recognize and take into account a number of different considerations. For example, the exemplary embodiments recognize and take into account that if a hypervisor does not provide or support pass-through or partial virtualization of storage devices, it can be difficult to manage the lifecycle of available storage devices for use by nested virtualized guests. The exemplary embodiments recognize and take into account attach, detach, and update lifecycles. The exemplary embodiments recognize and take into account that it is desirable to automate the discovery process of attached storage devices for use by guests running under a hypervisor. The exemplary embodiments recognize and take into account that automating this process can include using disk image files that are compatible with the hypervisor.

[0057] 3, a pictorial representation of a network of data processing systems in which an exemplary embodiment may be implemented is shown. Network data processing system 300 is a network of computers in which an exemplary embodiment may be implemented. Network data processing system 300 includes network 302. Network 302 is the medium used to provide communications links between various devices and computers connected together within network data processing system 300. Network 302 may include connections, such as wired or wireless communication links, or fiber optic cables.

[0058] In the illustrated example, server computer 304 and server computer 306 are connected to network 302 along with storage unit 308. Additionally, client device 310 is connected to network 302. As shown, client devices 310 include client computer 312, client computer 314, and client computer 316. Client devices 310 may be, for example, computers, workstations, or network computers. In the illustrated example, server computer 304 provides information to client device 310, such as boot files, operating system images, and applications. Additionally, client devices 310 may include other types of client devices, such as mobile phone 318, tablet computer 320, and smart glasses 322. In this illustrative example, server computer 304, server computer 306, storage unit 308, and client device 310 are network devices connected to network 302, where network 302 is the communication medium for these network devices. Some or all of client devices 310 may form an Internet of Things (IoT). In the IoT, these physical devices connect to a network 302 over which they can exchange information with each other.

[0059] In this example, client device 310 is a client of server computer 304. Network data processing system 300 may include additional server computers, client computers, and other devices not shown. Client device 310 connects to network 302 using at least one of a wired connection, an optical fiber connection, or a wireless connection.

[0060] Program code located within network data processing system 300 may be stored on a computer recordable storage medium and downloaded to a data processing system or other device for use. For example, program code may be stored on a computer recordable storage medium on server computer 304 and downloaded over network 302 to client device 310 for use on client device 310.

[0061] In the depicted example, network data processing system 300 is the Internet with network 302 representing a worldwide collection of networks and gateways that communicate with one another using a suite of protocols called 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 that route data and messages. Of course, network data processing system 300 may also be implemented using a number of different types of networks. For example, network 302 may be comprised of at least one of 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 for different illustrative embodiments.

[0062] As used herein, "plurality," when used in reference to an item, means one or more of the item. For example, "plurality of different types of networks" is one or more different types of networks.

[0063] Furthermore, the phrase "at least one of," when used in conjunction with a list of items, means that one or more different combinations of the listed items may be used, and that only one of each item included in the list may be required. In other words, "at least one of" means that any combination of the items and number of items in the list may be used, but not all items in the list are required. An item may be a particular object, thing, or category.

[0064] For example, without limitation, "at least one of item A, item B, or item C" may include item A, item A and item B, or item B. This example may also include item A, item B, and item C, or item B and item C. Of course, any combination of these items may be present. In some illustrative examples, "at least one of" may be, for example, without limitation, 2 items A, 1 item B, 10 items C, 4 items B, and 7 items C, or other suitable combinations.

[0065] As shown, virtual disk manager 330 operates on server computer 304 with hypervisor 332 to manage virtual disks 334 for guest virtual machines 336 using block storage 338. In this illustrative example, block storage 338 is physical storage including one or more physical storage devices. These physical devices store data in bytes that are blocked or grouped into segments, each with their own entrance. In other examples, block storage 338 may be virtual storage.

[0066] Virtual disk manager 330 can create and assign virtual disks 334 to guest virtual machines 336. In this illustrative example, creation of virtual disk 334 occurs when the existence of block storage 338 is discovered. This discovery can be performed in a number of different ways. For example, discovery of block storage 338 can be performed using event-driven notifications or queries.

[0067] As shown, hypervisor 332 attaches virtual disk 334 to guest virtual machine 336 as allocated by virtual disk manager 330. Virtual disk 334 is viewed by guest virtual machine 336 with the characteristics and format expected and used by guest virtual machine 336. The characteristics may include, for example, format, size, or capacity, or other characteristics that make virtual disk 334 appear like an actual physical device.

[0068] Virtual disk manager 330 may also operate to remove virtual disks 334 when block storage 338 is removed or lost. This condition may be detected using event-driven notification or scheduled queries. Virtual disk manager 330 may notify hypervisor 332 that a virtual disk is to be removed from use by guest virtual machine 336. As another example, virtual disk manager 330 may also add, remove, or resize virtual disks 334 in response to a resize of block storage 338.

[0069] The illustration of managing virtual disk 334 is an example of one implementation for managing virtual disks for guest virtual machine 336. In other illustrative examples, virtual disk manager 330 may manage one or more virtual disks for a single guest virtual machine. In yet another illustrative example, there may be more than one block storage.

[0070] 4, a block diagram of a virtual disk management environment is shown in accordance with an illustrative embodiment. In this illustrative example, virtual disk management environment 400 includes components that may be implemented in hardware, such as the hardware shown in cloud computing environment 100 in FIG. 1 or network data processing system 300 in FIG.

[0071] In this illustrative example, virtual disk management system 402 in virtual disk management environment 400 comprises several different components. As shown, virtual disk management system 402 comprises computer system 404 and virtual disk manager 406. Virtual disk manager 406 is located within computer system 404.

[0072] Virtual disk manager 406 may be implemented in software, hardware, firmware, or a combination thereof. If software is used, the operations performed by 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 virtual disk manager 406 may be implemented in program instructions and data stored in persistent memory for running on a processor unit. If hardware is used, the hardware may include circuitry that operates to perform the operations in virtual disk manager 406.

[0073] In illustrative examples, the hardware may take the form of at least one selected from 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 a plurality of operations. In a programmable logic device, the device may be configured to perform a plurality of operations. The device may be reconfigured at a later time or may be permanently configured to perform a plurality of 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 processes may be implemented in organic components integrated with inorganic components, or may be entirely composed of organic components to the exclusion of humans. For example, these processes may be implemented as circuits in organic semiconductors.

[0074] Computer system 404 is a physical hardware system and includes one or more data processing systems. When more than one data processing system is present in computer system 404, the 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 some other suitable data processing system.

[0075] As shown, the computer system 404 includes multiple processor units 408 capable of executing program instructions 410 that implement the processes in the illustrative example. As used herein, a processor unit in the multiple processor units 408 is a hardware device and is comprised of hardware circuits, such as hardware circuits on an integrated circuit, that respond to and process instructions and program code to operate a computer. When the multiple processor units 408 execute the program instructions 410 for a process, the multiple processor units 408 are one or more processor units that may be on the same computer or different computers. In other words, a process can be distributed among processor units on the same or different computers in a computer system. Furthermore, the multiple processor units 408 can be the same type or different types of processor units. For example, the multiple processor units can be selected from 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 some 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 a number of different ways. For example, discovery can use event-driven notifications to initiate discovery of storage devices or can involve the use of scheduled queries to initiate discovery of block storage. Storage 412 can be virtual storage. For example, storage 412 can be virtual storage in a nested virtualization system.

[0077] In this illustrative example, storage 412 exists when storage 412 is attached to host operating system 414. Storage 412 may take a number of 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 some other suitable type of storage architecture. The storage devices in storage 412 may be selected from at least one of hard disk drives, solid state disk drives, or other suitable types of storage devices.

[0078] In response to storage 412, virtual disk manager 406 mounts storage 412 on a set of mount points 416. In this illustrative 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] Prior to mounting the 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 file systems 422 in the set of partitions 418 for the set of virtual disks 420 prior to mounting the storage 412. To mount the storage on the set of mount points 416, the set of file systems 422 in the set of partitions 418 are mounted to the set of mount points 416 by the virtual disk manager 406. In this illustrative example, a set of virtual disk image files 424 are for the set of virtual disks 420 and are located in the set of file systems 422.

[0080] Virtual disk manager 406 creates a set of virtual disks 420 and assigns the set of virtual disks 420 to guest 426 in operation 428, in which instructions for the atomic operation are executed without interruption. In this illustrative example, operation 428 is an atomic operation 429. In other words, the instructions to create and assign virtual disks 420 are executed without other intervening instructions being processed for other operations that are not part of the atomic operation. For example, operation 428 can create and assign the set of virtual disks 420 without being interrupted by other steps or operations being executed that may affect the creation and assignment of the set of virtual disks 420 to guest 426.

[0081] For example, instructions for performing a step in operation 428 are executed without instructions for other steps or operations that are not part of operation 428 being executed in a manner that affects the creation and allocation of the set of virtual disks 420. In another illustrative example, operation 428 may also include attaching the set of virtual disks 420 to guest 426. In this illustrative 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] Creating 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 there is a single virtual disk in the set of virtual disks 420, then there is a single virtual disk image in the set of virtual disk image files 424.

[0083] The allocation of the set of virtual disks 420 to the guest 426 may be done by updating the guest configuration 430 of the hypervisor 432 for the guest 426. The hypervisor 432 may use the guest configuration 430 attached to the set of virtual disks 420 guest 426.

[0084] In this illustrative example, hypervisor 432 is a component that can run one or more virtual machines, which are referred to as guests or guest virtual machines. Hypervisor 432 may be comprised of at least one of software, firmware, or hardware. In this illustrated example, guest configuration 430 is a configuration file that includes information identifying a configuration for guest 426. For example, 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 illustrative example, a partition in the set of partitions 418 may have one or more of the set 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 of the set of virtual disk image files 424.

[0086] Additionally, if more than one virtual disk image file is present in the set of virtual disk image files 424, the 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 operations 429 provides at least one of improved accuracy or security in providing virtual disks 420 to guests. Additionally, the use of atomic operations 429 reduces the likelihood of man in the middle attacks (MITM) and avoids orphaned virtual disks. For example, placing the set of virtual disks 420 in a pool or waiting to allocate the set of virtual disks 420 at a later time may result in a different guest than guest 426 being attached to the set of virtual disks 420.

[0088] In addition to creating and assigning the set of virtual disks 420 to the guest 426, the virtual disk manager 406 may also perform other operations in managing the set of virtual disks 420. For example, the virtual disk manager 406 may detect a resize 434 of the storage 412. In response to detecting the resize 434, the virtual disk manager 406 may update the guest configuration 430 for the guest 426 to reflect the resize 434 of the set of virtual disks 420.

[0089] In one illustrative example, virtual disk manager 406 detects a resize 434 of storage 412 that results in storage devices 436 being added to storage 412. In this instance, virtual disk manager 406 creates a new set of virtual disks 438 for storage devices 436 and assigns 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 illustrative example, virtual disk manager 406 detects a resize 434 of storage 412 that causes a storage device 436 to be removed from storage 412. In response to the resize 434, virtual disk manager 406 removes the plurality of virtual disks 420 having the plurality of virtual disk image files 442 located on storage device 436. Virtual disk manager 406 also unmounts the set of partitions 418 for storage 412 that correspond to storage device 436.

[0091] In yet another illustrative example, virtual disk manager 406 detects a detachment of storage 412. In this illustrative example, detachment of storage 412 means that an event is detected in which storage 412 is removed, missing, or otherwise inaccessible. In response to detecting the detachment of storage 412, virtual disk manager 406 updates guest configuration 430 for guest 426 to remove the set of virtual disks 420. In this case, virtual disk manager 406 unmounts storage 412 from the set of mount points 416.

[0092] Computer system 404 can be configured to perform at least one of the steps, operations, or actions described in the different illustrative examples using software, hardware, firmware, or a combination thereof. As a result, computer system 404 operates as a dedicated computer system within computer system 404 that allows virtual disk manager 406 to manage virtual disks in a virtual disk environment that are not orphaned or exposed prior to being attached to a guest. In particular, virtual disk manager 406 transforms computer system 404 into a dedicated computer system compared to currently available general-purpose computer systems that do not have virtual disk manager 406.

[0093] In an illustrative example, the use of virtual disk manager 406 in computer system 404 integrates the process into the actual application for managing virtual disks, thereby increasing the performance of computer system 404. In other words, virtual disk manager 406 in computer system 404 is directed to the actual application of the process of managing virtual disks within virtual disk manager 406 in computer system 404, including creating and allocating virtual disks to guests in a manner that does not leave the virtual disks exposed, or to pools where the virtual disks may be used for other purposes besides attaching to guests. In this illustrative example, virtual disk manager 406 in computer system 404 intervenes during the creation and allocation of virtual disks, where the creation and allocation of virtual disks is performed using atomic operations that do not result in other operations that may involve the virtual disks.

[0094] In this way, the virtual disk manager 406 in the computer system 404 provides a practical application of the method of the present invention so that the functionality of the computer system 404 is improved. In one or more of the different illustrative examples, when a storage device is attached, a process of preparing the disk (physical / virtual) occurs, where a virtual disk image file is created and mounted via the hypervisor for use by the guest. When a storage device is detached, a process of unmounting the disk image file via the hypervisor occurs, including any additional cleanup for the host operating system. When a storage device is resized, the virtual disk can either be resized accordingly by resizing the virtual disk image file, or managed via creation or deletion of the virtual disk by creating or deleting the virtual disk image file.

[0095] The illustration of virtual disk management environment 400 in FIG. 4 is not meant to suggest physical or architectural limitations to the manner in which an illustrative embodiment may be implemented. Other components in addition to or in place of those shown may be used. Some components may be required. Also, the blocks are presented to illustrate some functional components. One or more of these blocks may be combined, divided, or combined or divided into different blocks when implemented in an illustrative embodiment.

[0096] For example, virtual disk manager 406 may operate to manage virtual disks for one or more hypervisors in addition to or instead of hypervisor 432. As another illustrative example, there may be one or more guests in addition to guest 426 that are provided with virtual disks by virtual disk manager 406 via hypervisor 432. In another illustrative example, virtual disk manager 406 may be part of a storage controller currently used to manage access to storage 412.

[0097] 5 through 7 are message flow diagrams illustrating management of virtual disks for guest operating systems. In an illustrative example, the messages may be at least one of data, extracts, commands, and electrical signals or other suitable types of signals that may be used in a message.

[0098] Referring first to Figure 5, a message flow diagram is shown illustrating attaching a virtual disk to a guest operating system, according to an exemplary embodiment. In this depicted example, block storage 500 is an example of storage 412 shown in Figure 4. In this illustrative example, block storage 500 attaches to host operating system 502 (message m1).

[0099] There is a discovery phase in which event-driven notifications or queries from the virtual disk manager 504 to the host operating system 502 may be used to initiate discovery of the 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 a discovery process performed by the host operating system 502 (message m3). The virtual disk manager 504 examines the list of block storage devices received from the host operating system 502 to determine whether new block storage devices exist or whether changes have occurred to the block storage devices attached to the host operating system 502. In this example, the attachment of the block storage 500 is identified by examining the list of block storage devices received from the host operating system 502.

[0100] Upon detecting the attachment of block storage 500, virtual disk manager 504 sends a message to host operating system 502 to prepare a partition and file system for block storage 500 (message m4). If block storage 500 is already prepared with a partition and file system for a virtual disk, this step may be skipped.

[0101] Virtual disk manager 504 sends a message to host operating system 502 to mount the partition of the block storage so that it is accessible to host operating system 502 and guest operating system 506 (message m5). In an illustrative example, guest operating system 506 is an operating system running in a virtual machine. In contrast, 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. With nested virtualization, host operating system 502 may be a guest operating system of another hypervisor running in a virtual machine.

[0102] In this illustrative example, virtual disk manager 504 performs atomic operations 508. In this illustrative example, atomic operations 508 include executing instructions to perform steps including creating a virtual disk and allocating the virtual disk to guest operating system 506. In creating a virtual disk, a virtual disk image file is created that is compatible with or usable by hypervisor 510. This creation of the virtual disk image file is the beginning of atomic operations 508. If a virtual disk image already exists in partition and block storage 500, this step in atomic operations 508 may be omitted.

[0103] In allocating the virtual disk for guest operating system 506, atomic operation 508 updates guest configuration 512. This update is performed (message m6) to include a new virtual disk image for the virtual disk for use by guest operating system 506. In other words, the update of guest configuration 512 is part of atomic operation 508. Thus, the virtual disk creation and allocation steps in atomic operation 508 can be performed uninterrupted by other steps for processes, threads, programs, or other types of execution units that may be allocating or attaching a virtual disk to a guest other than guest operating system 506, which is the intended guest.

[0104] The virtual disk manager 504 may notify the hypervisor 510 that the guest configuration 512 has been updated (message m7). If auto-discovery is not performed by the hypervisor 510, this notification may not be necessary.

[0105] This update to guest configuration 512 is used by hypervisor 510 to attach the virtual disk (message m8). The virtual disk can now be used by guest operating system 506.

[0106] Referring to Figure 6, a message flow diagram illustrating removal of a virtual disk from a guest operating system is shown, according to an example embodiment. In this illustrated example, block storage 500 detaches from host operating system 502 (message n1). Detection of this detachment may be performed via event-driven notification or virtual disk manager 504 initiating discovery using a query (message n2). In this discovery process, host operating system 502 returns a list of devices to virtual disk manager 504 (message n3). 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, virtual disk manager 504 updates guest configuration 512 to remove virtual disk images for virtual disks used by guest operating system 506 (message n4). Virtual disk manager 504 notifies hypervisor 510 of the updates to guest configuration 512 (message n5). Hypervisor 510 may then detach guest operating system 506 (message n6).

[0108] In response to detecting the detachment of block storage 500, virtual disk manager 504 may send a message to host operating system 502 to unmount the partitions that were in block storage 500 (message n7).

[0109] 7, a message flow diagram for resizing a virtual disk for a guest operating system is shown, according to an example embodiment. In the illustrated example, block storage 500 is resized and a resized message is sent to host operating system 502 (message p1).

[0110] This detection of the resize may be performed via event-driven notification or via the virtual disk manager 504 initiating a discovery using a query (message p2). During 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 may parse the list of devices to determine that the block storage 500 has been resized.

[0111] The virtual disk manager 504 causes the host operating system 502 to resize the partition to the new size (message p4). If the partition resize reduces the block storage 500, one or more virtual disks may be removed to reduce the space available to the guest operating system 506. 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 in the partition, virtual disk manager 504 performs atomic operation 700 to create one or more virtual disks for the increased space resulting from the resizing of block storage 500 and allocate one or more virtual disks to guest operating system 506. Creating one or more virtual disk image files for the one or more virtual disks is the first step of atomic operation 700. The allocation of the virtual disks may be reflected by updating guest configuration 512 to include a virtual disk image for each virtual disk that has been allocated to guest operating system 506 (message p5). This update of guest configuration 512 is the second step of atomic operation 700 in this example. As shown, these two steps may be performed uninterrupted by steps for processes, threads, programs, or other types of execution units that may allocate or attach virtual disks to guests other than guest operating system 506, which is the intended guest.

[0113] In either case, the virtual disk manager 504 notifies the hypervisor 510 of the updates to the guest configuration 512 (message p6). The hypervisor 510 may attach or detach virtual disks from the guest operating systems 506 based on the addition or removal of the virtual disk image files from the guest configuration 512 (message p7).

[0114] The use of atomic operations 508 in Figure 5 and 700 in Figure 7 provides improved resource management over current techniques that place virtual disks in a pool or allow virtual disks to remain unattached for a period of time. The use of atomic operations can ensure that there are no orphaned virtual disks that could be subject to a man-in-the-middle attack (MITM), interception, or attachment to another guest operating system. Additionally, the use of atomic operations can also cause the attachment of an entire block storage device, eliminating wasted orphaned space that could remain unused.

[0115] Referring now to Figure 8, a flow chart of a process for managing virtual disks is shown, according to an exemplary embodiment. The process in Figure 8 may be implemented in hardware, software, or both. If implemented in software, the process may take the form of program instructions operated by one or more processor units located in one or more hardware devices in one or more computer systems. For example, the process may be implemented in virtual disk manager 406 in computer system 404 in Figure 4.

[0116] The process begins by detecting the attachment of storage to the host operating system (step 800). The process mounts the storage to a set of mount points (step 802).

[0117] The process creates a set of virtual disks and assigns the set of virtual disks to the guest in an operation in which instructions for the operation are executed without interruption (step 804). The process then terminates.

[0118] 9, a flowchart of a process for managing virtual disks is shown, according to an example embodiment. The steps in this flowchart are examples of additional steps that may be performed along with the steps in FIG.

[0119] The process creates a set of partitions for the set of virtual disks before mounting the storage (step 900). The process creates a set of file systems on the set of partitions for the set of virtual disks before mounting the storage, where a set of virtual disk image files are for the set of virtual disks and are located within the set of file systems (step 902). The process then terminates.

[0120] 10, a flowchart of a process for mounting storage is shown, according to an example embodiment. This flowchart is an example of an implementation for step 802 in FIG.

[0121] The process mounts the set of file systems on the set of partitions to the set of mount points, step 1000. The process then terminates.

[0122] In Fig. 11, a flowchart of a process for creating and allocating a virtual disk in an atomic operation according to an exemplary embodiment is shown. This flowchart is an example of an implementation of step 804 in Fig. 8. The steps in this flowchart are implemented in an atomic operation such that instructions for the atomic operation are executed without interruption.

[0123] The process creates a set of virtual disk image files in storage, where the set of virtual disk image files are for the set of virtual disks (step 1100). The process updates a guest configuration in the hypervisor for the guest, where the hypervisor attaches the set of virtual disks to the guest using the guest configuration (step 1102). The process then terminates.

[0124] 12, a flowchart of a process for managing virtual disks is shown, according to an example embodiment. The steps in this flowchart are examples of additional steps that may be performed in conjunction with the steps of FIG.

[0125] The process detects the resize of the storage, step 1200. The process updates the guest configuration for the guest to reflect the resize of the set of virtual disks, step 1202. The process then terminates.

[0126] 13, a flowchart of a process for managing virtual disks is shown, according to an exemplary embodiment. The steps in this flowchart are examples of additional steps that may be performed in conjunction with the steps of FIG.

[0127] The process detects a resize of the storage, which adds storage devices to the storage (step 1300). The process creates a new set of virtual disks for the storage devices and assigns the new set of virtual disks to the guest in a new atomic operation in which instructions for the new atomic operation are executed by multiple processing units without interruption (step 1302). The process then terminates.

[0128] 14, a flowchart of a process for managing virtual disks is shown, according to an exemplary embodiment. The steps in this flowchart are examples of additional steps that may be performed along with the steps of FIG.

[0129] The process detects a resize of the storage device that results in the storage device being removed from the storage, step 1400. The process removes the virtual disks having the virtual disk image files located in the storage device, step 1402.

[0130] The process unmounts the set of partitions for storage, step 1404. The process then terminates.

[0131] A flowchart of a process for managing virtual disks according to an exemplary embodiment is shown in Figure 15. The steps in this flowchart are examples of additional steps that may be performed along with the steps of Figure 8.

[0132] The process detects the detachment of storage (step 1500). In response to detecting the detachment of storage, the process updates the guest configuration for the guest to remove the set of virtual disks (step 1502).

[0133] The process unmounts the storage from the set of mount points, step 1504. The process then terminates.

[0134] The flowcharts and block diagrams in the different illustrated embodiments illustrate the architecture, functionality and operation of some 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, a segment, a function, or a portion of an operation or step. For example, one or more of these blocks may be implemented as program instructions, hardware, or a combination of program instructions and hardware. If implemented in hardware, the hardware may take the form of, for example, an integrated circuit that is manufactured or configured to perform one or more operations in the flowchart or block diagram. If 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 the blocks may occur out of the order shown in the figures. For example, in some cases, two blocks shown in succession may be executed substantially simultaneously, or the blocks may be executed in reverse order, depending on the functionality involved. Also, other blocks may be added in addition to the blocks shown in a flowchart or block diagram.

[0136] 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 FIG. 1, the personal digital assistant (PDA) or smartphone 120A in FIG. 1, the desktop computer 120B, the laptop computer 120C, and / or the automobile computer system 120N. The data processing system 1600 may be used to implement the computers in the hardware and software layer 202 in FIG. 2 and the server computer 304, the server computer 306, and the client device 310 in FIG. 3. The data processing system 1600 may also be used to implement the computer system 404 in FIG. 4. In this illustrative example, the data processing system 1600 includes a communication framework 1602 that provides communication between a processor unit 1604, a memory 1606, a persistent storage 1608, a communication unit 1610, an input / output (I / O) unit 1612, and a display 1614. In this example, the communications framework 1602 takes the form of a bus system.

[0137] The processor unit 1604 functions to execute instructions for software that may be loaded into the memory 1606. The processor unit 1604 includes one or more processors. For example, the processor unit 1604 may be selected from at least one of a multi-core 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 resides on a single chip along with secondary processors. As another illustrative example, the processor unit 1604 may be a symmetric multiprocessor system including 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 pieces of hardware capable of storing information, such as, but not limited to, data, program instructions in a functional form, or other suitable information, either temporarily, permanently, or both temporarily and permanently. In these illustrative examples, storage device 1616 may also be referred to as a computer-readable storage device. Memory 1606 in these examples may be, for example, a 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), a flash memory, a rewritable optical disk, a rewritable magnetic tape, or some combination of the above. The media used by persistent storage 1608 may be removable. For example, a removable hard drive may be used for persistent storage 1608.

[0140] Communications unit 1610 in these illustrative examples provides for communication with other data processing systems or devices. In these illustrative examples, communications unit 1610 is a network interface card.

[0141] Input / output unit 1612 allows for the input and output of data to and from other devices that may be connected to data processing system 1600. For example, input / output unit 1612 may provide a connection for user input through at least one of a keyboard, a mouse, or some other suitable input device. Further, input / output unit 1612 may send output to a printer. Display 1614 provides a mechanism for displaying information to a user.

[0142] Instructions for at least one of the operating system, applications, or programs may be located in storage devices 1616, which are in communication with processor unit 1604 through communications framework 1602. The processes of the different embodiments may be executed by processor unit 1604 using computer-implemented instructions, which may be located in a memory, such as memory 1606.

[0143] These instructions are referred to as program instructions, computer usable program instructions, or computer readable program instructions, that may be read and executed by a processor in processor unit 1604. The program instructions in different embodiments may be embodied on different physical or computer readable storage media, such as memory 1606 or persistent storage 1608.

[0144] The program instructions 1618 are located in a functional form on a computer readable medium 1620 that is selectively removable and that can be loaded or transferred onto data processing system 1600 for execution by processor unit 1604. In these illustrative examples, the program instructions 1618 and the computer readable medium 1620 form a computer program product 1622. In the illustrative example, the computer readable medium 1620 is a computer readable storage medium 1624.

[0145] The computer readable storage medium 1624 is not a medium that propagates or transmits 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 to be interpreted as a transitory signal per se, such as an electric wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse passing through a fiber optic cable), or an electrical signal transmitted through a wire.

[0146] Alternatively, the program instructions 1618 may be transferred to the data processing system 1600 using a computer readable signal medium. The computer readable signal medium may be a signal, such as a propagated data signal that includes the program instructions 1618. For example, the computer readable signal medium may be at least one of an electromagnetic signal, an optical signal, or any other suitable type of signal. These signals may be transmitted over a connection, such as a wireless connection, an optical fiber cable, a coaxial cable, a wire, or any other suitable type of connection.

[0147] Additionally, as used herein, "computer readable medium 1620" may be singular or plural. For example, the program instructions 1618 may be located in a computer readable medium 1620 in the form of a single storage device or storage system. In another example, the program instructions 1618 may be located in computer readable medium 1620 distributed across multiple data processing systems. In other words, some instructions of the program instructions 1618 may be located in one data processing system while other instructions in the program instructions 1618 may be located in one data processing system. For example, a portion of the program instructions 1618 may be located in a computer readable medium 1620 in a server computer, while another portion of the program instructions 1618 may be located in a computer readable medium 1620 located in a set of client computers.

[0148] The different components illustrated for data processing system 1600 are not meant to provide architectural limitations to the manner in which different embodiments may be implemented. In some illustrative examples, one or more of the components may be incorporated into or otherwise form a part of another component. For example, memory 1606, or portions thereof, may be incorporated into processor unit 1604 in some illustrative examples. The different illustrative embodiments may be implemented in a data processing system including components in addition to or instead of those illustrated for data processing system 1600. Other components illustrated in FIG. 16 may be varied from the illustrated illustrative examples. The different embodiments may be implemented using any hardware device or system capable of running program instructions 1618.

[0149] Accordingly, exemplary embodiments of the present invention provide a computer-implemented method, computer system, and computer program product for managing virtual disks. In one exemplary example, a plurality of processing units detects the attachment of storage to a host operating system. The plurality of processing units mount the storage to a set of mount points. The plurality of processing 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 by the plurality of processing units without interruption. As a result, the use of operations in which instructions are executed without interruption, such as atomic operations, can reduce the likelihood that a virtual disk may be attached to another guest operating system rather than the designated operating system. In an exemplary example, this risk can be reduced because the creation and attachment of the virtual disks are executed without interruption by a process that may attach a disk to a different guest before the virtual disk is attached to its intended guest.

[0150] The description of the different exemplary embodiments is presented for purposes of illustration and description and is not intended to be exhaustive or limited to the disclosed forms of the embodiments. The different exemplary examples describe components that perform actions or operations. In the exemplary embodiments, the components may be configured to perform the described actions or operations. For example, the components may have a configuration or design for a structure that provides the components with the ability to perform the actions or operations described in the exemplary examples as being performed by the components. Furthermore, to the extent that the terms "includes," "including," "has," "contains," and variations thereof are used herein, such terms are intended to be inclusive in a manner similar to the term "comprises" as an open-ended transitional term, without excluding any additional or other elements.

[0151] The description of various embodiments of the present invention is presented for illustrative purposes, and the description is not intended to be exhaustive or limited to the disclosed embodiments. Not all of the embodiments include all of the features described in the illustrative examples. Furthermore, different exemplary embodiments may provide different features compared to other exemplary embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used in this specification is selected to best explain the principles of the embodiments, practical applications, or technical improvements to the technology found in the market, or to enable other skilled in the art to understand the embodiments disclosed herein.

Claims

1. 1. A computer-implemented method for managing a virtual disk, the computer-implemented method comprising: detecting, by the plurality of processing units, an attachment of storage to a host operating system; mounting, by the plurality of processing units, the storage on a set of mount points; and creating a set of virtual disks by the plurality of processor units and allocating the set of virtual disks to a guest during an operation in which instructions for the operation are executed by the plurality of processor units without interruption; A computer-implemented method comprising:

2. creating, by the plurality of processor units, a set of partitions for the set of virtual disks before mounting the storage; and creating, by the plurality of processor units, a set of file systems on the set of partitions for the set of virtual disks before mounting the storage, wherein a set of virtual disk image files are for the set of virtual disks and are located on the set of file systems. The computer-implemented method of claim 1 , further comprising:

3. mounting, by the plurality of processing units, the storage on the set of mount points, mounting, by the plurality of processor units, the set of file systems on the set of partitions on the set of mount points. The computer-implemented method of claim 2 .

4. In the operation, in which the operation is an atomic operation, creating the set of virtual disks by the plurality of processor units, and instructions for the operation are executed by the plurality of processor units without interruption, the step of allocating the set of virtual disks to a guest comprises: creating, by the plurality of processor units, a set of virtual disk image files in the storage, the set of virtual disk image files being for the set of virtual disks; and updating, by the plurality of processing units, a guest configuration of a hypervisor for the guest, where the hypervisor uses the guest configuration to attach the set of virtual disks to the guest. The computer-implemented method of claim 1 , comprising:

5. detecting, by the plurality of processor units, a resize of the storage; and updating, by the plurality of processing units, a guest configuration for the guest to reflect the resizing of the set of virtual disks. The computer-implemented method of claim 1 , further comprising:

6. detecting, by the plurality of processor units, a resize of the storage, where the resize adds a storage device to the storage; and creating, by the plurality of processor units, a new set of virtual disks for the storage device; and allocating, by the plurality of processor units, 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. The computer-implemented method of claim 1 , further comprising:

7. detecting, by the plurality of processor units, a resize of the storage, the resize causing a storage device to be removed from the storage; removing, by the processor units, a plurality of virtual disks having a plurality of virtual disk image files located on the storage device; and dismounting, by the plurality of processor units, a set of partitions for the storage. The computer-implemented method of claim 1 , further comprising:

8. detecting, by the plurality of processor units, a detachment of the storage; and updating, by the plurality of processing units, a guest configuration for the guest to remove the set of virtual disks in response to detecting the detachment of the storage; and dismounting the storage from the set of mount points by the plurality of processor units. The computer-implemented method of claim 1 , further comprising:

9. The computer-implemented method of claim 1 , wherein the guest is selected from the group consisting of an operating system, a guest operating system, and a virtual machine.

10. A plurality of processor units, said plurality of processor units comprising: detecting storage attachment to a host operating system; mounting the storage to a set of mount points; and Creating a set of virtual disks and allocating the set of virtual disks to a guest during an operation in which instructions for the operation are executed without interruption. executes program instructions to A computer system comprising:

11. The plurality of processor units: creating a set of partitions for the set of virtual disks before mounting the storage; and creating a set of file systems on the set of partitions for the set of virtual disks before mounting the storage, where a set of virtual disk image files are for the set of virtual disks and located on the set of file systems.

11. The computer system of claim 10, further comprising:

12. When mounting the storage to the set of mount points by the plurality of processor units, the plurality of processor units: executes the program instructions for mounting the set of file systems on the set of partitions to the set of mount points 12. The computer system of claim 11.

13. In the operation, in which the operation is an atomic operation and the set of virtual disks is created by the multiple processor units and instructions for the operation are executed without interruption, in the step of allocating the set of virtual disks to a guest, the multiple processor units: creating a set of virtual disk image files in the storage, the set of virtual disk image files for the set of virtual disks; and updating a hypervisor guest configuration for the guest, where the hypervisor uses the guest configuration to attach the set of virtual disks to the guest.

11. The computer system of claim 10, further comprising:

14. The plurality of processor units: detecting a resize of the storage; and updating a guest configuration for the guest to reflect the resizing of the set of virtual disks.

11. The computer system of claim 10, further comprising:

15. The plurality of processor units: detecting a resize of the storage, the resize resulting in the addition of a storage device to the storage; and creating a new set of virtual disks for the storage device and allocating the new set of virtual disks to the guest in a new atomic operation where the instructions for the new atomic operation are executed without interruption; 11. The computer system of claim 10, further comprising:

16. The plurality of processor units: detecting a resize of the storage, the resize causing a storage device to be removed from the storage; removing a plurality of virtual disks having a plurality of virtual disk image files located on the storage device; and Steps to unmount the set of partitions for the storage 11. The computer system of claim 10, further comprising:

17. The plurality of processor units: detecting the detachment of said storage; and updating a guest configuration for the guest to remove the set of virtual disks in response to detecting the detachment of the storage; and unmounting the storage from the set of mount points 11. The computer system of claim 10, further comprising:

18. 11. The computer system of claim 10, wherein the guest is selected from the group consisting of an operating system, a guest operating system, and a virtual machine.

19. 1. A computer program product for managing virtual disks, the computer program product comprising a computer readable storage medium having program instructions embodied therein, the program instructions providing to a computer system: Detecting attachment of storage to a host operating system by the plurality of processing units; mounting the storage to a set of mount points by the plurality of processing units; and A set of virtual disks is created by the plurality of processor units, and the set of virtual disks is assigned to a guest in an atomic operation in which instructions for the atomic operation are executed by the plurality of processor units without interruption. A computer program product executable by said computer system to cause said computer system to perform the method.

20. creating, by the plurality of processor units, a set of partitions for the set of virtual disks before mounting the storage; and creating, by the plurality of processor units, a set of file systems on the set of partitions for the set of virtual disks before mounting the storage, wherein a set of virtual disk image files are for the set of virtual disks and are located on the set of file systems.

20. The computer program product of claim 19, further comprising:

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