FILE-BASED VIRTUAL DISK MANAGEMENT

DE112022004357B4Active Publication Date: 2025-07-24INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
DE112022004357
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-11-04
Filing Date
2022-11-01
Publication Date
2025-07-24
Estimated Expiration
2042-11-01

Smart Images

  • Figure 00000023_0000
    Figure 00000023_0000
  • Figure 00000024_0000
    Figure 00000024_0000
  • Figure 00000025_0000
    Figure 00000025_0000
Patent Text Reader

Abstract

A computer-implemented method for managing virtual disks, the computer-implemented method comprising: detecting (800), by a number of processor units (408), an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting (802), by the number of processor units, the memory at a set of mount points (416); Creating (804), by the number of processor units, a set of virtual disks (334, 420) and assigning, by the number of processor units, the set of virtual disks to a guest (336, 426, 506) in an operation (428), wherein instructions for the operation are executed without interruption; detecting (1200), by the number of processor units, a change in the size of the memory by checking a list of block memory units received from the host operating system; Updating (1202), by the number of processor units, a guest configuration for the guest to reflect the change in size of the set of virtual disks, the guest configuration for the guest describing virtual hardware resources for the guest including a set of virtual disk image files (424) for the set of virtual disks; and Notify the hypervisor, by the number of processor units, about the update of the guest configuration file.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND1. Area:

[0001] The disclosure relates generally to an improved computer system and, more particularly, to a method, apparatus, computer system, and computer program product for managing virtual memory for virtual machines. 2. Description of the relevant state of the art:

[0002] A hypervisor can create and run virtual machines. Using 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 provide a guest virtual machine access to a hard disk on the host computer using a disk image file. The disk image file is also called a virtual disk image file.

[0003] A virtual disk is a file on the host computer that appears to be a physical disk drive to a guest operating system in a guest virtual machine. A hypervisor can attach and detach virtual disks to and from a guest virtual machine. If a physical storage unit is removed, the hypervisor can unmount the disk image. If the physical storage size is changed, the virtual disk size can be similarly changed, or other operations can occur, such as creating or deleting virtual disks.

[0004] The document US 2015 / 0 012 570 A1 relates to a method for converting a hard disk of a physical computer into a virtual hard disk for use by a virtual machine. The contents of the hard disk of the physical computer are copied to an image file, wherein the image file has a different sector-by-sector organization of the contents than the hard disk, but a logically equivalent file system organization. Hardware configuration information is then extracted from the image file. The hardware configuration information relates to the hardware of the physical computer, and based on a comparison of the extracted hardware configuration information and a virtual hardware configuration of the virtual machine, hardware-dependent files in the image file are replaced with replacement files compatible with the virtual hardware configuration of the virtual machine.

[0005] The Wikipedia entry "Partition (disk)" concerns a partitioning of drives (partition (disk). In: Wikipedia, the free encyclopedia. Edited on November 28, 2020, 1:15 a.m. URL: https: / / de.wikipedia.org / w / index.php?title=Partition_(Datentr%C3%A4ger)&oldid=2060025 76) SUMMARY OF THE INVENTION

[0006] The invention relates to computer systems, computer program products, and computer-implemented methods for managing virtual disks, the features of which are specified in the independent claims. Embodiments of the invention are specified in the dependent claims.

[0007] According to one illustrative embodiment, a computer-implemented method manages virtual disks. A number of processor units detects an attachment of memory to a host operating system. The number of processor units mounts the memory at a set of mount points. The number of processor units creates a set of virtual disks and, by the number of processor units, assigns the set of virtual disks to a guest in one operation, wherein instructions for the operation are executed without interruption. According to other illustrative embodiments, a computer system and a computer program product for managing virtual disks are provided. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram illustrating a cloud computing environment in which illustrative embodiments may be implemented; Fig. 2 is a diagram illustrating abstraction model layers according to an illustrative embodiment; Fig. 3 is a pictorial representation of a network of data processing systems in which illustrative embodiments may be implemented; Fig. 4 is a block diagram of a virtual disk management environment according to an illustrative embodiment; Fig. 5 is a message flow diagram illustrating attaching a virtual disk to a guest operating system according to an illustrative embodiment; Fig. 6 is a message flow diagram illustrating removal of virtual disks from the guest operating system according to an illustrative embodiment; Fig. 7 is a message flow diagram for resizing a virtual disk for a guest operating system according to an illustrative embodiment; Fig. 8 is a flowchart of a process for managing virtual disks according to an illustrative embodiment; Fig. 9 is a flowchart of a process for managing virtual disks according to an illustrative embodiment; Fig. 10 is a flowchart of a process for mounting a memory according to an illustrative embodiment; Fig. 11 is a flowchart of a process for creating and allocating virtual disks in an atomic operation according to an illustrative embodiment; Fig. 12 is a flowchart of a process for managing virtual disks according to an illustrative embodiment; Fig. 13 is a flowchart of a process for managing virtual disks according to an illustrative embodiment; Fig. 14 is a flowchart of a process for managing virtual disks according to an illustrative embodiment; Fig. 15 is a flowchart of a process for managing virtual disks according to an illustrative embodiment; and Fig. 16 is a block diagram of a data processing system according to an illustrative embodiment. DETAILED DESCRIPTION

[0008] The present invention may be a system, a method, and / or a computer program product at any possible level of technical detail integration. The computer program product may include a computer-readable storage medium (or media) with computer-readable program instructions for causing a processor to carry out aspects of the present invention.

[0009] The computer-readable storage medium may be a tangible device that can retain and store instructions for use by a device to execute instructions. The computer-readable storage medium may be, for example, but is 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 foregoing. A non-exhaustive list of more specific examples of the computer-readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM).Flash memory), a static random access memory (SRAM), a portable CD-ROM, a DVD, a memory stick, a floppy disk, a mechanically encoded device such as punched cards or raised structures in a groove on which instructions are stored, and any suitable combination of the foregoing. A computer-readable storage medium, as used herein, shall not be construed as containing transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., pulses of light carried through a fiber optic cable), or electrical signals carried through a wire.

[0010] Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to respective computing / processing units or to an external computer or storage unit 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, fiber optic transmission lines, wireless transmission, routers, firewalls, switching units, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing unit receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within the respective computing / processing unit.

[0011] Computer-readable program instructions for performing operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, integrated circuit configuration data, or either source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, or the like, 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 the 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 a wide area network (WAN), or the connection may be made to an external computer (for example, over the Internet using an Internet service provider).In some embodiments, electronic circuits, including, for example, programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute the computer-readable program instructions by utilizing state information of the computer-readable program instructions to personalize the electronic circuits to perform aspects of the present invention.

[0012] 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 should 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, may be implemented using computer-readable program instructions.

[0013] These computer readable program instructions may be provided to a processor of a computer or other programmable data processing apparatus to produce a machine, such that the instructions executing via the processor of the computer or other programmable data processing apparatus create means for implementing the functions / steps specified in the flowchart and / or block diagram block(s). These computer readable program instructions may also be stored on a computer readable storage medium capable of directing a computer, programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored thereon comprises an article of manufacture including instructions implementing aspects of the function(s) specified in the flowchart and / or block diagram block(s).implement the function / step specified in the blocks of the flow chart and / or block diagrams.

[0014] The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operations to be performed on the computer, other programmable device, or other device to produce a computer-implemented process such that the instructions executing on the computer, other programmable device, or other device implement the functions / steps specified in the block(s) of flowchart and / or block diagrams.

[0015] 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 the particular logical function(s). In some alternative implementations, the functions specified in the block may occur in a different order than shown in the figures.For example, two blocks shown in sequence may actually be performed as one step, executing simultaneously, substantially simultaneously, in a partially or completely temporally overlapping manner, or the blocks may sometimes be executed in the reverse order, depending on the functionality involved. It should further be noted that each block of the block diagrams and / or flowchart illustrations, as well as combinations of blocks in the block diagrams and / or flowchart illustrations, may be implemented by special purpose hardware-based systems that perform the specified functions or acts, or that execute combinations of special purpose hardware and computer instructions.

[0016] Thus, the illustrative embodiments provide a method, apparatus, system, and computer program product for automatically encrypting confidential data. In the illustrative embodiments, confidential data may be obtained from a storage location identified in configuration information. The confidential data may be automatically encrypted using configuration information and stored during deployment of containers to an application. The illustrative embodiments recognize and consider that changes in the confidential data may be detected, where the confidential data may be automatically encrypted and automatically deployed for use by the containers to the application. This detection of changes to confidential data may be detected using checksums.

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

[0018] Cloud computing is a service delivery model for enabling seamless, 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 management effort or interaction with a service provider. This cloud model can include at least five characteristics, at least three service models, and at least four usage models.

[0019] The properties are as follows: On-demand self-service: A cloud user can unilaterally and automatically provision data processing functions such as server time and network storage as needed, without requiring human interaction with the service provider. Broad Network Access: Functions are available over a network and accessed through standard mechanisms that support use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs). Resource Pooling: The provider's computing resources are pooled to serve multiple users using a multi-tenant model, with various physical and virtual resources dynamically allocated and reassigned as needed. There is a perceived location independence, as the user generally has no control or knowledge over the exact location of the provided resources, but may be able to specify a location at a higher level of abstraction (e.g., country, state, or data center). Rapid Elasticity: Features can be deployed quickly and elastically for rapid horizontal scaling out, in some cases automatically, and released quickly for rapid scale-in. To the user, the features available for deployment often appear unlimited, and they can be purchased in any quantity at any time. Measured Service: Cloud systems automatically control and optimize resource usage by leveraging a metering function at a certain level of abstraction appropriate for the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource consumption can be monitored, controlled, and reported, creating transparency for both the provider and the user of the service.

[0020] The service models are as follows: Software as a Service (SaaS): The functionality provided to the user is to use the provider's applications running on a cloud infrastructure. The applications are accessible from various client devices via a thin client interface such as a web browser (e.g., a web-based email). The user does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, storage, or even individual application functions, with the possible exception of limited user-specific application configuration settings. Platform as a Service (PaaS): The functionality provided to the user is to deploy applications created or obtained by the user, using programming languages and tools supported by the provider, into the cloud infrastructure. The user does not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but has control over the deployed applications and possibly over configurations of the application hosting environment. Infrastructure as a Service (IaaS): The functionality provided to the user consists of providing processing, storage, networking, and other basic computing resources, allowing the user to deploy and run any software, including operating systems and applications. The user does not manage or control the underlying cloud infrastructure, but has control over operating systems, storage, deployed applications, and potentially limited control over selected network components (e.g., host firewalls).

[0021] The usage models are as follows: Private Cloud: The cloud infrastructure is operated exclusively for an organization. It can be managed by the organization or a third party and can be located on or off-premises. Community Cloud: The cloud infrastructure is shared by multiple organizations and supports a specific community with common problems (e.g., considering objectives, security requirements, policies, and compliance). It can be managed by the organizations or a third party and can be located on-premises or off-premises. Public Cloud: The cloud infrastructure is made available to the general public or a large industry group and is owned by an organization that sells cloud services. Hybrid Cloud: The cloud infrastructure is a composition of two or more clouds (private, community, or public) that remain separate entities but are interconnected by a standardized or proprietary technology that enables data and application portability (e.g., cloud targeting for load balancing between clouds).

[0022] A cloud computing environment is service-oriented, with an emphasis on statelessness, low coupling, modularity, and semantic interoperability. At the core of cloud computing is an infrastructure comprising a network of interconnected nodes.

[0023] With reference to Fig. 1 shows a representation of a cloud computing environment in which illustrative embodiments may be implemented. In this illustrative example, a cloud computing environment 100 includes a set of one or more cloud computing nodes 110 with which local computing devices employed by users of the cloud, such as personal digital assistant or smartphone 120A, desktop computer 120B, laptop computer 120C, and / or vehicle computing system 120N, can exchange data.

[0024] The cloud computing nodes 110 can exchange data with each other and can be physically or virtually grouped into one or more networks, such as private, community, public, or hybrid clouds, as described above, or a combination thereof. Thus, the cloud computing environment 100 has the ability to offer infrastructure, platforms, and / or software as services that do not require a cloud user to maintain any resources on a local computing device, such as local computing devices 120A through 120N. It should be understood that the types of local computing devices 120A through 120N are illustrative only, and that the cloud computing nodes 110 and the cloud computing environment 100 can exchange data with any type of computerized device over any type of network and / or network-addressable connection, for example, using a web browser.

[0025] With reference to Fig. 2, a diagram illustrating abstraction model layers is shown according to an illustrative embodiment. The set of functional abstraction layers shown in this illustrative example may be used by a cloud computing environment, such as the cloud computing environment 100 in Fig. 1. It should be clear from the outset that the Fig. The components, layers, and functions shown in Figure 2 are intended to be illustrative only, and embodiments of the invention are not limited thereto. As shown, the following layers and corresponding functions are provided.

[0026] Abstraction layers of a cloud computing environment 200 include a hardware and software layer 202, a virtualization layer 204, a management layer 206, and a workload layer 208. A hardware and software layer 202 contains hardware and software components of the cloud computing environment. The hardware components may include, for example, mainframes 210, servers based on a RISC (Reduced Instruction Set Computer) architecture 212, servers 214, blade servers 216, storage devices 218, and network and networking components 220. In some illustrative embodiments, software components may include, for example, network application server software 222 and database software 224.

[0027] The virtualization layer 204 provides an abstraction layer from which the following example virtual entities may be deployed: virtual servers 226; virtual storage 228; virtual networks 230, including virtual private networks; virtual applications and operating systems 232; and virtual clients 234.

[0028] In one example, the management layer 206 may provide the functions described below. A resource provisioner 236 provides dynamic procurement of computing resources and other resources used to perform tasks within the cloud computing environment. In this illustrative example, a virtual disk manager 237 in the resource provisioner may manage resources in the form of virtual disks.

[0029] Metering and pricing 238 enable cost tracking and billing or invoicing for the use of resources within the cloud computing environment when resources are deployed. In one example, these resources may include application software licenses. A security feature provides identity verification for cloud users and tasks, as well as protection for data and other resources. A user portal 240 provides access to the cloud computing environment for users and system administrators. Service level management 242 allocates and manages cloud computing resources so that required service levels are met. Service level agreement (SLA) planning and contracting 244 provides upfront agreement for and procurement of cloud computing resources for which future demand is expected according to an SLA.

[0030] The workload layer 208 provides examples of functionality for which the cloud computing environment can be utilized. Example workloads and functions that can be provided from the workload layer 208 can include mapping and navigation 246; software development and lifecycle management 248; virtual training delivery 250; data analytics processing 252; transaction processing 254; and container orchestration 256.

[0031] The illustrative embodiments acknowledge and consider a number of different considerations. For example, the illustrative embodiments acknowledge and consider that if a hypervisor does not provide or support forwarding or partial virtualization of storage units, managing the lifecycle of storage units available for use by nested virtualized guests may be challenging. The illustrative embodiments acknowledge and consider lifecycle attachment, detachment, and updates. The illustrative embodiments acknowledge and consider that it would be desirable to automate the discovery processing of attached storage units for use by guests executing under a hypervisor.The illustrative embodiments recognize and contemplate that automating this process may include using disk image files compatible with a hypervisor.

[0032] With reference to Fig. Figure 3 depicts a pictorial representation of a network of data processing systems in which illustrative embodiments may be implemented. A network data processing system 300 is a network of computers in which the illustrative embodiments may be implemented. The network data processing system 300 includes a network 302, which is the medium used to provide data transmission connections between various devices and computers interconnected in the network data processing system 300. The network 302 may include connections such as wired, wireless data transmission links, or fiber optic cables.

[0033] In the illustrated example, a server computer 304 and a server computer 306, along with a storage device 308, are connected to the network 302. Client devices 310 are also connected to the network 302. As illustrated, the client devices 310 include a client computer 312, a client computer 314, and a client computer 316. The client devices 310 may be, for example, computers, workstations, or network computers. In the illustrated example, the server computer 304 may provide information such as boot files, operating system images, and applications to the client devices 310. Furthermore, the client devices 310 may also include other types of client devices, such as a mobile phone 318, a tablet computer 320, and smart glasses 322.In this illustrative example, server computer 304, server computer 306, storage device 308, and client devices 310 are network devices connected to network 302, with network 302 being the data transmission medium for these network devices. Some or all of the client devices 310 may form an Internet of Things (IoT), in which these physical devices may be connected to network 302 and exchange data with each other via network 302.

[0034] In this example, client devices 310 are clients of server computer 304. Network data processing system 300 may include additional server computers, client computers, and other devices not shown. Client devices 310 are connected to network 302 using at least one of a wired, fiber optic, and wireless connection.

[0035] Program code located in network data processing system 300 may be stored on a computer-writable storage medium and downloaded to a data processing system or other device for use. For example, the program code may be stored on a computer-writable storage medium on server computer 304 and downloaded to client devices 310 via network 302 for use on client devices 310.

[0036] In the illustrated example, network data processing system 300 is the Internet, where network 302 represents a worldwide collection of networks and gateways that use the Transmission Control Protocol / Internet Protocol (TCP / IP) protocol suite to exchange data with each other. At the core of the Internet is a backbone of high-speed data transmission lines between major nodes or host computers, consisting of thousands of commercial, government, educational, and other computer systems that relay 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 consist 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). Fig. 3 is to be considered as an example and not as an architectural limitation for the various illustrative embodiments.

[0037] As used herein, "a number of" when used with reference to elements means one or more elements. For example, "a number of different types of networks" means one or more different types of networks.

[0038] Furthermore, the phrase "at least one of," when used with a list of items, means that various combinations of one or more of the listed items can be used, and 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 number of items from the list can be used, but not all items in the list are required. The item can be a specific object, thing, or category.

[0039] For example, "at least one of element A, element B, or element C" may include element A, element A, and element B, or element B. This example may also include element A, element B, and element C, or element B and element C. Of course, any combination of these elements may be present. In some illustrative examples, "at least one of" may be, for example, without limitation, two elements A; one element B; and ten elements C; four elements B and seven elements C; or other suitable combinations.

[0040] As shown, a virtual disk manager 330 is executed on the server computer 304 with a 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 comprising one or more physical storage units. These physical units store data in bytes, which are grouped into blocks or segments, each with its own access. In other examples, block storage 338 may be virtual storage.

[0041] The virtual disk manager 330 can create the virtual disks 334 and assign them to guest virtual machines 336. In this illustrative example, the creation of the virtual disks 334 occurs when the presence of the block storage 338 is detected. This detection can be performed in various ways. For example, the detection of the block storage 338 can be performed using event-driven notifications or a poll.

[0042] As illustrated, the hypervisor 332 attaches the virtual disks 334 to the guest virtual machines 336 as assigned by the virtual disk manager 330. The virtual disks 334 are seen by the guest virtual machines 336 with characteristics and a format expected and used by the guest virtual machines 336. The characteristics may include, for example, a format, size, capacity, or other characteristic that makes the virtual disks 334 appear like actual physical entities.

[0043] The virtual disk manager 330 may also operate to remove the virtual disks 334 when the block storage 338 is removed or lost. This situation may be detected using event-driven notifications or scheduled polling. The virtual disk manager 330 may notify the hypervisor 332 that the virtual disks need to be removed from use by the guest virtual machines 336. As another example, the virtual disk manager 330 may also add, remove, or resize the virtual disks 334 in response to a change in the size of the block storage 338.

[0044] The virtual disk management illustration 334 is an example of an implementation for managing virtual disks for guest virtual machines 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, more than one block storage may be present.

[0045] With reference to Fig. 4 shows a block diagram of a virtual disk management environment according to an illustrative embodiment. In this illustrative example, a virtual disk management environment 400 includes components that can be implemented in hardware, such as the hardware implemented in the cloud computing environment 100 in Fig. 1 or in the network data processing system 300 in Fig. 3 is shown.

[0046] In this illustrative example, a virtual disk management system 402 within the virtual disk management environment 400 includes a number of different components. As shown, the virtual disk management system 402 includes a computer system 404 and a virtual disk manager 406. The virtual disk manager 406 is located within the computer system 404.

[0047] 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 into program instructions configured for execution on hardware, such as a processor unit. If firmware is used, the operations performed by the virtual disk manager 406 may be implemented into program instructions and data and stored in persistent memory for execution on a processor unit. If hardware is used, the hardware may include circuitry operable to perform the operations in the virtual disk manager 406.

[0048] In the illustrative examples, the hardware may take a form selected from at least one of a circuit system, an integrated circuit, an application-specific integrated circuit (ASIC), a programmable logic unit, or any other suitable type of hardware configured to perform a number of operations. For a programmable logic unit, the unit may be configured to perform the number of operations. The unit may be reconfigured at a later time or may be permanently configured to perform the number of operations. Programmable logic units include, for example, a programmable logic array, programmable array logic, a field-programmable logic array, a field-programmable gate array, and other suitable hardware units.Furthermore, the processes can be implemented in organic components integrated with inorganic components, and can consist entirely of organic components, excluding a human being. For example, the processes can be implemented as circuits in organic semiconductors.

[0049] Computer system 404 is a physical hardware system and includes one or more data processing systems. If more than one data processing system is present in computer system 404, these data processing systems communicate with each other using a data transmission medium. The data transmission 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 any other suitable data processing system.

[0050] As shown, the computer system 404 includes a number of processor units 408 capable of executing program instructions 410 that implement processes in the illustrative examples. As used herein, a processor unit in the number of processor units 408 is a hardware unit and consists of hardware circuitry, such as that on an integrated circuit, that responds to and processes instructions and program code that operate a computer. When a number of processor units 408 executes the program instructions 410 for a process, the number of processor units 408 is one or more processor units, which may be located on the same computer or on different computers. In other words, the process may be distributed among processor units on the same or different computers in a computer system.Furthermore, the number of processor units 408 may be of the same type or a different type of processor unit. For example, a number of processor units may be selected from at least one of a single-core processor, a dual-core processor, a multi-core processor, a general-purpose central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), or any other type of processor unit.

[0051] As illustrated, the virtual disk manager 406 detects the attachment of a storage device 412 to a host operating system 414. This detection may be performed using a discovery process. The discovery may be performed in a number of different ways. For example, the discovery may use event-driven notifications that initiate a storage device discovery or may include using scheduled queries to initiate a block storage discovery. The storage device 412 may be virtual storage. For example, the storage device 412 may be virtual storage in a nested virtualization system.

[0052] In this illustrative example, the memory 412 is present when the memory 412 is attached to the host operating system 414. The memory 412 may take a number of different forms. For example, the memory 412 may utilize one or more memory architectures selected from at least one of block storage, file storage, object storage, or any other suitable type of memory architecture. The memory devices located within the memory 412 may be selected from at least one of a hard disk drive, a solid-state disk, or other suitable type of memory device.

[0053] In response to storage 412, virtual disk manager 406 mounts storage 412 to a set of mount points 416. In this illustrative example, the set of mount points 416 is a set of locations within 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.

[0054] Before mounting the storage 412, the virtual disk manager 406 creates a set of partitions 418 for a 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 before mounting the storage 412. The set of file systems 422 in the set of partitions 418 are mounted by the virtual disk manager 406 at the set of mount points 416 to mount the storage at the set of mount points 416. In this illustrative example, a set of virtual disk image files 424 is intended for the set of virtual disks 420 and is located in the set of file systems 422.

[0055] The virtual disk manager 406 creates a set of virtual disks 420 and assigns the set of virtual disks 420 to a guest 426 in an operation 428, wherein instructions for the atomic operation are performed without interruption. In this illustrative example, the operation 428 is an atomic operation 429. In other words, instructions for creating and allocating the virtual disks 420 are performed without other intervening instructions being processed for other operations that are not part of the atomic operation. For example, the operation 428 may create and allocate the set of virtual disks 420 without interruption by other steps or operations being performed that may affect the creation and assignment of the set of virtual disks 420 to the guest 426.

[0056] For example, the instructions for performing steps in operation 428 are executed without instructions for other steps or operations not part of operation 428 that are performed in a manner that would affect 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 the guest 426. In this illustrative example, the guest 426 may be selected from a group including an operating system, a guest operating system, a virtual machine, or any other suitable component that may be considered a guest.

[0057] The creation of the set of virtual disks 420 is performed by creating the set of virtual disk image files 424 in the memory 412. Each virtual disk image file in the set of virtual disk image files 424 corresponds to a virtual disk and virtual disks 420. If a single virtual disk is present in the set of virtual disks 420, a single virtual disk image is present in the set of virtual disk image files 424.

[0058] The assignment of the set of virtual disks 420 to the guest 426 may be performed by updating a guest configuration 430 for a hypervisor 432 for the guest 426. The hypervisor 432 may use the guest configuration 430 attached to the set of virtual disks 420 of the guest 426.

[0059] In this illustrative example, the hypervisor 432 is a component that can run one or more virtual machines, where the virtual machines are referred to as guests or guest virtual machines. The hypervisor 432 can consist of at least one of software, firmware, or hardware. In this illustrative example, the guest configuration 430 is a configuration file that includes information identifying the configuration for the guest 426. For example, the guest configuration 430 can describe the virtual hardware resources for the guest 426, which include a set of virtual disk image files 424 for a set of virtual disks 420.

[0060] In this illustrative example, a partition in the set of partitions 418 may have one or more files from the set of virtual disk image files 424. In other words, a partition may have more than one virtual disk. Furthermore, a file system in the set of file systems 422 may also have one or more files from the set of virtual disk image files 424.

[0061] Furthermore, if more than one virtual disk image file is present in the set of virtual disk image files 424, these virtual disk image files may be for the same or a different type of virtual disk. These formats may be for the type of physical disk device that the guest 426 can use or expects to use.

[0062] As a result, the use of the atomic operation 429 provides at least one of improved accuracy or security when provisioning the virtual disks 420 to guests. Furthermore, the use of the atomic operation 429 reduces the possibility of a man-in-the-middle (MITM) attack and avoids orphaned virtual disks. For example, positioning the set of virtual disks 420 in a pool or waiting for the set of virtual disks 420 to be allocated at a later time may result in a guest other than guest 426 being attached to the set of virtual disks 420.

[0063] In addition to creating and assigning a 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 change in the size 434 of the storage 412. In response to detecting the change in size 434, the virtual disk manager 406 may update the guest configuration 430 for the guest 426 to reflect the change in the size 434 of the set of virtual disks 420.

[0064] In an illustrative example, the virtual disk manager 406 detects the resizing 434 of the memory 412, where the resizing 434 adds a memory unit 436 to the memory 412. In this example, the virtual disk manager 406 creates a new set of virtual disks 438 for the memory unit 436 and allocates the new set of virtual disks 438 to a guest 426 in a new atomic operation 440, where the instructions for the new atomic operation 440 are executed without interruption.

[0065] In another illustrative example, the virtual disk manager 406 detects the resizing 434 of the storage 412, where the resizing 434 removes a storage unit 436 from the storage 412. In response to the resizing 434, the virtual disk manager 406 removes a number of virtual disks 420 with a number of virtual disk image files 442 located in the storage unit 436. The virtual disk manager 406 also unmounts a set of partitions 418 for the storage 412 corresponding to the storage unit 436.

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

[0067] Computer system 404 may be configured to perform at least one of the steps, operations, or actions described in the various illustrative examples using software, hardware, firmware, or a combination thereof. As a result, computer system 404 operates as a special-purpose computer system, with virtual disk manager 406 located within computer system 404 enabling virtual disks to be managed within virtual disks that are not orphaned or revealed prior to being attached to a guest. In particular, virtual disk manager 406 transforms computer system 404 into a special-purpose computer system compared to currently available general-purpose computer systems that do not have virtual disk manager 406.

[0068] In the illustrative example, the use of the virtual disk manager 406 in the computer system 404 integrates processes into a practical application for managing virtual disks, thereby increasing the performance of the computer system 404. In other words, the virtual disk manager 406 in the computer system 404 refers to a practical application of processes that manage virtual disks in the virtual disk manager 406 in the computer system 404, which includes creating and assigning a virtual disk to a guest in a manner that does not reveal the virtual disk, or a pool in which the virtual disk can be used for purposes other than being attached to the guest.In this illustrative example, the virtual disk manager 406 is implemented in the computer system 404, wherein the creation and allocation of a virtual disk occurs using an atomic operation, with other operations in which the virtual disk may be involved occurring non-interveningly between the creation and allocation of the virtual disk.

[0069] In this way, the virtual disk manager 406 in the computer system 404 provides a practical application of the inventive method, thereby improving the operation of the computer system 404. In one or more of the various illustrative examples, when storage units are attached, a (physical / virtual) disk preparation process occurs, wherein a virtual disk image file is created and mounted via a hypervisor to be used by a guest. When a storage unit is detached, a process of unmounting the disk image file occurs via the hypervisor, including any additional cleanup on the host operating system.When the size of storage units is changed, the size of a virtual disk can be changed accordingly either by changing the size of the virtual disk image file or by managing it through a creation or deletion of virtual disks by creating or deleting virtual disk image files.

[0070] The illustration of the virtual disk management environment 400 in Fig. 4 is not intended to imply any physical or architectural limitations on the manner in which an illustrative embodiment may be implemented. Other components may be used in addition to or in place of the illustrative components. Some components may be unnecessary. Furthermore, the blocks are presented to illustrate some functional components. One or more of these blocks may be combined, split, or combined and split into different blocks when implemented in an illustrative embodiment.

[0071] 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 to which virtual disks are provided by virtual disk manager 406 via hypervisor 432. In another illustrative example, virtual disk manager 406 may be part of the storage controller currently used to manage access to storage 412.

[0072] Fig. Figures 5 through 7 are message flow diagrams illustrating managing a virtual disk for a guest operating system. In the illustrative examples, the messages may be at least one of data, an extraction, a command, and an electrical signal, or any other suitable signal type that may be used for message transfer.

[0073] First, with reference to Fig. 5 depicts a message flow diagram illustrating attaching a virtual disk to a guest operating system, according to an illustrative embodiment. In this depicted example, block storage 500 is an example of storage 412 in Fig. 4. In this illustrative example, the block storage 500 is attached to a host operating system 502 (message m1).

[0074] A discovery stage exists in which event-driven notifications or queries from a virtual disk manager 504 to the host operating system 502 can be used to initiate the discovery of the block storage 500 (message m2). Upon initiated discovery, the virtual disk manager 504 can receive a list of block storage units discovered by the host operating system 502 during the discovery process performed by the host operating system 502 (message m3). The virtual disk manager 504 checks the list of block storage units received from the host operating system 502 to determine if any new block storage units are present or if any changes have occurred to block storage units attached to the host operating system 502.In this example, the attachment of block storage 500 is identified by examining the list of block storage units received from host operating system 502.

[0075] 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). This step can be omitted if block storage 500 has already been prepared for a partition and file system for the virtual disk.

[0076] The virtual disk manager 504 sends a message to the host operating system 502 to mount the block storage partition so that it is accessible to the host operating system 502 and a guest operating system 506 (message m5). In the illustrative example, the guest operating system 506 is an operating system executing in a virtual machine. In contrast, the host operating system 502 resides on a computer system and interacts with hardware. The computer system may be physical or virtual, and the hardware may be physical or virtual hardware with nested virtualization. With nested virtualization, the host operating system 502 may be another hypervisor guest operating system executing in a virtual machine.

[0077] In this illustrative example, the virtual disk manager 504 performs an atomic operation 508. In this illustrative example, the atomic operation 508 comprises executing instructions to perform steps including creating a virtual disk and assigning the virtual disk to the guest operating system 506. Upon creating the virtual disk, a virtual disk image file is created that is compatible with or usable by a hypervisor 510. This creation of the virtual disk image file is 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.

[0078] When assigning the virtual disk to the guest operating system 506, the atomic operation 508 updates a guest configuration 512. This update is performed to include the new virtual disk image for the virtual disk for use by the guest operating system 506 (message m6). In other words, updating the guest configuration 512 is part of the atomic operation 508. Thus, the steps of creating and assigning the virtual disk in the atomic operation 508 can be performed without interruption by other steps for processes, threads, programs, or other types of execution units that may assign or attach the virtual disk to a guest other than the intended guest, the guest operating system 506.

[0079] 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 the hypervisor 510 does not perform automatic detection.

[0080] The guest configuration update 512 is used by the hypervisor 510 to attach the virtual disk (message m8). The guest operating system 506 can then use the virtual disk.

[0081] With reference to Fig. 6 is a message flow diagram illustrating removal of virtual disks from the guest operating system, according to an illustrative embodiment. In this illustrated example, block storage 500 is detached from host operating system 502 (message n1). Detection of this disconnection may be performed through event-driven notifications or virtual disk manager 504 initiating the 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 analyze the list of devices to determine that block storage 500 has been detached.

[0082] In response to detecting the detachment of block storage 500, virtual disk manager 504 updates guest configuration 512 to remove the virtual disk image for the virtual disk used by guest operating system 506 (message n4). Virtual disk manager 504 notifies hypervisor 510 of the update to guest configuration 512 (message n5). Hypervisor 510 may then detach guest operating system 506 (message n6).

[0083] The virtual disk manager 504 may send a message to the host operating system 502 to unmount the partition that was in the block storage 500 in response to detecting the unmounting of the block storage 500 (message n7).

[0084] With reference to Fig. Figure 7 illustrates a message flow diagram for resizing a virtual disk for a guest operating system according to an illustrative embodiment. In this illustrated example, the block storage 500 is resized, and a resize message is sent to the host operating system 502 (message p1).

[0085] Detection of this size change can be performed through event-driven notifications or the virtual disk manager 504 initiating the detection using a query (message p2). In this detection process, the host operating system 502 returns a list of units to the virtual disk manager 504 (message p3). The virtual disk manager 504 can analyze the list of units to determine that the size of the block storage 500 has been changed.

[0086] The virtual disk manager 504 causes the host operating system 502 to resize the partition to the new size (message p4). If resizing the partition shrinks the block storage 500, one or more virtual disks may be removed to reduce the storage space available to the guest operating system 506. Removing one or more virtual disks from the guest operating system 506 may be performed by updating the guest configuration 512 to remove virtual disk image files (message p5).

[0087] If resizing a partition increases the amount of storage space of the partition, the virtual disk manager 504 performs an atomic operation 700 to create one or more virtual disks for the increased storage space resulting from resizing the block storage 500 and to 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 step for the atomic operation 700. The virtual disk allocation can be reflected by updating the guest configuration 512 to include a virtual disk image for each virtual disk that is allocated to the guest operating system 506 (message p5). This updating of the guest configuration 512 is the second step in the atomic operation 700 in this example.As illustrated, these two steps may be performed without interruption by steps for processes, threads, programs, or other types of execution units that may allocate or attach the virtual disk to a guest other than the intended guest, the guest operating system 506.

[0088] In any case, the virtual disk manager 504 notifies the hypervisor 510 of the update to the guest configuration 512 (message p6). The hypervisor 510 can attach or detach virtual disks to the guest operating system 506 based on the addition or removal of virtual disk image files to or from the guest configuration 512 (message p7).

[0089] The use of the atomic operation 508 in Fig. 5 and the atomic operation 700 in Fig. 7 provides improved resource management over current techniques that pool virtual disks or allow virtual disks to remain unattached for some time. The use of atomic operations can ensure that there are no orphaned virtual disks that could potentially be subject to a man-in-the-middle (MITM) attack, eavesdropping, or attachment to another guest operating system. Furthermore, the use of atomic operations can also cause attachments to the entire block storage unit, eliminating any orphaned, wasted space that may remain unused.

[0090] With reference to Fig. Figure 8 is a flowchart of a process for managing virtual disks according to an illustrative embodiment. The process in Fig. 8 may be implemented in hardware, software, or both. When implemented in software, the process may take the form of program instructions executed by one or more processor units located in one or more hardware units in one or more computer systems. For example, the process may be located in the virtual disk manager 406 in the computer system 404 in Fig. 4 be implemented.

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

[0092] The process creates a set of virtual disks and assigns the set of virtual disks to a guest in one operation, executing instructions for the operation without interruption. Afterward, the process terminates.

[0093] With reference to Fig. Figure 9 is a flowchart of a process for managing virtual disks according to an illustrative embodiment. The steps in this flowchart are examples of additional steps that are similar to the steps in Fig. 8 can be carried out.

[0094] The process creates a set of partitions for the pre-storage virtual disk set (at a step 900). The process creates a set of file systems in the set of partitions for the pre-storage virtual disk set, with a set of virtual disk image files intended for the virtual disk set and located in the set of file systems (at a step 902). Afterward, the process terminates.

[0095] With reference to Fig. 10, a flowchart of a process for mounting a memory according to an illustrative embodiment is shown. This flowchart is an example of an implementation of step 802 in Fig. 8.

[0096] The process mounts the set of file systems in the set of partitions at the set of mount points (in a step of 1000). After that, the process terminates.

[0097] In Fig. Figure 11 is a flowchart of a process for creating and allocating virtual disks in an atomic operation according to an illustrative embodiment. This flowchart is an example of an implementation of step 804 in Fig. 8. The steps in this flow chart are implemented in an atomic operation, so that the instructions for this atomic operation are executed without interruption.

[0098] The process creates a set of virtual disk image files in memory, the set of virtual disk image files being intended for the set of virtual disks (in a step 1100). The process updates a guest configuration for a hypervisor for the guest, the hypervisor attaching the set of virtual disks to the guest using the guest configuration (in a step 1102). Afterward, the process ends.

[0099] With reference to Fig. Figure 12 is a flowchart of a process for managing virtual disks according to an illustrative embodiment. The steps in this flowchart are examples of additional steps that are similar to the steps in Fig. 8 can be carried out.

[0100] The process detects a memory size change (in step 1200). The process updates a guest configuration for the guest to reflect the virtual disk set size change (in step 1202). Afterward, the process terminates.

[0101] With reference to Fig. Figure 13 is a flowchart of a process for managing virtual disks according to an illustrative embodiment. The steps in this flowchart are examples of additional steps that are similar to the steps in Fig. 8 can be carried out.

[0102] The process detects a memory resizing, where the resizing adds a memory unit to the memory (in a step 1300). The process creates a new set of virtual disks for the memory unit and, by the number of processor units, assigns the new set of virtual disks to the guest in a new atomic operation, executing the instructions for the new atomic operation without interruption (in a step 1302). Afterward, the process terminates.

[0103] With reference to Fig. Figure 14 is a flowchart of a process for managing virtual disks according to an illustrative embodiment. The steps in this flowchart are examples of additional steps that are similar to the steps in Fig. 8 can be carried out.

[0104] The process detects a resizing of the storage, where the resizing removes a storage unit from the storage (in a step 1400). The process removes a number of virtual disks with a number of virtual disk image files located in the storage unit (in a step 1402).

[0105] The process unmounts a set of partitions for memory (in a step 1404). After that, the process terminates.

[0106] In Fig. Figure 15 is a flowchart of a process for managing virtual disks according to an illustrative embodiment. The steps in this flowchart are examples of additional steps that are similar to the steps in Fig. 8 can be carried out.

[0107] The process detects a storage disconnect (in a step 1500). The process updates a guest configuration for the guest to remove the set of virtual disks in response to detecting the storage disconnect (in a step 1502).

[0108] The process unmounts the memory from the set of mount points (in a step 1504). After that, the process terminates.

[0109] The flowcharts and block diagrams in the various illustrated embodiments illustrate the architecture, functionality, and operation of some possible implementations of devices and methods in an illustrative embodiment. In this regard, each block in the flowcharts or block diagrams may represent at least one of a module, segment, function, or portion of an operation or step. For example, one or more of the blocks may be implemented as program instructions, hardware, or a combination of the program instructions and the hardware. When implemented in hardware, the hardware may, for example, take the form of integrated circuits that are manufactured or configured to perform one or more operations in the flowcharts or block diagrams.When implemented as a combination of program instructions and hardware, the implementation may take the form of firmware. Each block in the flowcharts or block diagrams may be implemented using special-purpose hardware systems that perform the various operations, or combinations of special-purpose hardware and program instructions executed by the special-purpose hardware.

[0110] In some alternative implementations of an illustrative embodiment, the function(s) specified in the blocks may occur in a different order than shown in the figures. For example, in some cases, two blocks shown in succession may be performed substantially in parallel, or the blocks may sometimes be performed in the reverse order, depending on the functionality involved. Furthermore, other blocks may be added in addition to the blocks illustrated in a flowchart or block diagram.

[0111] With reference to Fig. 16 shows a block diagram of a data processing system according to an illustrative embodiment. A data processing system 1600 may be used to implement cloud computing nodes 110 in Fig. 1, the Personal Digital Assistant (PDA) or smartphone 120A, the desktop computer 120B, the laptop computer 120C and / or the vehicle computer system 120N in Fig. 1. The data processing system 1600 can be used to implement computers in the hardware and software layer 202 in Fig. 2 and the server computer 304, the server computer 306 and the client units 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, data processing system 1600 includes a data transfer framework 1602 that provides data transfers between a processor unit 1604, a memory 1606, a persistent storage 1608, a data transfer unit 1610, an input / output (I / O) unit 1612, and a display 1614. In this example, data transfer framework 1602 is in the form of a bus system.

[0112] Processor unit 1604 is used to execute instructions for software that can be loaded into memory 1606. Processor unit 1604 may include one or more processors. For example, processor unit 1604 may be selected from at least one multi-core processor, a central processing unit (CPU), a graphics processing unit (GPU), a physics accelerator unit (PPU), a digital signal processor (DSP), a network processor, and / or any other suitable processor type. Further, processor unit 1604 may be implemented using one or more heterogeneous processor systems in which a main processor with secondary processors is present on a single chip. As another illustrative example, processor unit 1604 may be a symmetric multiprocessor system that includes multiple processors of the same type on a single chip.

[0113] The memory 1606 and the persistent storage 1608 are examples of storage devices 1616. A storage device is any element of hardware capable of storing information, such as, without limitation, at least data, program instructions in functional form, or other suitable information, either on a temporary basis, on a persistent basis, or on both a temporary and persistent basis. The storage devices 1616 may also be referred to as computer-readable storage devices in these illustrative examples. For example, the memory 1606 in these examples may be random access memory or any other suitable volatile or non-volatile storage device. The persistent storage 1608 may take various forms depending on the particular implementation.

[0114] 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 of the foregoing. The media used by persistent storage 1608 may also be removable. For example, a removable hard drive may be used for persistent storage 1608.

[0115] In these illustrative examples, data transfer unit 1610 provides data transfers with other data processing systems or devices. In these illustrative examples, data transfer unit 1610 is a network interface card.

[0116] An I / O unit 1612 enables the input and output of data with 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 via at least one of a keyboard, a mouse, or any 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 a user.

[0117] Instructions for at least one of the operating system, applications, or programs may be located in memory units 1616, which communicate with processor unit 1604 via data transfer framework 1602. The processes of the various embodiments may be performed by processor unit 1604 using computer-implemented instructions that may be located in memory, such as memory 1606.

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

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

[0120] The computer-readable storage media 1624 is a physical or tangible storage unit used to store program instructions 1618, and not a medium that propagates or transmits the program instructions 1618. A computer-readable storage medium 1624, as used herein, is not intended to be construed as ephemeral signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses carried through a fiber optic cable), or electrical signals carried through a wire.

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

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

[0123] The various components illustrated for data processing system 1600 are not to be construed as architectural limitations on the manner in which various embodiments may be implemented. In some illustrative examples, one or more of the components may be integrated with or otherwise form a portion of another component. For example, memory 1606, or portions thereof, may be integrated with processor unit 1604 in some illustrative examples. The various illustrative embodiments may be implemented in a data processing system that includes components in addition to, or in place of, those illustrated for data processing system 1600. Other Fig.The components shown in Figure 16 may vary from the illustrative examples shown. The various embodiments may be implemented using any hardware device or system capable of executing the program instructions 1618.

[0124] Thus, the illustrative embodiments of the present invention provide a computer-implemented method, a computer system, and a computer program product for managing virtual disks. In one illustrative example, a number of processor units detects an attachment of memory to a host operating system. The number of processor units mounts the memory at a set of mount points. The number of processor units creates a set of virtual disks and, by the number of processor units, assigns the set of virtual disks to a guest in one operation, wherein instructions for the operation are executed without interruption.As a result, using an operation in which instructions are executed without interruption, such as an atomic operation, can reduce the possibility that a virtual disk can be attached to a guest operating system other than the specified operating system. In the illustrative example, the risk can be reduced because the creation and attachment of the virtual disk is performed without interruption by processes that can attach the disk to another guest before the virtual disk has been attached to the intended guest.

[0125] The description of the various illustrative embodiments has been prepared for purposes of illustration and description, but is by no means intended to be exhaustive or limited to the embodiments in the form disclosed. The various illustrative examples describe components that perform actions or operations. In an illustrative embodiment, a component may be configured to perform the described action or operation. For example, the component may have a configuration or design for a structure that enables the component to perform the action or operation described in the illustrative example as being performed by the component.Further, to the extent that terms such as “includes,” “comprising,” “has,” “contains,” and variations thereof are used herein, such terms are intended to be inclusive in a manner similar to the term “includes” as an open-ended transitional word, without excluding any additional or different elements.

[0126] The descriptions of the various embodiments of the present invention have been prepared for the purpose of illustration, but are by no means intended to be exhaustive or limited to the disclosed embodiments. Not all embodiments include all of the features described in the illustrative examples. Furthermore, different illustrative embodiments may provide different features compared to other illustrative embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiment. The terminology used herein has been chosen to best explain the principles of the embodiment, practical application, or technical improvement over technology found in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

[1] A computer-implemented method for managing virtual disks, the computer-implemented method comprising: detecting (800), by a number of processor units (408), an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting (802), by the number of processor units, the memory at a set of mount points (416); Creating (804), by the number of processor units, a set of virtual disks (334, 420) and assigning, by the number of processor units, the set of virtual disks to a guest (336, 426, 506) in an operation (428), wherein instructions for the operation are executed without interruption; detecting (1200), by the number of processor units, a change in the size of the memory by checking a list of block memory units received from the host operating system; Updating (1202), by the number of processor units, a guest configuration for the guest to reflect the change in size of the set of virtual disks, the guest configuration for the guest describing virtual hardware resources for the guest including a set of virtual disk image files (424) for the set of virtual disks; and Notify the hypervisor, by the number of processor units, about the update of the guest configuration file. [2] A computer-implemented method for managing virtual disks, the computer-implemented method comprising: detecting (800), by a number of processor units (408), an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting (802), by the number of processor units, the memory at a set of mount points (416); Creating (804), by the number of processor units, a set of virtual disks (334, 420) and assigning, by the number of processor units, the set of virtual disks to a guest (336, 426, 506) in an operation (428), wherein instructions for the operation are executed without interruption; Detecting (1300), by the number of processor units, a change in the size of the memory by checking a list of block storage units received from the host operating system, wherein the change in size adds a storage unit to the memory; and Creating (1302), by the number of processor units, a new set of virtual disks for the storage unit and allocating, by the number of processor units, the new set of virtual disks to the guest in a new atomic operation (440, 700), wherein the instructions for the new atomic operation are executed without interruption. [3] A computer-implemented method for managing virtual disks, the computer-implemented method comprising: detecting (800), by a number of processor units (408), an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting (802), by the number of processor units, the memory at a set of mount points (416); Creating (804), by the number of processor units, a set of virtual disks (334, 420) and assigning, by the number of processor units, the set of virtual disks to a guest (336, 426, 506) in an operation (428), wherein instructions for the operation are executed without interruption; detecting (1400), by the number of processor units, a change in the size of the memory by checking a list of block memory units received from the host operating system, wherein the change in size removes a memory unit from the memory; Removing (1402), by the number of processor units, a number of virtual disks having a number of virtual disk image files located in the storage unit; and Unmounting (1404), by the number of processor units, a set of partitions for memory by sending a message to the host operating system. [4] A computer-implemented method for managing virtual disks, the computer-implemented method comprising: detecting (800), by a number of processor units (408), an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting (802), by the number of processor units, the memory at a set of mount points (416); Creating (804), by the number of processor units, a set of virtual disks (334, 420) and assigning, by the number of processor units, the set of virtual disks to a guest (336, 426, 506) in an operation (428), wherein instructions for the operation are executed without interruption; Detecting (1500), by the number of processor units, a disconnection of the memory by checking a list of block memory units received from the host operating system; and Updating (1502), by the number of processor units, a guest configuration (430) for the guest to remove the set of virtual disks in response to detecting the memory disconnection; and Unmounting (1504), by the number of processor units, the memory from the set of mount points by sending a message to the host operating system. [5] A computer-implemented method according to any one of the preceding claims, wherein the computer-implemented method comprises: attaching, by a hypervisor (510) for the guest, the set of virtual disks to the guest; Creating (900), by the number of processor units, a set of partitions (418) for the set of virtual disks prior to mounting the storage; and Creating (902), by the number of processor units, a set of file systems (422) in the set of partitions for the set of virtual disks prior to mounting the storage, wherein the storage is a physical storage unit, and wherein mounting, by the number of processor units, the storage at the set of mount points comprises: mounting (1000), by the number of processor units, the set of file systems in the set of partitions at the set of mount points. [6] A computer-implemented method according to any preceding claim, wherein the guest is selected from a group comprising an operating system, a guest operating system, and a virtual machine. [7] A computer-implemented method for managing virtual disks, the computer-implemented method comprising: detecting (800), by a number of processor units (408), an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting (802), by the number of processor units, the memory at a set of mount points (416); Creating (804), by the number of processor units, a set of virtual disks (334, 420) and assigning, by the number of processor units, the set of virtual disks to a guest (336, 426, 506) in an operation (428), wherein instructions for the operation are performed without interruption, wherein the guest is selected from a group comprising an operating system, a guest operating system, and a virtual machine; attaching, by a hypervisor (510) for the guest, the set of virtual disks to the guest; Creating (900), by the number of processor units, a set of partitions (418) for the set of virtual disks prior to mounting the storage; and Creating (902), by the number of processor units, a set of file systems (422) in the set of partitions for the set of virtual disks prior to mounting the storage, wherein the storage is a physical storage unit, and wherein mounting, by the number of processor units, the storage at the set of mount points comprises: mounting (1000), by the number of processor units, the set of file systems in the set of partitions at the set of mount points. [8] A computer-implemented method according to any one of the preceding claims, wherein the operation of creating and assigning the set of virtual disks to the guest is an atomic operation (429, 508), and wherein creating, by the number of processor units, the set of virtual disks and assigning, by the number of processor units, the set of virtual disks to the guest in the operation, wherein instructions for the operation are performed without interruption, comprise: Creating (1100), by the number of processor units, a set of virtual disk image files (424, 512) in the memory, the set of virtual disk image files being for the set of virtual disks; and Updating (1102), by the number of processor units, a guest configuration (430) for the hypervisor for the guest, wherein the hypervisor attaches the set of virtual disks to the guest using the guest configuration. [9] A computer program product comprising a computer-readable storage medium having program instructions embodied thereon that are executable by a computer system (404) to cause the computer system to perform a method according to any one of the preceding claims. [10] A computer system (404) comprising: a number of processor units (408), wherein the number of processor units executes the program instructions for: detecting an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting the storage at a set of mount points (416); Creating a set of virtual disks and assigning, by the number of processor units, the set of virtual disks (334, 420) to a guest (336, 426, 506) in one operation (428), wherein instructions for the operation are executed without interruption; detecting a change in the size of the memory by checking a list of block storage units received from the host operating system; updating a guest configuration for the guest to reflect the change in size of the set of virtual disks, the guest configuration for the guest describing virtual hardware resources for the guest, including a set of virtual disk image files (424) for the set of virtual disks; and Notify the hypervisor about the guest configuration file update. [11] A computer system (404) comprising: a number of processor units (408), wherein the number of processor units executes the program instructions for: detecting an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting the storage at a set of mount points (416); Creating a set of virtual disks and assigning, by the number of processor units, the set of virtual disks (334, 420) to a guest (336, 426, 506) in one operation (428), wherein instructions for the operation are executed without interruption; Detecting a change in the size of the memory by checking a list of block storage units received from the host operating system, wherein the change in size adds a storage unit to the memory; 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 (440, 700), wherein the instructions for the new atomic operation are executed without interruption. [12] A computer system (404) comprising: a number of processor units (408), wherein the number of processor units executes the program instructions for: detecting an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting the storage at a set of mount points (416); Creating a set of virtual disks and assigning, by the number of processor units, the set of virtual disks (334, 420) to a guest (336, 426, 506) in one operation (428), wherein instructions for the operation are executed without interruption; detecting a change in the size of the memory by checking a list of block storage units received from the host operating system, wherein the change in size removes a storage unit from the memory; Removing a number of virtual disks with a number of virtual disk image files located in the storage unit; and Unmount a set of partitions for storage by sending a message to the host operating system. [13] Computer system (404) comprising: a number of processor units (408), wherein the number of processor units executes the program instructions for: detecting an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting the storage at a set of mount points (416); Creating a set of virtual disks and assigning, by the number of processor units, the set of virtual disks (334, 420) to a guest (336, 426, 506) in one operation (428), wherein instructions for the operation are executed without interruption; detecting a memory disconnect by checking a list of block memory units received from the host operating system; Updating a guest configuration (430) for the guest to remove the set of virtual disks in response to detecting the disconnection of the storage; and Unmount the storage from the set of mount points by sending a message to the host operating system. [14] The computer system (404) of any one of the preceding claims 10 to 13, wherein the plurality of processor units execute the program instructions to: attaching the set of virtual disks to the guest by a hypervisor (510) for the guest; Creating a set of partitions for the set of virtual disks before mounting the storage; and Creating a set of file systems (422) in the set of partitions for the set of virtual disks prior to mounting the storage, wherein the storage is a physical storage unit, and wherein upon mounting, by the number of processor units, the storage at the set of mount points, the number of processor units executes the program instructions to: mount the set of file systems in the set of partitions at the set of mount points. [15] The computer system of any of claims 10 to 14, wherein the guest is selected from a group comprising an operating system, a guest operating system, and a virtual machine. [16] A computer system (404) comprising: a number of processor units (408), wherein the number of processor units executes the program instructions for: detecting an attachment of a memory (338, 412, 500) to a host operating system (502); Mounting the storage at a set of mount points (416); Creating a set of virtual disks and assigning, by the number of processor units, the set of virtual disks (334, 420) to a guest (336, 426, 506) in an operation (428), wherein instructions for the operation are executed without interruption, wherein the guest is selected from a group comprising an operating system, a guest operating system and a virtual machine; attaching the set of virtual disks to the guest by a hypervisor (510) for the guest; Creating a set of partitions for the set of virtual disks before mounting the storage; Creating a set of file systems (422) in the set of partitions for the set of virtual disks prior to mounting the storage, wherein the storage is a physical storage unit, and wherein upon mounting, by the number of processor units, the storage at the set of mount points, the number of processor units executes the program instructions to: mount the set of file systems in the set of partitions at the set of mount points. [17] A computer system according to any one of the preceding claims 10 to 16, wherein the operation of creating and assigning the set of virtual disks to the guest is an atomic operation (429, 508), and wherein in creating, by the number of processor units, the set of virtual disks and in assigning the set of virtual disks to the guest in the operation, wherein instructions for the operation are performed without interruption, the number of processor units executes the program instructions to: Creating a set of virtual disk image files in the memory, the set of virtual disk image files (424, 512) being for the set of virtual disks; and Updating a guest configuration (430) for the hypervisor for the guest, wherein the hypervisor attaches the set of virtual disks to the guest using the guest configuration.

Citation Information

Patent Citations

  • System and method for converting a physical disk to a virtual disk

    US20150012570A1