CN111488198B - Virtual machine scheduling method, system and medium in super fusion environment - Google Patents

Virtual machine scheduling method, system and medium in super fusion environment Download PDF

Info

Publication number
CN111488198B
CN111488198B CN202010300695.0A CN202010300695A CN111488198B CN 111488198 B CN111488198 B CN 111488198B CN 202010300695 A CN202010300695 A CN 202010300695A CN 111488198 B CN111488198 B CN 111488198B
Authority
CN
China
Prior art keywords
virtual machine
host
hash value
user
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010300695.0A
Other languages
Chinese (zh)
Other versions
CN111488198A (en
Inventor
卢刚
孙利杰
杨鹏举
欧阳殷朝
胡智峰
夏华
陈松政
刘文清
杨涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Qilin Xin'an Technology Co ltd
Original Assignee
Hunan Qilin Xin'an Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Qilin Xin'an Technology Co ltd filed Critical Hunan Qilin Xin'an Technology Co ltd
Priority to CN202010300695.0A priority Critical patent/CN111488198B/en
Publication of CN111488198A publication Critical patent/CN111488198A/en
Application granted granted Critical
Publication of CN111488198B publication Critical patent/CN111488198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a virtual machine storage management method, a system and a medium in a super fusion environment, wherein the implementation steps of preparing a virtual machine in the method comprise the following steps: copying the system mirror image template file into each host; creating a corresponding catalog D in a virtual storage pool of the distributed storage system according to user information of each user and system mirror image template file information required to be used; and writing the system image difference files and the user disk image files required by each user to run the virtual machine into a directory D of the distributed storage system respectively, so that the system image difference files and the user disk image files required by the user to run the virtual machine are stored in the same target host H of the distributed storage system. According to the invention, the files required by the virtual machine are distributed and position optimized, and the virtual machine of the user is scheduled to run on the host computer where the files are located, so that the access performance of the virtual machine can be improved, and the network overhead can be reduced.

Description

Virtual machine scheduling method, system and medium in super fusion environment
Technical Field
The invention relates to a super fusion technology of a computer network, cloud computing, virtual computing and a cloud desktop, in particular to a virtual machine storage management method, a virtual machine storage management system and a virtual machine storage management medium under a super fusion environment.
Background
The super fusion infrastructure is based on a standard and general hardware platform (such as an x 86-based host and an arm-based host), and resources and technologies such as calculation, network, storage, virtualization and the like are provided in the same host device, and a plurality of hosts can realize calculation, storage and network resource fusion of each host in a software definition mode through a network, so that a technical architecture of a software definition data center centered on virtualization is realized.
The core of the super fusion infrastructure is fusion of storage. In general, a storage device of a single host includes a plurality of physical disks, wherein a part of the physical disks form a local storage of the host, a host operating system, virtualization software and the like are installed on the storage device, the local storage can be directly accessed by an application program running on the host, other physical disks are used as data storage, the data storage of the plurality of hosts form a virtual storage pool of a super fusion system, and the virtual storage pool can be installed on all hosts in the super fusion cluster and accessed by the application program on any host. The data storage and fusion into a virtual storage pool are realized by distributed storage software, such as closed source distributed storage software developed by each manufacturer or glusterfs, ceph based on an open source, and a distributed storage algorithm in the software is a key for determining which host storage devices the files are actually stored in.
The distributed storage generally adopts a consistent hash algorithm to determine which hosts the file is actually stored in, in a specific implementation, the directory can be created on the data storage of each host, the directory of each host is allocated with a non-overlapping hash value range, the hash value ranges of all hosts form a complete [0, FFFFFFFF ] 4-byte 32-bit value space, and each hash value range can be uniformly allocated among the hosts in 32-bit value space, can be allocated proportionally according to the size of the data storage on each host, or can be randomly allocated; when a file is saved under the catalog, if the hash value of the file name falls in the hash range of the catalog of a host computer, the file is written into the data storage of the host computer; for multi-copy distributed storage, the copy can take the data storage of the host as a unit, the hosts of the same copy group are generally 2 to 3, the hash value ranges of the same catalogs of the hosts of the same group are the same, and the same file can be written into all member hosts in the hosts of the group, so that the aim of multi-copy of the file is fulfilled.
Although the super-fusion infrastructure can bring advantages of lateral expansion and low cost, compared with the traditional centralized storage device, a standard general hardware platform cannot use an optimization means of some special storage devices, so that the storage performance often becomes a bottleneck of the whole super-fusion system and a key of project success and failure. In order to make up for performance gap between general storage hardware and special storage equipment, various optimizations are performed on storage used by a virtual machine in a super fusion system, such as slicing a volume file of the virtual machine system and ensuring that a group of complete sliced copies are stored on data storage provided by the same host; when the virtual machine is composed of a plurality of virtual machine storage components, main copies of all the components in the virtual storage pool are scheduled and stored on the same host; the optimization aims to run the virtual machine on the host computer with the same or the nearest storage as much as possible, improve the data read-write performance and reduce the network delay and the bandwidth cost in the read-write process.
Virtual machine operation with different specification requirements also depends on the availability of other resources on the host, such as cpu, memory, network, GPU resources, etc., and these factors also affect virtual machine scheduling. When the host where the storage resources required by the virtual machine are located cannot meet the resources beyond the storage, the virtual machine can be scheduled to run on other hosts, and the access performance of the virtual machine on the storage is reduced. Therefore, how to improve the performance of each storage component required by the virtual machine access in the super fusion infrastructure system from a specific technical scheme is still a problem to be improved in the existing various super fusion implementation technologies.
Disclosure of Invention
The invention aims to solve the technical problems: aiming at the problems in the prior art, the invention provides a virtual machine storage management method, a virtual machine storage management system and a virtual machine storage management medium in a super fusion environment.
In order to solve the technical problems, the invention adopts the following technical scheme:
a virtual machine scheduling method under a super fusion environment, the implementation steps of preparing a virtual machine include:
1) Copying the system mirror image template file into each host;
2) Creating a corresponding catalog D in a virtual storage pool of the distributed storage system according to user information of each user and system mirror image template file information required to be used;
3) And writing the system image difference files and the user disk image files required by each user to run the virtual machine into a directory D of the distributed storage system respectively, so that the system image difference files and the user disk image files required by the user to run the virtual machine are stored in the same target host H of the distributed storage system.
Optionally, creating the corresponding directory D in the virtual storage pool of the distributed storage system in step 2) specifically refers to creating a nested two-layer subdirectory structure of a user name and a system mirror template name at a designated location in the virtual storage pool of the distributed storage system as the directory D, where the nested two-layer subdirectory structure of the user name and the system mirror template file name specifically refers to using the user name as a first-layer subdirectory and the system mirror template name as a second-layer subdirectory under the first-layer subdirectory, or using the system mirror template name as the first-layer subdirectory and the user name as the second-layer subdirectory under the first-layer subdirectory.
Optionally, the step of the distributed storage system processing the file write request when writing the directory D of the distributed storage system in step 3) includes: acquiring a corresponding writing directory name of a file writing request in a virtual storage pool; judging whether the written directory name meets the preset format requirement, wherein the preset format requirement refers to the mode of generating the directory D in the step 2), and if the written directory name meets the preset format requirement, calculating a hash value by adopting a preset hash algorithmhThe method comprises the steps of carrying out a first treatment on the surface of the Otherwise, calculating a hash value by adopting a preset hash algorithm aiming at the file name of the file writing requesthThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehAnd presetAnd (3) matching the hash value ranges, obtaining one or a group of hosts corresponding to the matched hash value intervals in the hash value ranges, determining a target host H according to the one or the group of hosts, and writing the file of the file writing request into the target host H.
Optionally, the step of starting the virtual machine further comprises the following steps of:
s1) determining a catalog D of a virtual machine operated by a target user;
s2) determining a target host H for a target user to run the virtual machine;
s3) based on the system mirror image template file and the position information appointed in the system mirror image difference file in the catalog D, the system mirror image template file stored locally is found in the target host H, the corresponding system mirror image difference file and the user disk mirror image file in the catalog D are used as the operation parameters of the local system mirror image template file, and the virtual machine of the target user is started on the target host H.
Optionally, the detailed steps of step S2) include:
s2.1) calculating a hash value by adopting a preset hash algorithm according to the file name of the system image difference file in the directory D of the virtual machine operated by the target userhThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehMatching with a preset hash value range, if the matching is successful, jumping to execute the step S2.3), otherwise jumping to execute the step S2.2);
s2.2) calculating a hash value according to the directory D by adopting a preset hash algorithmhThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehMatching with a preset hash value range;
s2.3) obtaining one or a group of hosts corresponding to the matched hash value interval in the hash value range, and determining a target host H according to the one or the group of hosts.
Optionally, when one or a group of hosts corresponding to the matched hash value interval in the hash value range is obtained, each host or a group of hosts has a static hash value interval; or each host or a group of hosts has a dynamic hash value interval and hash valueshThe method comprises the steps of dynamically distributing hash value intervals to each host or a group of hosts before matching with a preset hash value range: obtaining the obtainedAnd acquiring the hardware requirements of the user running the virtual machine, acquiring the hosts meeting the hardware requirements in the distributed storage system, and evenly distributing the hash value ranges to the hosts meeting the hardware requirements, so that the hash value intervals of the hosts meeting the hardware requirements are determined, and the hash value intervals of the hosts not meeting the hardware requirements are made to be empty.
Optionally, the determining the target host H according to one or a group of hosts includes: if the hash value interval corresponds to one host, the host is directly used as a target host H; if the hash value interval corresponds to a plurality of hosts, selecting one host from the plurality of hosts as a target host H, wherein the selected mode is any one of the following modes: mode 1, randomly selecting a host as a target host H; mode 2, selecting one host with the lowest CPU utilization rate as a target host H; mode 3, selecting one host with the lowest memory utilization rate as a target host H; mode 4, the CPU utilization and the memory utilization are weighted and summed, and one host with the lowest weighted and summed is selected as the target host H.
Optionally, after the virtual machine is started, the method further comprises the following steps: checking a locally stored system image template file and a locally running virtual machine, and deleting the locally stored system image template file from the local if the locally stored system image template file is not used by any locally running virtual machine.
In addition, the invention also provides a virtual machine scheduling device in the super fusion environment, which comprises computer equipment and is characterized in that the computer equipment is programmed or configured to execute the steps of the virtual machine scheduling method in the super fusion environment, or a computer program programmed or configured to execute the virtual machine scheduling method in the super fusion environment is stored in a memory of the computer equipment.
Furthermore, the present invention provides a computer readable storage medium having stored thereon a computer program programmed or configured to perform the virtual machine scheduling method in the super fusion environment.
Compared with the prior art, the invention has the following advantages: the invention divides the files needed by the virtual machine operation into a system mirror image template file, a system mirror image difference file and a user disk mirror image file, the system mirror image difference file and the user disk mirror image file are stored in a virtual storage pool through the system mirror image template file in a host machine local storage, a specific mapping mode is adopted to generate a catalog D, the system mirror image difference file and the user disk mirror image file are stored in the same target host machine H of a distributed storage system, the running and access storage performance of the virtual machine is improved on the premise of keeping the advantages of transverse expansion and low cost of a super fusion basic framework, the system mirror image template copy of the virtual machine is stored in each host machine local storage, the system disk efficiency of the virtual machine is improved, the difference mirror image file of the system mirror image and the data disk of the virtual machine user disk mirror image file are stored in the same host machine by optimizing the distributed storage, the virtual machine scheduling is provided with a scheduling basis, the virtual machine is scheduled to run in one host machine or a group of the host machine where the system mirror image difference file and the user disk mirror image file is located, the virtual machine can directly access the storage equipment where the virtual machine is located, the access storage occupation performance is improved, the network delay and the bandwidth are reduced, the storage consumption of the virtual machine can be reduced, the storage space of the virtual machine can be not required to be stored in the host machines can meet the storage requirements except the storage requirements of the virtual machine can be and the storage requirements, and the storage requirements are not meet the storage requirements.
Drawings
FIG. 1 is a flow chart of preparing a virtual machine in an embodiment of the invention.
FIG. 2 is a flow chart of processing a file write request according to an embodiment of the invention.
FIG. 3 is a flowchart of starting a virtual machine according to an embodiment of the present invention.
Detailed Description
As shown in fig. 1, in the virtual machine scheduling method in the super fusion environment of the present embodiment, the implementation steps for preparing a virtual machine include:
1) Copying the system mirror image template file into each host;
2) Creating a corresponding catalog D in a virtual storage pool of the distributed storage system according to user information of each user and system mirror image template file information required to be used;
3) And writing the system image difference files and the user disk image files required by each user to run the virtual machine into a directory D of the distributed storage system respectively, so that the system image difference files and the user disk image files required by the user to run the virtual machine are stored in the same target host H of the distributed storage system.
In this embodiment, files (storage components) required by the user to run the virtual machine include a system image template file, a system image difference file, and a user disk image file. The system mirror image template file is shared by a plurality of users, the back end file of the system mirror image difference file is the system mirror image template file, and the system mirror image difference file and the user disk mirror image file are independently owned by each user virtual machine. In this embodiment, a copy of a system image template file required for running a virtual machine is stored in a local storage of each host, a directory name and a file name of the same system image template file on each host are the same, a system image difference file required for running the virtual machine and a user disk image file are stored in a virtual storage pool, and a file full name (including a host local storage directory name) pointing to the system image template file is stored in the system image difference file; when different hosts access the system image difference files, the back-end system image templates of the system image difference files are the system image difference files locally stored on the hosts, and the system image difference files are identical copies.
In this embodiment, creating the corresponding directory D in the virtual storage pool of the distributed storage system in step 2) specifically refers to creating a nested two-layer subdirectory structure of the user name and the system mirror template name as the directory D at a designated location in the virtual storage pool of the distributed storage system, and the nested two-layer subdirectory structure of the user name and the system mirror template file name specifically refers to using the user name as a first-layer subdirectory and the system mirror template name as a second-layer subdirectory under the first-layer subdirectory, or using the system mirror template name as the first-layer subdirectory and the user name as the second-layer subdirectory under the first-layer subdirectory. For example, assuming that a virtual storage pool of the distributed storage system has a designated mount location (which may be referred to as a mount directory or mount point) of "/home/kylin-data/", the system image template employs a kylin operating system 3.3 and is named as kylinos33, a system image difference file "delta. Img" generated by a user1 based on a virtual machine V of the system image template kylinos33, and a user disk image file "user. Img" are stored under a directory (directory D) "/home/kylin-data/kylin-desktops/user1/kylinos33", that is, the nested two-layer subdirectory structure is "user1/kylinos33", and further, the nested two-layer subdirectory structure may also employ "kylinos 33/user 1". In addition, as an alternative implementation manner, the system image template file "GUEST. IMG" in this embodiment is stored under the local storage directory/home/desktop-template/kylinos 33 of the target host. It should be noted that "DELTA.IMG", "USER.IMG", "GUEST.IMG" herein are merely a named example, and the implementation is not limited thereto. It should be noted that, the directory D refers to a directory created in the virtual storage pool, when the virtual storage pool is based on a file system, for example, the file system of the virtual storage pool may be mounted in a/home/kylin-data directory of the host, and then a directory kylin-desktops/user1/kylinos3.3 is created under/home/kylin-data, where the directory name created in the file system of the corresponding virtual storage pool is/kylin-desktop/user 1/kylinos3.3. For the consistent hash positioning algorithm inside the distributed file system, the distributed file system cannot know the mount directory in advance, in the foregoing example, the designated mount location (may be called mount directory or mount point) on the host is "/home/kylin-data", while the directory D refers to/kylin-desktops/user 1/kylinos3.3, when the storage pool is mounted to/home/kylin-data directory, the mount point directory refers to/home/kylin-data, and the mounted D directory full path becomes/home/kylin-data/kylin-desktops/user 1/kylinos3.3, but because the distributed storage subsystem does not know where it will mount, the internal program of the storage subsystem uses its own directory name information.
As shown in fig. 2, stepsThe step of the distributed storage system processing the file write request when writing the directory D of the distributed storage system in step 3) includes: acquiring a corresponding writing directory name of a file writing request in a virtual storage pool; judging whether the written directory name meets the preset format requirement (meeting the mode M), wherein the preset format requirement refers to the mode of generating the directory D in the step 2 (namely the mode M in the embodiment), and if the written directory name meets the preset format requirement, calculating the hash value of the written directory name by adopting a preset hash algorithm A (such as a DM-hash (also can be a common hash algorithm such as MD5, SHA and the like)hThe method comprises the steps of carrying out a first treatment on the surface of the Otherwise, calculating a hash value by adopting a hash algorithm A aiming at the file name of the file writing requesthThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehAnd matching with a preset hash value range, obtaining one or a group of hosts corresponding to the matched hash value interval in the hash value range, determining a target host H according to the one or the group of hosts, and writing the file of the file writing request into the target host H. Since the written directory name directly adopts a preset hash algorithm A to calculate the hash value when the written directory name meets the mode MhAccording to the hash valuehDetermining which host computer the written file is stored in, and since the system image difference file of the same user's same system image template file and the directory of the user's disk image file are the same directory D, the two files will generate the same hash valuehThe distributed storage software deposits these two files onto the data store of the same target host H. Undoubtedly, the written directory name is subjected to a preset hash algorithm (recorded as a hash algorithm A) to calculate a hash valuehWhen the method is used, the hash value can be calculated by adopting a hash algorithm A by adopting the full name or the short name of the written directory name according to the requirementhAs long as the full names or short names used can be distinguished from each other, mapping to different target hosts H can be achieved.
In this embodiment, a consistent hash algorithm is used as a distributed algorithm of a distributed storage system, in the algorithm, a directory structure on a storage pool is created on a data storage of each host for the storage pool, a hash value interval is written in an extended attribute of each directory structure, hash value intervals of all hosts form a 4-byte 32-bit range (preset hash value range) of [0, FFFFFFFF ], and hash value intervals of the directory structure on each host are not overlapped with each other. In this embodiment, a hash algorithm a is used to calculate a hash value h for a file name or a name of a directory D where the file is located according to whether the directory D matches the pattern M as a basis, and when the hash value h falls within the range of the directory attribute on a host, the file is stored in the data storage of the host; when the hyperfusion hypervisor prepares storage components for the user that are required by the virtual machine, the distributed storage writes these storage components to the data store of the selected host, and the hyperfusion hypervisor initiates the virtual machine process on the selected target host H.
For example, in a super-fusion cloud desktop system composed of 3 servers, each host divides the 32-bit hash value range of the directory equally, and the hash value intervals of the 1 st, 2 nd and 3 rd servers are [0xAAAAA, 0 xFFFFFFFFFF in sequence]、[0x00000000, 0x55555554]、[0x55555555, 0xAAAAAAA9](the starting point may be any one, in this example, the 2 nd starting point is the range 0 starting point), and the consistent hashing algorithm uses the pattern M as/kylin-desktops/. X/, where "." represents a single character, "." represents any character string (which may be a null string), "." represents any character string of at least one character, the first "." is used to match any user name, and the second "." is used to match any system image template file name. The cloud desktop management system creates DELTA.IMG and USER.IMG in the/home/kylin-data/user 1/kylinos33 catalog, and as the mode M can be matched, the cloud desktop management system directly uses the character string/home/kylin-data/user 1/kylinos33 to calculate the hash value instead of the character string DELTA.IMG or USER.IMG, and calculates the hash valuehIf the virtual machine V is 0x91c3e25f, the virtual machine V falls into a hash value interval of a 3 rd host, the distributed storage subsystem stores the two IMG files into data storage of the 3 rd host, and when a user requests to start the virtual machine V, the cloud desktop management system acquires the hash value of the catalog/home/kylin-data/user 1/kylinos33 to obtain the 3 rd host, and then the virtual machine V is scheduled to run on the 3 rd host.
For example, a super-fusion cloud desktop system is formed by 8 servers (with serial numbers of 1-8), the distributed storage divides the super-fusion cloud desktop system into 4 groups (1, 2) (3, 4) (5, 6) (7, 8), the data of two servers in the same group are stored as copy groups, identical file copies are stored, GPU support is required by an operating system installed in an IMG (media management gateway) of an image template file GUEST of a kurinos 33, GPU resources are arranged on 1,2, 3,4, 7 and 8 of the 8 servers, GPU resources are not arranged on 5 and 6 of the 8 servers, the image template file GUEST/kurinos 33 is stored under a local storage catalog/home/desktop_template/kurinos 33 of each server, a virtual storage pool formed by server data storage is mounted in a per home/kurinos-data catalog, a user1 is stored in a system image difference file DeltaIMG and a user disk file USER of a user based on a virtual machine V of the kurinos 33, and the user image file USER is stored in a hash value of the host computer 32 in the catalog range of each server data/kurinos 33, and the host is distributed in the host 32: group 1 (1, 2) is [0x 5555555555, 0xaaaaaa 9], group 2 (3, 4) is [0xAAAAAAA, 0xFFFFFFFF ], group 3 (5, 6) is (0, 0), group 4 is [0x 000000000000, 0x55555554], the consistent hash algorithm uses pattern M to be/kylin-desktop/, the cloud desktop management system creates delta. IMG and user. IMG in the list of/home/kylin-data/kylin-desktop/user 1/kikinos 33, and as the pattern M can be matched, the hash values of the character string/kiosks/user 1/kikinos 33 are directly used instead of the character string delta. IMG or user. IMG, the calculated hash values are 0x91c3e25f, the hash values are obtained in the hash host machine group 1, the hash value is obtained by the cloud desktop management system, the hash values are obtained in the hash machine 1 st host machine list of the cloud desktop management system, and the virtual machine is stored in the list of the host machine 1 st user1, the virtual machine is started up in the virtual machine list of the cloud desktop management system, and the virtual machine is requested to obtain the virtual machine 1 st virtual machine 1, and the virtual machine is stored in the list of the host machine.
As shown in fig. 3, the preparation of the virtual machine further includes the following steps of starting the virtual machine:
s1) determining a catalog D of a virtual machine operated by a target user;
s2) determining a target host H for a target user to run the virtual machine;
s3) based on the system mirror image template file and the position information appointed in the system mirror image difference file in the catalog D, the system mirror image template file stored locally is found in the target host H, the corresponding system mirror image difference file and the user disk mirror image file in the catalog D are used as the operation parameters of the local system mirror image template file, and the virtual machine of the target user is started on the target host H.
In this embodiment, the detailed steps of step S2) include:
s2.1) calculating a hash value by adopting a preset hash algorithm according to the file name of the system image difference file in the directory D of the virtual machine operated by the target userhThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehMatching with a preset hash value range, if the matching is successful, jumping to execute the step S2.3), otherwise jumping to execute the step S2.2);
s2.2) calculating a hash value according to the directory D by adopting a preset hash algorithmhThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehMatching with a preset hash value range;
s2.3) obtaining one or a group of hosts corresponding to the matched hash value interval in the hash value range, and determining a target host H according to the one or the group of hosts.
As an optional implementation manner, in this embodiment, when one or a group of hosts corresponding to the matched hash value interval in the hash value range is obtained, each host or a group of hosts has a static hash value interval.
As another alternative implementation, considering that some virtual machines have specific requirements on hardware resources, for example, GPU or other hardware accelerator is needed, for the above problem, a manner of dynamically allocating hash value intervals according to hardware requirements may be adopted: each host or a group of hosts has a dynamic hash value interval and hashes the hash valuehThe method comprises the steps of dynamically distributing hash value intervals to each host or a group of hosts before matching with a preset hash value range: obtaining the hardware requirement of the user for running the virtual machine, obtaining the hosts meeting the hardware requirement in the distributed storage system, and evenly distributing the hash value ranges to the hosts meeting the hardware requirement, so as to determine the hash value interval of each host meeting the hardware requirement, and make the hash value interval of the hosts not meeting the hardware requirement be empty (i.e. not matching any hash value)h)。
In this embodiment, a hash value interval may correspond to one host, or may correspond to a group of hosts as needed, for example, when a distributed storage used in the super-fusion architecture has multiple (2 to 3) copies in a host data storage unit, the hosts stored by the same data are regarded as a group in the above method, the user's system image difference file and the user's disk image file calculate the hosts actually stored in the group in a unit of group, and each host in the group stores the same difference file and disk image file copy. In this embodiment, the detailed steps of determining the target host H according to one or a group of hosts include: if the hash value interval corresponds to one host, the host is directly used as a target host H; if the hash value interval corresponds to a plurality of hosts, selecting one host from the plurality of hosts as a target host H, wherein the selected mode is any one of the following modes: mode 1, randomly selecting a host as a target host H; mode 2, selecting one host with the lowest CPU utilization rate as a target host H; mode 3, selecting one host with the lowest memory utilization rate as a target host H; mode 4, the CPU utilization and the memory utilization are weighted and summed, and one host with the lowest weighted and summed is selected as the target host H.
In addition, in order to further prevent the system image template file from wasting space in the host, in this embodiment, after starting the virtual machine, the method further includes the following steps: checking a locally stored system image template file and a locally running virtual machine, and deleting the locally stored system image template file from the local if the locally stored system image template file is not used by any locally running virtual machine.
In summary, 1, in this embodiment, three image files required by the virtual machine operation are identified, a system image template is stored locally in a host, and a system image difference file and a user disk image file are stored in a storage cluster and are stored in a directory with a directory name in a specific mode; 2. the consistent hash algorithm of the embodiment is associated with a specific mode, a hash interval is allocated on a directory according to the consistent algorithm when the file is stored in a distributed mode, a file name hash value is used for calculating to obtain a data storage node to which the file should be allocated, but when the file directory is matched with the specific mode, the hash value interval is calculated by using a path name instead of a file name, so that the data storage of a system image difference file and a user disk image file which are required by the same system image virtual machine of the same user and are positioned in the same host computer is ensured; 3, obtaining a hash value interval of the directory during virtual machine scheduling, and calculating a path hash value to obtain a host node; in the embodiment, the specification requirements of the virtual machine and the host resources of the server are associated with the storage positions of the mirror image files, and when special requirements exist in the specification of the virtual machine and some hosts cannot be met, the storage component files of the virtual machine can not be stored on the host storage; and 5, in the multi-copy environment, the data storage content of each copy node is consistent, and in the method of the embodiment, the virtual machine can be conveniently scheduled to any one of the copy nodes or the preferred node. According to the virtual machine scheduling method under the super fusion environment, on the premise that the transverse expansion and low cost advantages of the super fusion infrastructure are maintained, the running and access storage performance of the virtual machine can be improved, the disk efficiency of the virtual machine access system is improved by locally storing and storing the mirror image template copies of the virtual machine system in each host, the data disk of the same host is stored with the difference mirror image files of the system mirror images and the mirror image files of the virtual machine user disk by optimizing the consistent hash algorithm in the distributed storage, a scheduling basis is provided for the virtual machine scheduling, the virtual machine scheduling is performed on one host or a group of hosts where the difference files of the system mirror images and the mirror image files of the user disk are located, so that the virtual machine can directly access the storage equipment of the host, the access storage performance can be improved, the network delay and the bandwidth occupation can be reduced, and the storage components required by comprehensively evaluating other factors except the storage requirements in the virtual machine specification are not stored in the local storage and the data storage of the hosts which do not meet the specification requirements, and the probability that the virtual machine cannot be scheduled to the proper hosts can be reduced.
In addition, the invention also provides a virtual machine scheduling device in the super fusion environment, which comprises a computer device, wherein the computer device is programmed or configured to execute the steps of the virtual machine scheduling method in the super fusion environment, or a computer program programmed or configured to execute the virtual machine scheduling method in the super fusion environment is stored in a memory of the computer device.
Furthermore, the present invention provides a computer readable storage medium having stored thereon a computer program programmed or configured to perform the virtual machine scheduling method in the aforementioned super fusion environment.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is directed to methods, apparatus (systems), and computer program products in accordance with embodiments of the present application, and to apparatus for performing functions specified in a flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above examples, and all technical solutions belonging to the concept of the present invention belong to the protection scope of the present invention. It should be noted that modifications and adaptations to the present invention may occur to one skilled in the art without departing from the principles of the present invention and are intended to be within the scope of the present invention.

Claims (9)

1. The virtual machine scheduling method in the super fusion environment is characterized by comprising the following implementation steps of:
1) Copying the system mirror image template file into each host;
2) Creating a corresponding catalog D in a virtual storage pool of the distributed storage system according to user information of each user and system mirror image template file information required to be used;
3) Writing the system image difference files and the user disk image files required by each user to run the virtual machine into a directory D of the distributed storage system respectively, so that the system image difference files and the user disk image files required by the user to run the virtual machine are stored in the same target host H of the distributed storage system;
the preparation of the virtual machine further comprises the following steps of starting the virtual machine:
s1) determining a catalog D of a virtual machine operated by a target user;
s2) determining a target host H for a target user to run the virtual machine;
s3) based on the system mirror image template file and the position information appointed in the system mirror image difference file in the catalog D, the system mirror image template file stored locally is found in the target host H, the corresponding system mirror image difference file and the user disk mirror image file in the catalog D are used as the operation parameters of the local system mirror image template file, and the virtual machine of the target user is started on the target host H.
2. The virtual machine scheduling method in the super fusion environment according to claim 1, wherein creating a corresponding directory D in the virtual storage pool of the distributed storage system in step 2) specifically means creating a nested two-layer subdirectory structure of a user name and a system mirror template name as the directory D at a specified location in the virtual storage pool of the distributed storage system, and the nested two-layer subdirectory structure of the user name and the system mirror template file name specifically means using the user name as a first-layer subdirectory, using the system mirror template name as a second-layer subdirectory under the first-layer subdirectory, or using the system mirror template name as the first-layer subdirectory and the user name as a second-layer subdirectory under the first-layer subdirectory.
3. The virtual machine scheduling method in a super fusion environment according to claim 1, wherein the step of the distributed storage system processing the file write request when writing the directory D of the distributed storage system in step 3) includes: acquiring a corresponding writing directory name of a file writing request in a virtual storage pool; judging whether the written directory name meets the preset format requirement, wherein the preset format requirement refers to the mode of generating the directory D in the step 2), and if the written directory name meets the preset format requirement, calculating a hash value by adopting a preset hash algorithmhThe method comprises the steps of carrying out a first treatment on the surface of the Otherwise, calculating a hash value by adopting a preset hash algorithm aiming at the file name of the file writing requesthThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehAnd matching with a preset hash value range, obtaining one or a group of hosts corresponding to the matched hash value interval in the hash value range, determining a target host H according to the one or the group of hosts, and writing the file of the file writing request into the target host H.
4. The virtual machine scheduling method in the super fusion environment according to claim 1, wherein the detailed steps of step S2) include:
s2.1) calculating a hash value by adopting a preset hash algorithm according to the file name of the system image difference file in the directory D of the virtual machine operated by the target userhThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehMatching with a preset hash value range, if the matching is successful, jumping to execute the step S2.3), otherwise jumping to execute the step S2.2);
s2.2) calculating a hash value according to the directory D by adopting a preset hash algorithmhThe method comprises the steps of carrying out a first treatment on the surface of the Will hash the valuehMatching with a preset hash value range;
s2.3) obtaining one or a group of hosts corresponding to the matched hash value interval in the hash value range, and determining a target host H according to the one or the group of hosts.
5. The virtual machine scheduling method in the super fusion environment according to claim 3 or 4, wherein when one or a group of hosts corresponding to the matched hash value interval in the hash value range is obtained, each host or a group of hosts has a static hash value interval; or each host or a group of hosts has a dynamic hash value interval and hash valueshThe method comprises the steps of dynamically distributing hash value intervals to each host or a group of hosts before matching with a preset hash value range: the method comprises the steps of obtaining hardware requirements of a user running a virtual machine, obtaining hosts meeting the hardware requirements in a distributed storage system, and evenly distributing hash value ranges to the hosts meeting the hardware requirements, so that hash value intervals of all the hosts meeting the hardware requirements are determined, and hash value intervals of hosts not meeting the hardware requirements are made to be empty.
6. The virtual machine scheduling method in a super fusion environment according to claim 3 or 4, wherein the determining the target host H according to one or a group of hosts comprises: if the hash value interval corresponds to one host, the host is directly used as a target host H; if the hash value interval corresponds to a plurality of hosts, selecting one host from the plurality of hosts as a target host H, wherein the selected mode is any one of the following modes: mode 1, randomly selecting a host as a target host H; mode 2, selecting one host with the lowest CPU utilization rate as a target host H; mode 3, selecting one host with the lowest memory utilization rate as a target host H; mode 4, the CPU utilization and the memory utilization are weighted and summed, and one host with the lowest weighted and summed is selected as the target host H.
7. The method for scheduling virtual machines in a super fusion environment according to claim 1, further comprising the following steps after starting the virtual machine: checking a locally stored system image template file and a locally running virtual machine, and deleting the locally stored system image template file from the local if the locally stored system image template file is not used by any locally running virtual machine.
8. A virtual machine scheduling apparatus in a super fusion environment, comprising a computer device, wherein the computer device is programmed or configured to perform the steps of the virtual machine scheduling method in a super fusion environment according to any one of claims 1 to 7, or a computer program programmed or configured to perform the virtual machine scheduling method in a super fusion environment according to any one of claims 1 to 7 is stored on a memory of the computer device.
9. A computer readable storage medium having stored thereon a computer program programmed or configured to perform the virtual machine scheduling method in a super fusion environment of any one of claims 1 to 7.
CN202010300695.0A 2020-04-16 2020-04-16 Virtual machine scheduling method, system and medium in super fusion environment Active CN111488198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010300695.0A CN111488198B (en) 2020-04-16 2020-04-16 Virtual machine scheduling method, system and medium in super fusion environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010300695.0A CN111488198B (en) 2020-04-16 2020-04-16 Virtual machine scheduling method, system and medium in super fusion environment

Publications (2)

Publication Number Publication Date
CN111488198A CN111488198A (en) 2020-08-04
CN111488198B true CN111488198B (en) 2023-05-23

Family

ID=71812909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010300695.0A Active CN111488198B (en) 2020-04-16 2020-04-16 Virtual machine scheduling method, system and medium in super fusion environment

Country Status (1)

Country Link
CN (1) CN111488198B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685131A (en) * 2020-12-18 2021-04-20 湖南麒麟信安科技股份有限公司 Method and device for opening local file based on application virtualization
CN113535330B (en) * 2021-07-26 2023-08-08 北京计算机技术及应用研究所 Super fusion system data localization storage method based on node evaluation function
CN113986124B (en) * 2021-10-25 2024-02-23 深信服科技股份有限公司 User configuration file access method, device, equipment and medium
CN114003350B (en) * 2022-01-04 2022-03-25 北京志凌海纳科技有限公司 Data distribution method and system of super-fusion system
CN114661676B (en) * 2022-04-19 2023-03-21 重庆紫光华山智安科技有限公司 Distributed database management system, method, electronic device and readable storage medium
CN114840488B (en) * 2022-07-04 2023-05-02 柏科数据技术(深圳)股份有限公司 Distributed storage method, system and storage medium based on super fusion structure

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185928A (en) * 2011-06-01 2011-09-14 广州杰赛科技股份有限公司 Method for creating virtual machine in cloud computing system and cloud computing system
CN102819599A (en) * 2012-08-15 2012-12-12 华数传媒网络有限公司 Method for constructing hierarchical catalogue based on consistent hashing data distribution
CN102855284A (en) * 2012-08-03 2013-01-02 北京联创信安科技有限公司 Method and system for managing data of cluster storage system
CN103019802A (en) * 2012-11-20 2013-04-03 中标软件有限公司 Virtual machine management method and virtual machine management platform
CN103491144A (en) * 2013-09-09 2014-01-01 中国科学院计算技术研究所 Method for constructing wide area network virtual platform
US8676809B1 (en) * 2008-06-30 2014-03-18 Symantec Corporation Method and apparatus for mapping virtual machine incremental images
CN105677256A (en) * 2016-01-08 2016-06-15 中电科华云信息技术有限公司 Virtual disk system based on local caching and scheduling method
US9537745B1 (en) * 2014-03-07 2017-01-03 Google Inc. Distributed virtual machine disk image deployment
CN108089913A (en) * 2017-12-28 2018-05-29 创新科存储技术(深圳)有限公司 A kind of virtual machine deployment method of super emerging system
CN110221868A (en) * 2019-05-31 2019-09-10 新华三云计算技术有限公司 Dispositions method, device, electronic equipment and the storage medium of host system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298559B (en) * 2014-09-30 2018-03-02 深信服科技股份有限公司 The method and device of physical host system virtualization
US10462221B2 (en) * 2017-02-25 2019-10-29 Vmware, Inc. Distributed storage resource management in a hyper converged infrastructure

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8676809B1 (en) * 2008-06-30 2014-03-18 Symantec Corporation Method and apparatus for mapping virtual machine incremental images
CN102185928A (en) * 2011-06-01 2011-09-14 广州杰赛科技股份有限公司 Method for creating virtual machine in cloud computing system and cloud computing system
CN102855284A (en) * 2012-08-03 2013-01-02 北京联创信安科技有限公司 Method and system for managing data of cluster storage system
CN102819599A (en) * 2012-08-15 2012-12-12 华数传媒网络有限公司 Method for constructing hierarchical catalogue based on consistent hashing data distribution
CN103019802A (en) * 2012-11-20 2013-04-03 中标软件有限公司 Virtual machine management method and virtual machine management platform
CN103491144A (en) * 2013-09-09 2014-01-01 中国科学院计算技术研究所 Method for constructing wide area network virtual platform
US9537745B1 (en) * 2014-03-07 2017-01-03 Google Inc. Distributed virtual machine disk image deployment
CN105677256A (en) * 2016-01-08 2016-06-15 中电科华云信息技术有限公司 Virtual disk system based on local caching and scheduling method
CN108089913A (en) * 2017-12-28 2018-05-29 创新科存储技术(深圳)有限公司 A kind of virtual machine deployment method of super emerging system
CN110221868A (en) * 2019-05-31 2019-09-10 新华三云计算技术有限公司 Dispositions method, device, electronic equipment and the storage medium of host system

Also Published As

Publication number Publication date
CN111488198A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN111488198B (en) Virtual machine scheduling method, system and medium in super fusion environment
US10394847B2 (en) Processing data in a distributed database across a plurality of clusters
JP6607901B2 (en) Scalable distributed storage architecture
US10019454B2 (en) Data management systems and methods
JP6798960B2 (en) Virtual Disk Blueprint for Virtualized Storage Area Networks
JP5065295B2 (en) Method, system, and computer-readable medium for sharing files between different virtual machine images
LU102666B1 (en) Small-file storage optimization system based on virtual file system in kubernetes user-mode application
CN104220987B (en) Using the method and system installed
JP2011076605A (en) Method and system for running virtual machine image
US20080028402A1 (en) Method of setting operation environment and computer system
US9378218B2 (en) Apparatus and method for enabling clients to participate in data storage in distributed file system
US10635604B2 (en) Extending a cache of a storage system
CN108200211B (en) Method, node and query server for downloading mirror image files in cluster
JP2008181213A (en) Information management system, information management device, and program
US10579419B2 (en) Data analysis in storage system
CN108475201A (en) A kind of data capture method in virtual machine start-up course and cloud computing system
WO2022175080A1 (en) Cache indexing using data addresses based on data fingerprints
US20190079875A1 (en) Efficient provisioning of virtual machines to endpoint computing environment
JP6680896B2 (en) Method and apparatus for replicating data between storage systems
CN107168646B (en) Distributed data storage control method and server
US20240005017A1 (en) Fencing off cluster services based on access keys for shared storage
CN109165095B (en) Task package based information system rapid opening method
CN112286626A (en) Method, system, device and medium for fast and secure cloning of cross-storage disks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 4 / F, Qilin science and Technology Park, No.20, Qiyun Road, high tech Zone, Changsha City, Hunan Province, 410000

Applicant after: Hunan Qilin Xin'an Technology Co.,Ltd.

Address before: 4 / F, Qilin science and Technology Park, No.20, Qiyun Road, high tech Zone, Changsha City, Hunan Province, 410000

Applicant before: HUNAN KYLIN XINAN TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant