[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN103618767B - Virtual machine configuration method and related equipment - Google Patents

Virtual machine configuration method and related equipment Download PDF

Info

Publication number
CN103618767B
CN103618767B CN201310570990.8A CN201310570990A CN103618767B CN 103618767 B CN103618767 B CN 103618767B CN 201310570990 A CN201310570990 A CN 201310570990A CN 103618767 B CN103618767 B CN 103618767B
Authority
CN
China
Prior art keywords
virtual machine
server
quota
authentication
value
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
CN201310570990.8A
Other languages
Chinese (zh)
Other versions
CN103618767A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310570990.8A priority Critical patent/CN103618767B/en
Publication of CN103618767A publication Critical patent/CN103618767A/en
Application granted granted Critical
Publication of CN103618767B publication Critical patent/CN103618767B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a virtual machine configuration method and related equipment. The virtual machine configuration method comprises the following steps: when sharing connection is conducted with a virtual machine server, an authentication request carrying user information sent by the virtual machine server is received, and the authentication request is forwarded to an authentication server; when the authentication server verifies authentication of the user information, preset redundancy configuration information corresponding to the user information sent by the authentication server is received; when a file creation request initiated by the virtual machine server is received, redundancy configuration is conducted on a created file according to the redundancy configuration information. By the adoption of the virtual machine configuration method and the related equipment, corresponding redundancy ratios are configured to virtual machine operating disks of different users.

Description

Virtual machine configuration method and related equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for configuring a virtual machine and a related device.
Background
In a current distributed NAS (Network Attached Storage) Storage, in order to ensure reliability of data in the distributed NAS Storage, redundancy configuration is usually performed on the stored data, and a redundancy configuration method in the prior art is based on a fixed rule, for example, a fixed redundancy mode and a redundancy ratio value are set for a certain directory or a certain file system on a Storage system.
For a virtual machine working disk created in a virtual machine server, different users have different purposes and different stored data, so that the requirements of different users on redundancy protection are different. However, in the prior art, the distributed NAS storage can only set a fixed redundancy protection mode for the virtual machine file, and cannot be distinguished according to the user type. For example, when the financial system uses the virtual machines, they may require the virtual machine working disks of their own to have a higher redundancy ratio value, and for the ordinary users, the lower redundancy ratio value may be adopted, but the existing redundancy ratio method cannot configure different redundancy ratio values for the virtual machine working disks used by the financial system and the ordinary users, respectively.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method for configuring a virtual machine and related devices, which can distinguish from redundancy ratios corresponding to virtual machine working disk configurations of different users.
The invention provides a method for configuring a virtual machine in a first aspect, which comprises the following steps:
when sharing connection is carried out with a virtual machine server, receiving an authentication request which is sent by the virtual machine server and carries user information, and forwarding the authentication request to the authentication server;
when the authentication server passes the authentication of the user information, receiving preset redundant configuration information which is sent by the authentication server and corresponds to the user information;
and when a file creating request initiated by the virtual machine server is received, performing redundancy configuration on the created file according to the redundancy configuration information.
In a first possible implementation manner, when receiving a file creation request initiated by the virtual machine server, performing redundancy configuration on the created file according to the redundancy configuration information includes:
when a file creating request initiated by the virtual machine server is received, extracting a redundancy mode and a redundancy matching value from the redundancy configuration information;
and sending the redundancy mode, the redundancy matching ratio value and the created file to a local distributed file system, and performing redundancy configuration on the created file according to the redundancy mode and the redundancy matching ratio value by the distributed file system.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, before performing, when receiving a file creation request initiated by the virtual machine server, redundant configuration on a created file according to the redundant configuration information, the method further includes:
receiving a preset Quota quote value which is sent by the authentication server and corresponds to the user equipment;
and sending the Quota quote value to the virtual machine server so that the virtual machine server allocates the capacity value of the virtual machine working disk according to the Quota quote value.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner, the method further includes:
detecting whether the total capacity of the created file is larger than the Quota quote value;
when detecting that the total capacity of the created file is larger than the Quota quote value, sending error prompt information to user equipment using the virtual machine server, so that the user equipment sends a capacity expansion request to the authentication server to update the Quota quote value;
when the fact that the virtual machine server reloads the virtual machine working disk is detected, receiving an updated Quota quote value sent by the authentication server, and sending the updated Quota quote value to the virtual machine server, so that the virtual machine server redistributes the capacity value of the virtual machine working disk according to the updated Quota quote value.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, in a fourth possible implementation manner, before receiving, when performing shared connection with a virtual machine server, an authentication request that carries user information and is sent by the virtual machine server, and forwarding the authentication request to the authentication server, the method further includes:
presetting a shared directory corresponding to the virtual machine server;
and the shared directory and the virtual machine working disk in the virtual machine server are in a shared mapping relationship.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, or the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner, when performing shared connection with a virtual machine server, receiving an authentication request that carries user information and is sent by the virtual machine server, and forwarding the authentication request to an authentication server, the method includes:
when sharing connection is carried out with a virtual machine server, receiving an authentication request which is sent by the virtual machine server and carries user information, and detecting a storage protocol used by the authentication request sent by the virtual machine server;
forwarding the authentication request to an authentication server corresponding to the storage protocol through the detected storage protocol.
With reference to the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner, the forwarding, by the detected storage protocol, the authentication request to an authentication server corresponding to the storage protocol includes:
when detecting that the used storage protocol is a server information block (SMB) protocol, forwarding the authentication request to an Active Directory (AD) server through the server information block (SMB) protocol; or,
when detecting that the used storage protocol is a Network File System (NFS) protocol, forwarding the authentication request to a Lightweight Directory Access Protocol (LDAP) server through the Network File System (NFS) protocol.
The second aspect of the present invention provides a method for configuring a virtual machine, including:
receiving an authentication request forwarded by a storage server, wherein the authentication request is an authentication request which is sent by a virtual machine server and carries user information;
authenticating the user information according to the authentication request;
and when the user information passes the authentication, sending preset redundant configuration information corresponding to the user information to the storage server so that the storage server performs redundant configuration on the file created by the virtual machine server according to the redundant configuration information.
In a first possible implementation manner, before the receiving the authentication request forwarded by the storage server, the method further includes:
presetting user account information, and presetting corresponding redundant configuration information and Quota Quota values for the user account information;
the redundancy configuration information comprises a redundancy mode and a redundancy ratio value.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner, when the user information is authenticated, sending preset redundant configuration information corresponding to the user information to the storage server, so that the storage server performs redundant configuration on a file created by the virtual machine server according to the redundant configuration information, includes:
when the user equipment passes the authentication, sending a preset Quota quote value corresponding to the user equipment to the storage server, so that the storage server sends the Quota quote value to the virtual machine server to allocate a capacity value of a virtual machine working disk corresponding to the Quota quote value;
and sending preset redundant configuration information corresponding to the user information to the storage server, so that the storage server performs redundant configuration on the file created by the virtual machine server according to the redundant configuration information.
With reference to the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect, in a third possible implementation manner, the method further includes:
receiving a capacity expansion request sent by user equipment using the virtual machine server, and updating the Quota quote value according to the capacity expansion request;
when the virtual machine server is detected to reload the virtual machine working disk, sending the updated Quota quote value to the storage server, so that the storage server sends the updated Quota quote value to the virtual machine server to redistribute the capacity value of the virtual machine working disk corresponding to the updated Quota quote value.
A third aspect of the present invention provides a storage server, comprising:
the receiving and forwarding module is used for receiving an authentication request which is sent by the virtual machine server and carries user information when sharing connection is carried out with the virtual machine server, and forwarding the authentication request to the authentication server;
the first information receiving module is used for receiving preset redundant configuration information which is sent by the authentication server and corresponds to the user information when the authentication server passes the authentication of the user information;
and the configuration module is used for performing redundancy configuration on the created file according to the redundancy configuration information when receiving a file creation request initiated by the virtual machine server.
In a first possible implementation manner, the configuration module includes:
the extracting unit is used for extracting a redundancy mode and a redundancy ratio value from the redundancy configuration information when receiving a file creating request initiated by the virtual machine server;
and the redundancy configuration unit is used for sending the redundancy mode, the redundancy ratio value and the created file to a local distributed file system, and the distributed file system performs redundancy configuration on the created file according to the redundancy mode and the redundancy ratio value.
With reference to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner, the method further includes:
a second information receiving module, configured to receive a Quota value corresponding to the user equipment and preset by the authentication server;
and the Quota value sending module is used for sending the Quota quote value to the virtual machine server so that the virtual machine server distributes the capacity value of the virtual machine working disk according to the Quota quote value.
With reference to the second possible implementation manner of the third aspect, in a third possible implementation manner, the method further includes:
a capacity detection module for detecting whether the total capacity of the created file is greater than the Quota quote value;
a prompt sending module, configured to send an error prompt message to the user equipment using the virtual machine server when detecting that the total capacity of the created file is greater than the Quota quote value, so that the user equipment sends a capacity expansion request to the authentication server to update the Quota quote value;
and the update acquisition module is used for receiving an updated Quota quote value sent by the authentication server and sending the updated Quota quote value to the virtual machine server when detecting that the virtual machine server reloads the virtual machine working disk, so that the virtual machine server redistributes the capacity value of the virtual machine working disk according to the updated Quota quote value.
With reference to the third aspect, or the first possible implementation manner of the third aspect, or the second possible implementation manner of the third aspect, or the third possible implementation manner of the third aspect, in a fourth possible implementation manner, the method further includes:
the directory presetting module is used for presetting a shared directory corresponding to the virtual machine server;
and the shared directory and the virtual machine working disk in the virtual machine server are in a shared mapping relationship.
With reference to the third aspect, or the first possible implementation manner of the third aspect, or the second possible implementation manner of the third aspect, or the third possible implementation manner of the third aspect, or the fourth possible implementation manner of the third aspect, in a fifth possible implementation manner, the receiving and forwarding module includes:
the protocol detection unit is used for receiving an authentication request which is sent by a virtual machine server and carries user information when sharing connection is carried out with the virtual machine server, and detecting a storage protocol used by the authentication request sent by the virtual machine server;
and the protocol forwarding unit is used for forwarding the authentication request to an authentication server corresponding to the storage protocol through the detected storage protocol.
With reference to the fifth possible implementation manner of the third aspect, in a sixth possible implementation manner, the protocol forwarding unit includes:
the first forwarding subunit is used for forwarding the authentication request to an active directory AD server through a server information block SMB protocol when the used storage protocol is detected to be the server information block SMB protocol;
and the second forwarding subunit is used for forwarding the authentication request to a Lightweight Directory Access Protocol (LDAP) server through a Network File System (NFS) protocol when the used storage protocol is detected to be the NFS protocol.
A fourth aspect of the present invention provides an authentication server, comprising:
the request receiving module is used for receiving an authentication request forwarded by the storage server, wherein the authentication request is an authentication request which is sent by the virtual machine server and carries user information;
the authentication module is used for authenticating the user information according to the authentication request;
and the information sending module is used for sending preset redundant configuration information corresponding to the user information to the storage server when the user information passes the authentication so as to enable the storage server to perform redundant configuration on the file created by the virtual machine server according to the redundant configuration information.
In a first possible implementation manner, the method further includes:
the information presetting module is used for presetting user account information and presetting corresponding redundant configuration information and Quota Quota values for the user account information;
the redundancy configuration information comprises a redundancy mode and a redundancy ratio value.
With reference to the fourth aspect or the first possible implementation manner of the fourth aspect, in a second possible implementation manner, the information sending module is further configured to send a preset Quota value corresponding to the user equipment to the storage server when the user equipment passes authentication, so that the storage server sends the Quota value to the virtual machine server to allocate a capacity value of a virtual machine working disk corresponding to the Quota value.
With reference to the first possible implementation manner of the fourth aspect or the second possible implementation manner of the fourth aspect, in a third possible implementation manner, the method further includes:
the receiving and updating module is used for receiving a capacity expansion request sent by user equipment using the virtual machine server and updating the Quota quote value according to the capacity expansion request;
and the update sending module is used for sending the updated Quota quote value to the storage server when detecting that the virtual machine working disk is reloaded by the virtual machine server, so that the storage server sends the updated Quota quote value to the virtual machine server to redistribute the capacity value of the virtual machine working disk corresponding to the updated Quota quote value.
According to the embodiment of the invention, by receiving the redundancy configuration information corresponding to the user information sent by the authentication server, the file created by the virtual machine corresponding to the user information can be configured redundantly according to the redundancy configuration information, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users, and the redundancy ratios required by the users can be met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for configuring a virtual machine according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another method for configuring a virtual machine according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for capacity expansion according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for configuring a virtual machine according to another embodiment of the present invention;
fig. 5 is a flowchart illustrating a method for configuring a virtual machine according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of a system configured by virtual machines according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a storage server according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of another storage server according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a configuration module according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a receiving and forwarding module according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an authentication server according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of another authentication server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a schematic flowchart of a method for configuring a virtual machine according to an embodiment of the present invention is shown, where the method includes:
s101, when sharing connection is carried out with a virtual machine server, receiving an authentication request which is sent by the virtual machine server and carries user information, and forwarding the authentication request to an authentication server;
specifically, before the storage server is connected to the virtual machine server in a shared manner, the virtual machine server installs the virtual machine of the user, and then enters the virtual machine to map the virtual machine working disk to a certain directory of the storage server through the shared manner, and at this time, the user can use the virtual machine through the user equipment. Because the virtual machine working disk is mapped to the storage server through sharing, when the virtual machine working disk is loaded, the virtual machine server initiates a sharing connection to the storage server and sends an authentication request, so that the storage server can receive the authentication request which is sent by the virtual machine server and carries user information, and forwards the authentication request to the authentication server. The storage server may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server, and the like.
S102, when the authentication server passes the authentication of the user information, receiving preset redundant configuration information corresponding to the user information, which is sent by the authentication server;
specifically, after the storage server forwards the authentication request to the authentication server, the storage server may detect whether the authentication server passes authentication of the user information, or the authentication server may send an authentication result to the storage server, and when the authentication server passes authentication of the user information, the storage server may receive preset redundant configuration information corresponding to the user information, which is sent by the authentication server. The redundancy configuration information is preset redundancy configuration information for a user corresponding to each user information in the authentication server by an IT administrator, and the redundancy configuration information comprises a redundancy mode and a redundancy ratio value.
S103, when a file creating request initiated by the virtual machine server is received, performing redundancy configuration on the created file according to the redundancy configuration information;
specifically, after the authentication server authenticates the user information, the user may initiate a file creation request through the virtual machine, that is, the storage server may receive the file creation request initiated by the virtual machine server, at this time, the storage server may perform redundancy configuration on the created file according to the obtained redundancy configuration information corresponding to the user information, that is, perform redundancy configuration on the created file by using a corresponding redundancy mode and a corresponding redundancy ratio value, so as to implement reliability protection on the file in the virtual machine working disk of each user.
According to the embodiment of the invention, the redundancy configuration information corresponding to the user information and sent by the authentication server is received, and the file created by the virtual machine corresponding to the user information can be subjected to redundancy configuration according to the redundancy configuration information, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users to meet the redundancy ratio required by each user, and meanwhile, the virtual machine working disks can share and map to the storage server, so that the virtual machine server only needs to be provided with the virtual machine image file for installing the operating system, and the migration and cloning of the virtual machine are facilitated.
Referring to fig. 2 again, a schematic flow chart of another method for configuring a virtual machine according to an embodiment of the present invention is shown, where the method includes:
s201, presetting a shared directory corresponding to the virtual machine server;
and the shared directory and the virtual machine working disk in the virtual machine server are in a shared mapping relationship. Before the storage server is connected with the virtual machine server in a sharing mode, the storage server can preset a sharing directory corresponding to the virtual machine server, meanwhile, the virtual machine server is installed with a virtual machine of a user, then the virtual machine server enters the virtual machine to map a virtual machine working disk to the preset sharing directory in the storage server through sharing, and at the moment, the user can use the virtual machine through user equipment.
S202, when sharing connection is carried out with a virtual machine server, receiving an authentication request which is sent by the virtual machine server and carries user information, and detecting a storage protocol used by the authentication request sent by the virtual machine server;
since the virtual machine working disk is mapped to the storage server through sharing, when the virtual machine working disk is loaded, the virtual machine server initiates a sharing connection to the storage server and sends an authentication request, so that the storage server can receive the authentication request carrying user information sent by the virtual machine server, and at the moment, the storage server can also detect a storage protocol used by the authentication request sent by the virtual machine server.
S203, forwarding the authentication request to an authentication server corresponding to the storage protocol through the detected storage protocol;
the storage server may forward the authentication request to an authentication server corresponding to the storage protocol through the detected storage protocol. Further, when detecting that the used storage protocol is a server information block (SMB) protocol, forwarding the authentication request to an Active Directory (AD) server through the SMB protocol, and in a subsequent process, the storage server interacts with the authentication server and the virtual machine server by using the SMB protocol; or, when it is detected that the used storage protocol is a Network File System NFS (Network File System) protocol, the authentication request is forwarded to a Lightweight Directory access protocol LDAP (Lightweight Directory access protocol) server through the Network File System NFS protocol, and in a subsequent process, the storage server interacts with the authentication server and the virtual machine server by using the NFS protocol.
S204, when the authentication server passes the authentication of the user information, receiving preset redundant configuration information which is sent by the authentication server and corresponds to the user information;
specifically, after the storage server forwards the authentication request to the authentication server, the storage server may detect whether the authentication server passes authentication of the user information, or the authentication server may send an authentication result to the storage server, and when the authentication server passes authentication of the user information, the storage server may receive preset redundant configuration information corresponding to the user information, which is sent by the authentication server. The redundancy configuration information is preset redundancy configuration information for a user corresponding to each user information in the authentication server by an IT administrator, and the redundancy configuration information comprises a redundancy mode and a redundancy ratio value.
S205, receiving a preset Quota quote value corresponding to the user equipment sent by the authentication server;
when the storage server detects that the authentication server passes the authentication of the user information, the storage server may further receive a preset Quota quote value corresponding to the user equipment, which is sent by the authentication server, where the Quota quote value is a capacity value of a working disk of a virtual machine, and the Quota quote value is also a Quota quote value preset by an IT administrator for a user corresponding to each user information in the authentication server.
S206, sending the Quota quote value to the virtual machine server, so that the virtual machine server allocates the capacity value of the virtual machine working disk according to the Quota quote value;
after the storage server obtains the Quota quote value, the storage server may send the Quota quote value to the virtual machine server, so that the virtual machine server allocates a capacity value of a virtual machine working disk according to the Quota quote value.
S207, when a file creating request initiated by the virtual machine server is received, extracting a redundancy mode and a redundancy ratio value from the redundancy configuration information;
after the capacity value of the virtual machine working disk is allocated by the virtual machine server, a user can initiate a file creation request through the virtual machine server. When the storage server receives a file creation request initiated by the virtual machine server, the storage server may extract a redundancy mode and a redundancy ratio value from the redundancy configuration information.
S208, sending the redundancy mode, the redundancy ratio value and the created file to a local distributed file system, and performing redundancy configuration on the created file according to the redundancy mode and the redundancy ratio value by the distributed file system;
after the storage server extracts the redundancy mode and the redundancy ratio, the storage server sends the redundancy mode, the redundancy ratio and the created file to a local distributed file system, and the distributed file system performs redundancy configuration on the created file according to the redundancy mode and the redundancy ratio, for example, if the extracted redundancy mode is erase Code and the redundancy ratio is 9:3, the distributed file system splits the created file data into 12 parts, where 9 parts are valid data and 3 parts are check data.
According to the embodiment of the invention, the redundant configuration information and the Quota Quota value which are sent by the authentication server and correspond to the user information are received, the file which is created by the virtual machine corresponding to the user information can be configured redundantly according to the redundant configuration information, the capacity value of the corresponding virtual machine working disk is controlled to be distributed to the virtual machine server through the Quota Quota value, so that the distributed NAS storage can configure different redundant proportions for the virtual machine working disks of different users, the virtual machine working disks with different capacity values are distributed to different users, the redundant proportions and the Quota Quota value required by each user are met, and meanwhile, the virtual machine working disks can be shared and mapped to the storage server, so that the virtual machine server only needs to be provided with the virtual machine image file provided with the operating system, and the migration and cloning of the virtual machine are facilitated.
Further, referring to fig. 3 again, a flowchart of one method for capacity expansion according to an embodiment of the present invention is shown, where the method includes:
s301, detecting whether the total capacity of the created file is larger than the Quota quote value;
specifically, the step S301 may be executed after S102 in the embodiment corresponding to fig. 1 or after S204 in the embodiment corresponding to fig. 2, that is, after the storage server detects that the authentication server passes authentication of the user information, the storage server may detect in real time whether the total capacity of the created file is greater than the Quota value, and if the total capacity of the created file is less than the Quota value, the storage server may continue to receive a file creation request initiated by the virtual machine server and perform redundant configuration on the created file according to the redundant configuration information; if the Quota quantum value is detected to be larger than the Quota quantum value, which indicates that the capacity of the virtual machine working disk is full, the step S302 is executed.
S302, when detecting that the total capacity of the created file is larger than the Quota Quota value, sending error prompt information to user equipment using the virtual machine server, so that the user equipment sends a capacity expansion request to the authentication server to update the Quota Quota value;
when detecting that the total capacity of the created file is larger than the Quota quote value, sending error prompt information to user equipment using the virtual machine server to notify a user that the capacity of the virtual machine working disk is full, and at this time, the user equipment can send a capacity expansion request to the authentication server to update the Quota quote value.
S303, when detecting that the virtual machine server reloads the virtual machine working disk, receiving an updated Quota quote value sent by the authentication server, and sending the updated Quota quote value to the virtual machine server, so that the virtual machine server redistributes the capacity value of the virtual machine working disk according to the updated Quota quote value;
specifically, when the storage server detects that the virtual machine server reloads the virtual machine working disk, the virtual machine server initiates a sharing connection and an authentication request again, after the authentication server passes authentication on the user information again, the storage server may receive the redundant configuration information and the updated Quota value sent by the authentication server, and the storage server may send the updated Quota value to the virtual machine server, so that the virtual machine server reallocates the capacity value of the virtual machine working disk according to the updated Quota value, so that the capacity of the virtual machine working disk of the user can be increased, and the user can continue to use the virtual machine.
According to the embodiment of the invention, the Quota Quota value is updated, so that the capacity value of the virtual machine working disk can be redistributed according to the updated Quota Quota value when the virtual machine server reloads the virtual machine working disk, the capacity expansion of the virtual machine working disk can be simply realized, and the problem of difficulty in capacity expansion of the virtual machine working disk is solved.
Referring to fig. 4, a schematic flowchart of a method for configuring a virtual machine according to another embodiment of the present invention is shown, where the method includes:
s401, receiving an authentication request forwarded by a storage server, wherein the authentication request is an authentication request which is sent by a virtual machine server and carries user information;
specifically, the authentication server may receive an authentication request forwarded by the storage server, where the authentication request is an authentication request carrying user information and sent by the virtual machine server. The storage server may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server, and the like.
S402, authenticating the user information according to the authentication request;
the authentication server stores preset user account information and other information, and can detect whether the user information in the authentication request exists in the preset user account information, if not, the authentication fails, and the virtual machine server cannot be connected to the storage server; when detecting that the user information in the authentication request exists in the preset user account information, detecting the legality of the user information in the authentication request according to the preset user account information, when detecting that the user information is legal, passing the authentication of the user information, otherwise, failing to authenticate the user information.
S403, when the user information is authenticated, sending preset redundant configuration information corresponding to the user information to the storage server, so that the storage server performs redundant configuration on the file created by the virtual machine server according to the redundant configuration information;
specifically, when the authentication server passes authentication of the user information, the authentication server may send preset redundant configuration information corresponding to the user information to the storage server, so that the storage server performs redundant configuration on a file created by the virtual machine server according to the redundant configuration information. The storage server may receive a file creation request sent by the virtual machine server, and at this time, the storage server may perform redundant configuration on the file created by the virtual machine server according to the redundant configuration information acquired from the authentication server.
According to the embodiment of the invention, by receiving the redundancy configuration information corresponding to the user information sent by the authentication server, the storage server can perform redundancy configuration on the file created by the virtual machine corresponding to the user information according to the redundancy configuration information, so that the distributed NAS storage can configure different redundancy ratios for the working disks of the virtual machines of different users, and the redundancy ratios required by the users can be met.
Referring to fig. 5 again, a schematic flowchart of a method for configuring a virtual machine according to another embodiment of the present invention is shown, where the method includes:
s501, presetting user account information, and presetting corresponding redundant configuration information and Quota Quota values for the user account information;
the authentication server can preset corresponding user account information according to each user, and preset corresponding redundancy configuration information and Quota quote values for the user account information. The redundant configuration information comprises a redundant mode and a redundant Quota value, and the Quota quote value refers to a capacity value of a virtual machine working disk.
S502, receiving an authentication request forwarded by a storage server, wherein the authentication request is an authentication request which is sent by a virtual machine server and carries user information;
specifically, the authentication server may receive an authentication request forwarded by the storage server, where the authentication request is an authentication request carrying user information and sent by the virtual machine server. The virtual machine server maps the virtual machine working disk sharing to the storage server, so that the virtual machine server can initiate a sharing connection and an authentication request when the virtual machine working disk is loaded. The storage server may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server, and the like.
S503, authenticating the user information according to the authentication request;
the authentication server stores preset user account information and other information, and can detect whether the user information in the authentication request exists in the preset user account information, if not, the authentication fails, and the virtual machine server cannot be connected to the storage server; when detecting that the user information in the authentication request exists in the preset user account information, detecting the legality of the user information in the authentication request according to the preset user account information, when detecting that the user information is legal, passing the authentication of the user information, otherwise, failing to authenticate the user information.
S504, when the user equipment passes the authentication, sending a preset Quota quote value corresponding to the user equipment to the storage server;
when the user equipment passes the authentication, the authentication server sends a preset Quota quote value corresponding to the user equipment to the storage server, so that the storage server sends the Quota quote value to the virtual machine server to allocate the capacity value of the virtual machine working disk corresponding to the Quota quote value.
S505, sending preset redundant configuration information corresponding to the user information to the storage server;
and the authentication server also sends preset redundant configuration information corresponding to the user information to the storage server so that the storage server performs redundant configuration on the file created by the virtual machine server according to the redundant configuration information.
S506, receiving a capacity expansion request sent by user equipment using the virtual machine server, and updating the Quota quote value according to the capacity expansion request;
specifically, when the capacity of the working disk of the virtual machine is full, the user equipment using the virtual machine server initiates a capacity expansion request, and at this time, the authentication server may receive the capacity expansion request sent by the user equipment using the virtual machine server, and update the Quota quote value according to the capacity expansion request.
S507, when detecting that the virtual machine server reloads the virtual machine working disk, sending the updated Quota quote value to the storage server;
when the authentication server detects that the virtual machine server reloads the virtual machine working disk through the storage server, the virtual machine server re-initiates a sharing connection and an authentication request, and after the authentication server passes authentication on the user information again, the authentication server can send an updated Quota quote value to the storage server, so that the storage server sends the updated Quota quote value to the virtual machine server to redistribute the capacity value of the virtual machine working disk corresponding to the updated Quota quote value; meanwhile, the authentication server may also resend the redundant configuration information to the storage server, so that the storage server can still perform redundant configuration on the file created by the virtual machine server according to the redundant configuration information.
By receiving the redundant configuration information and the Quota quote value which are sent by the authentication server and correspond to the user information, the storage server can transmit the Quota quote value to the authentication server, performing redundant configuration on files created by the virtual machines corresponding to the user information, controlling the virtual machine server to allocate the capacity value of the corresponding virtual machine working disk through the Quota quote value, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users, and allocates virtual machine working disks with different capacity values for different users to meet the redundancy ratio and Quota Quota value required by each user, meanwhile, by updating the Quota quote value, when the virtual machine server reloads the virtual machine working disk, the capacity value of the virtual machine working disk can be redistributed according to the updated Quota quote value, so that the capacity expansion of the virtual machine working disk can be simply realized; in addition, because the virtual machine working disks can share and map to the storage server, the virtual machine server only needs to be provided with a virtual machine image file for installing an operating system, thereby being beneficial to the migration and cloning of the virtual machine.
Referring to fig. 6, a schematic structural diagram of a system configured by a virtual machine according to an embodiment of the present invention is shown, where the system includes: a storage server 1, an authentication server 2, and a virtual machine server 3;
the storage server 1 is configured to receive an authentication request carrying user information sent by a virtual machine server 3 and forward the authentication request to an authentication server 2 when sharing connection is performed with the virtual machine server 3, receive preset redundant configuration information corresponding to the user information sent by the authentication server 2 when the authentication server 2 passes authentication of the user information, and perform redundant configuration on a created file according to the redundant configuration information when receiving a file creation request initiated by the virtual machine server 3;
the authentication server 2 is configured to receive an authentication request forwarded by the storage server 1, where the authentication request is an authentication request carrying user information and sent by the virtual machine server 3, authenticate the user information according to the authentication request, and send preset redundant configuration information corresponding to the user information to the storage server 1 when the user information passes authentication;
the virtual machine server 3 is configured to send an authentication request carrying user information to the storage server 1 when sharing connection is performed with the storage server 1, and is further configured to send a file creation request to the storage server 1.
Specifically, before the storage server 1 and the virtual machine server 3 are connected in a shared manner, the virtual machine server 3 first installs a virtual machine of a user, and then enters the virtual machine to map a virtual machine working disk to a certain directory of the storage server 1 through sharing, and at this time, the user can use the virtual machine through user equipment. Since the virtual machine working disk is mapped to the storage server 1 by sharing, when the virtual machine working disk is loaded, the virtual machine server 3 initiates a sharing connection to the storage server 1 and sends an authentication request, so that the storage server 1 can receive the authentication request carrying the user information sent by the virtual machine server 3 and forward the authentication request to the authentication server 2. The storage server 1 may be a distributed NAS storage server 1, and the user information may include a user account, a password, a network address of the virtual machine server 3, and the like.
After the storage server 1 forwards the authentication request to the authentication server 2, the storage server 1 may detect whether the authentication server 2 passes the authentication of the user information, or the authentication server 2 may send an authentication result to the storage server 1, and when the authentication server 2 passes the authentication of the user information, the storage server 1 may receive the preset redundant configuration information corresponding to the user information sent by the authentication server 2. The redundant configuration information is preset by an IT administrator in the authentication server 2 for each user corresponding to the user information, and includes a redundant mode and a redundant ratio.
After the authentication server 2 authenticates the user information, a user may initiate a file creation request through a virtual machine, that is, the storage server 1 may receive the file creation request initiated by the virtual machine server 3, at this time, the storage server 1 may perform redundancy configuration on the created file according to the obtained redundancy configuration information corresponding to the user information, that is, perform redundancy configuration on the created file by using a corresponding redundancy mode and a corresponding redundancy ratio value, so as to implement reliability protection on the file in the virtual machine working disk of each user.
The storage server 1 is specifically configured to extract a redundancy mode and a redundancy ratio value from the redundancy configuration information when receiving a file creation request initiated by the virtual machine server 3;
and sending the redundancy mode, the redundancy matching ratio value and the created file to a local distributed file system, and performing redundancy configuration on the created file according to the redundancy mode and the redundancy matching ratio value by the distributed file system.
The storage server 1 is further configured to receive a preset Quota quote value corresponding to the user equipment and sent by the authentication server 2, and send the Quota quote value to the virtual machine server 3;
the virtual machine server 3 is further configured to receive the Quota quote value sent by the storage server 1, and allocate a capacity value of a virtual machine working disk according to the Quota quote value.
In addition, the storage server 1 is further configured to detect whether the total capacity of the created file is greater than the Quota value, and when detecting that the total capacity of the created file is greater than the Quota value, send error prompt information to the user equipment using the virtual machine server 3, so that the user equipment sends a capacity expansion request to the authentication server 2 to update the Quota value, and when detecting that the virtual machine server 3 reloads a virtual machine working disk, receive the updated Quota value sent by the authentication server 2, and send the updated Quota value to the virtual machine server 3;
the authentication server 2 is further configured to receive a capacity expansion request sent by the user equipment using the virtual machine server 3, update the Quota quote value according to the capacity expansion request, and send the updated Quota quote value to the storage server 1 when detecting that the virtual machine server 3 reloads the virtual machine working disk;
the virtual machine server 3 is further configured to receive the updated Quota quote value sent by the storage server 1, and redistribute the capacity value of the virtual machine working disk according to the updated Quota quote value.
Specifically, after the storage server 1 detects that the authentication server 2 passes the authentication of the user information, the storage server 1 may detect in real time whether the total volume of the created file is greater than the Quota value, and if the total volume of the created file is smaller than the Quota value, the storage server 1 may continue to receive a file creation request initiated by the virtual machine server 3 and perform redundancy configuration on the created file according to the redundancy configuration information; and if the Quota Quota value is detected to be larger than the Quota Quota value, indicating that the capacity of the working disk of the virtual machine is full.
When detecting that the total capacity of the created file is greater than the Quota quote value, sending an error prompt message to the user equipment using the virtual machine server 3 to notify the user that the capacity of the virtual machine working disk is full, and at this time, the user equipment may send a capacity expansion request to the authentication server 2 to update the Quota quote value.
When the storage server 1 detects that the virtual machine server 3 reloads the virtual machine working disk, the virtual machine server 3 initiates a sharing connection and an authentication request again, after the authentication server 2 passes authentication on the user information again, the storage server 1 can receive the redundant configuration information and the updated Quota value sent by the authentication server 2, and the storage server 1 can send the updated Quota value to the virtual machine server 3, so that the virtual machine server 3 reallocates the capacity value of the virtual machine working disk according to the updated Quota value, the capacity of the virtual machine working disk of the user can be increased, and the user can continue to use the virtual machine.
The authentication server 2 is further configured to receive a capacity expansion request sent by the user equipment using the virtual machine server 3, and update the Quota quote value according to the capacity expansion request;
when it is detected that the virtual machine server 3 reloads the virtual machine working disk, sending an updated Quota quote value to the storage server 1, so that the storage server 1 sends the updated Quota quote value to the virtual machine server 3 to reallocate the capacity value of the virtual machine working disk corresponding to the updated Quota quote value.
Specifically, when the capacity of the virtual machine working disk is full, the user equipment using the virtual machine server 3 will initiate a capacity expansion request, and at this time, the authentication server 2 may receive the capacity expansion request sent by the user equipment using the virtual machine server 3, and update the Quota quote value according to the capacity expansion request.
When the authentication server 2 detects that the virtual machine server 3 reloads the virtual machine working disk through the storage server 1, the virtual machine server 3 re-initiates a sharing connection and an authentication request, and after the authentication server 2 passes authentication on the user information again, the authentication server 2 can send an updated Quota quote value to the storage server 1, so that the storage server 1 sends the updated Quota quote value to the virtual machine server 3 to re-allocate the capacity value of the virtual machine working disk corresponding to the updated Quota quote value; meanwhile, the authentication server 2 may also send the redundant configuration information to the storage server 1 again, so that the storage server 1 may still perform redundant configuration on the file created by the virtual machine server 3 according to the redundant configuration information.
The storage server 1 is specifically configured to receive an authentication request carrying user information sent by a virtual machine server 3 when sharing connection is performed with the virtual machine server 3, and detect a storage protocol used by the authentication request sent by the virtual machine server 3;
the authentication request is forwarded to the authentication server 2 corresponding to the storage protocol by the detected storage protocol.
Specifically, since the virtual machine working disk is mapped to the storage server 1 by sharing, when the virtual machine working disk is loaded, the virtual machine server 3 initiates a sharing connection to the storage server 1 and sends an authentication request, so that the storage server 1 can receive an authentication request carrying user information sent by the virtual machine server 3, and at this time, the storage server 1 can also detect a storage protocol used by the authentication request sent by the virtual machine server 3.
The storage server 1 may forward the authentication request to an authentication server 2 corresponding to the storage protocol through the detected storage protocol. Further, when detecting that the used storage protocol is a server information block (SMB) protocol, forwarding the authentication request to an Active Directory (AD) server through the SMB protocol, and in a subsequent process, the storage server 1 interacts with the authentication server 2 and the virtual machine server 3 by using the SMB protocol; or, when detecting that the used storage protocol is a network file system NFS protocol, forwarding the authentication request to a lightweight directory access protocol LDAP server through the network file system NFS protocol, and in a subsequent flow, the storage server 1 interacts with the authentication server 2 and the virtual machine server 3 using the NFS protocol.
The virtual machine working disk in the virtual machine server 3 is mapped to the storage server 1 by sharing, so that the virtual machine server 3 only needs to have a virtual machine image file for installing an operating system.
By receiving the redundant configuration information and the Quota quote value which are sent by the authentication server 2 and correspond to the user information, the storage server 1 can determine, according to the redundant configuration information, the file created by the virtual machine corresponding to the user information is configured redundantly, the virtual machine server 3 is controlled to distribute the capacity value of the corresponding virtual machine working disk through the Quota quote value, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users, and allocates virtual machine working disks with different capacity values for different users to meet the redundancy ratio and Quota Quota value required by each user, meanwhile, by updating the Quota quote value, when the virtual machine server 3 reloads the virtual machine working disk, the capacity value of the virtual machine working disk can be redistributed according to the updated Quota quote value, so that the capacity expansion of the virtual machine working disk can be simply realized.
The storage server 1 and the authentication server 2 in fig. 6 will be described in detail below.
Specifically, referring to fig. 7, a schematic structural diagram of a storage server 1 according to an embodiment of the present invention is shown, where the storage server 1 includes: a receiving and forwarding module 11, a first information receiving module 12 and a configuration module 13;
the receiving and forwarding module 11 is configured to receive an authentication request carrying user information sent by the virtual machine server 3 when sharing connection is performed with the virtual machine server 3, and forward the authentication request to the authentication server 2;
specifically, when sharing connection is performed with the virtual machine server 3, the receiving and forwarding module 11 may receive an authentication request carrying user information sent by the virtual machine server 3, and forward the authentication request to the authentication server 2. In addition, before the storage server 1 and the virtual machine server 3 are connected in a shared manner, the virtual machine server 3 first installs a virtual machine of a user, and then enters the virtual machine to map a virtual machine working disk to a certain directory of the storage server 1 through sharing, and at this time, the user can use the virtual machine through user equipment. Since the virtual machine working disk is mapped to the storage server 1 by sharing, when the virtual machine working disk is loaded, the virtual machine server 3 initiates a sharing connection to the storage server 1 and sends an authentication request, so that the receiving and forwarding module 11 can receive the authentication request carrying the user information sent by the virtual machine server 3 and forward the authentication request to the authentication server 2. The storage server 1 may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server 3, and the like.
The first information receiving module 12 is configured to receive preset redundant configuration information corresponding to the user information, which is sent by the authentication server 2, when the authentication server 2 passes authentication of the user information;
specifically, after the receiving and forwarding module 11 forwards the authentication request to the authentication server 2, the first information receiving module 12 may detect whether the authentication server 2 passes authentication of the user information, or the authentication server 2 directly sends an authentication result to the storage server 1, and when the authentication server 2 passes authentication of the user information, the first information receiving module 12 may receive preset redundant configuration information corresponding to the user information, which is sent by the authentication server 2. The redundant configuration information is preset by an IT administrator in the authentication server 2 for each user corresponding to the user information, and includes a redundant mode and a redundant ratio.
The configuration module 13 is configured to perform redundancy configuration on the created file according to the redundancy configuration information when receiving a file creation request initiated by the virtual machine server 3;
specifically, after the authentication server 2 authenticates the user information, the user may initiate a file creation request through the virtual machine, that is, the storage server 1 may receive the file creation request initiated by the virtual machine server 3, at this time, the configuration module 13 may perform redundant configuration on the created file according to the obtained redundant configuration information corresponding to the user information, that is, the configuration module 13 performs redundant configuration on the created file by using a corresponding redundant manner and a redundant configuration ratio value, so as to implement reliable protection on the file in the virtual machine working disk of each user.
According to the embodiment of the invention, the redundancy configuration information corresponding to the user information and sent by the authentication server 2 is received, and the file created by the virtual machine corresponding to the user information can be configured redundantly according to the redundancy configuration information, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users to meet the redundancy ratios required by the users, and meanwhile, the virtual machine working disks can share and map to the storage server 1, so that the virtual machine server 3 only needs to be provided with the virtual machine image file provided with the operating system, and the migration and cloning of the virtual machine are facilitated.
Referring to fig. 8 again, which is a schematic structural diagram of another storage server 1 according to an embodiment of the present invention, the storage server 1 may include: the system comprises a receiving and forwarding module 11, a first information receiving module 12, a configuration module 13, a directory presetting module 14, a second information receiving module 15, a quota value sending module 16, a capacity detection module 17, a prompt sending module 18 and an update obtaining module 19;
the receiving and forwarding module 11 is configured to receive an authentication request carrying user information sent by the virtual machine server 3 when sharing connection is performed with the virtual machine server 3, and forward the authentication request to the authentication server 2;
specifically, when sharing connection is performed with the virtual machine server 3, the receiving and forwarding module 11 may receive an authentication request carrying user information sent by the virtual machine server 3, and forward the authentication request to the authentication server 2. In addition, before the storage server 1 and the virtual machine server 3 are connected in a shared manner, the virtual machine server 3 first installs a virtual machine of a user, and then enters the virtual machine to map a virtual machine working disk to a certain directory of the storage server 1 through sharing, and at this time, the user can use the virtual machine through user equipment. Since the virtual machine working disk is mapped to the storage server 1 by sharing, when the virtual machine working disk is loaded, the virtual machine server 3 initiates a sharing connection to the storage server 1 and sends an authentication request, so that the receiving and forwarding module 11 can receive the authentication request carrying the user information sent by the virtual machine server 3 and forward the authentication request to the authentication server 2. The storage server 1 may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server 3, and the like.
The first information receiving module 12 is configured to receive preset redundant configuration information corresponding to the user information, which is sent by the authentication server 2, when the authentication server 2 passes authentication of the user information;
specifically, after the receiving and forwarding module 11 forwards the authentication request to the authentication server 2, the first information receiving module 12 may detect whether the authentication server 2 passes authentication of the user information, or the authentication server 2 directly sends an authentication result to the storage server 1, and when the authentication server 2 passes authentication of the user information, the first information receiving module 12 may receive preset redundant configuration information corresponding to the user information, which is sent by the authentication server 2. The redundant configuration information is preset by an IT administrator in the authentication server 2 for each user corresponding to the user information, and includes a redundant mode and a redundant ratio.
The configuration module 13 is configured to perform redundancy configuration on the created file according to the redundancy configuration information when receiving a file creation request initiated by the virtual machine server 3;
specifically, after the authentication server 2 authenticates the user information, the user may initiate a file creation request through the virtual machine, that is, the storage server 1 may receive the file creation request initiated by the virtual machine server 3, at this time, the configuration module 13 may perform redundant configuration on the created file according to the obtained redundant configuration information corresponding to the user information, that is, the configuration module 13 performs redundant configuration on the created file by using a corresponding redundant manner and a redundant configuration ratio value, so as to implement reliable protection on the file in the virtual machine working disk of each user.
The directory presetting module 14 is configured to preset a shared directory corresponding to the virtual machine server 3;
wherein, the shared directory and the virtual machine working disk in the virtual machine server 3 are in a shared mapping relationship. Before the storage server 1 and the virtual machine server 3 are connected in a shared manner, the directory presetting module 14 may preset a shared directory corresponding to the virtual machine server 3, and at the same time, the virtual machine server 3 first installs a virtual machine of a user, and then enters the virtual machine to map a virtual machine working disk to the preset shared directory in the storage server 1 through sharing, at this time, the user may use the virtual machine through user equipment.
The second information receiving module 15 is configured to receive a Quota quote value corresponding to the user equipment, which is preset and sent by the authentication server 2;
when IT is detected that the authentication server 2 passes the authentication of the user information, the second information receiving module 15 may further receive a preset Quota quote value corresponding to the user equipment, which is sent by the authentication server 2, where the Quota quote value is a capacity value of a working disk of a virtual machine, and the Quota quote value is also a Quota quote value preset by an IT administrator for a user corresponding to each user information in the authentication server 2.
The Quota value sending module 16 is configured to send the Quota quote value to the virtual machine server 3, so that the virtual machine server 3 allocates a capacity value of a virtual machine working disk according to the Quota quote value;
after the second information receiving module 15 receives the Quota quote value, the Quota value sending module 16 may send the Quota quote value to the virtual machine server 3, so that the virtual machine server 3 allocates a capacity value of a virtual machine working disk according to the Quota quote value.
The capacity detection module 17 is configured to detect whether a total capacity of the created file is greater than the Quota quote value;
specifically, after the storage server 1 detects that the authentication server 2 passes the authentication of the user information, the capacity detection module 17 may detect in real time whether the total capacity of the created file is greater than the Quota value, and if the capacity detection module 17 detects that the total capacity of the created file is less than the Quota value, the capacity detection module 17 may notify the configuration module 13 to continue receiving a file creation request initiated by the virtual machine server 3 and perform redundant configuration on the created file according to the redundant configuration information; if the capacity detection module 17 detects that the Quota is greater than the Quota quote value, which indicates that the capacity of the virtual machine working disk is full, at this time, the capacity detection module 17 may notify the prompt sending module 18 to execute a corresponding operation.
The prompt sending module 18 is configured to send an error prompt message to the user equipment using the virtual machine server 3 when detecting that the total capacity of the created file is greater than the Quota quote value, so that the user equipment sends a capacity expansion request to the authentication server 2 to update the Quota quote value;
when the capacity detection module 17 detects that the total capacity of the created file is greater than the Quota quote value, the prompt sending module 18 may send an error prompt message to the user equipment using the virtual machine server 3 to notify the user that the capacity of the virtual machine working disk is full, and at this time, the user equipment may send a capacity expansion request to the authentication server 2 to update the Quota quote value.
The update obtaining module 19 is configured to, when it is detected that the virtual machine server 3 reloads the virtual machine working disk, receive an updated Quota quote value sent by the authentication server 2, and send the updated Quota quote value to the virtual machine server 3, so that the virtual machine server 3 reallocates the capacity value of the virtual machine working disk according to the updated Quota quote value;
specifically, when the storage server 1 detects that the virtual machine server 3 reloads the virtual machine working disk, the virtual machine server 3 initiates a sharing connection and an authentication request again, after the authentication server 2 passes authentication on the user information again, the update acquisition module 19 may receive the redundant configuration information and the updated Quota value sent by the authentication server 2, and the update acquisition module 19 may also send the updated Quota value to the virtual machine server 3, so that the virtual machine server 3 reallocates the capacity value of the virtual machine working disk according to the updated Quota value, so that the capacity of the virtual machine working disk of the user may be increased, and the user may continue to use the virtual machine.
Further, referring to fig. 9 again, which is a schematic structural diagram of a configuration module 13 according to an embodiment of the present invention, the configuration module 13 may include: an extraction unit 131 and a redundancy configuration unit 132;
the extracting unit 131 is configured to, when receiving a file creation request initiated by the virtual machine server 3, extract a redundancy mode and a redundancy ratio value from the redundancy configuration information;
after the virtual machine server 3 has allocated the capacity value of the virtual machine working disk, the user may initiate a file creation request through the virtual machine server 3. When the storage server 1 receives a file creation request initiated by the virtual machine server 3, the extracting unit 131 may extract a redundancy mode and a redundancy ratio value from the redundancy configuration information.
The redundancy configuration unit 132 is configured to send the redundancy mode, the redundancy ratio value, and the created file to a local distributed file system, and the distributed file system performs redundancy configuration on the created file according to the redundancy mode and the redundancy ratio value;
after the extraction unit 131 extracts the redundancy mode and the redundancy ratio, the redundancy configuration unit 132 sends the redundancy mode, the redundancy ratio, and the created file to a local distributed file system, and the distributed file system performs redundancy configuration on the created file according to the redundancy mode and the redundancy ratio, for example, the redundancy mode extracted by the extraction unit 131 is an Erasure Code, and the redundancy ratio is 9:3, and the redundancy configuration unit 132 splits the created file data into 12 parts through the distributed file system, where 9 parts are valid data and 3 parts are check data.
Further, referring to fig. 10 again, which is a schematic structural diagram of a receiving and forwarding module 11 according to an embodiment of the present invention, the receiving and forwarding module 11 may include: a protocol detection unit 111 and a protocol forwarding unit 112;
the protocol detection unit 111 is configured to receive an authentication request carrying user information sent by the virtual machine server 3 when sharing connection is performed with the virtual machine server 3, and detect a storage protocol used by the authentication request sent by the virtual machine server 3;
since the virtual machine working disk is mapped to the storage server 1 by sharing, when the virtual machine working disk is loaded, the virtual machine server 3 initiates a sharing connection to the storage server 1 and sends an authentication request, so that the protocol detection unit 111 can receive the authentication request carrying the user information sent by the virtual machine server 3, and at this time, the protocol detection unit 111 can also detect the storage protocol used by the authentication request sent by the virtual machine server 3.
The protocol forwarding unit 112 is configured to forward the authentication request to the authentication server 2 corresponding to the storage protocol through the detected storage protocol;
the protocol forwarding unit 112 may include:
a first forwarding sub-unit 1121 configured to, when it is detected that the used storage protocol is a server information block SMB protocol, forward the authentication request to an active directory AD server through the server information block SMB protocol;
a second forwarding subunit 1122, configured to, when it is detected that the used storage protocol is the network file system NFS protocol, forward the authentication request to a lightweight directory access protocol LDAP server through the network file system NFS protocol.
By receiving the redundant configuration information and the Quota quote value which are sent by the authentication server 2 and correspond to the user information, the storage server 1 can determine, according to the redundant configuration information, the file created by the virtual machine corresponding to the user information is configured redundantly, the virtual machine server 3 is controlled to distribute the capacity value of the corresponding virtual machine working disk through the Quota quote value, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users, and allocates virtual machine working disks with different capacity values for different users to meet the redundancy ratio and Quota Quota value required by each user, meanwhile, by updating the Quota quote value, when the virtual machine server 3 reloads the virtual machine working disk, the capacity value of the virtual machine working disk can be redistributed according to the updated Quota quote value, so that the capacity expansion of the virtual machine working disk can be simply realized; in addition, since the virtual machine working disks can share the mapping to the storage server 1, the virtual machine server 3 only needs to have a virtual machine image file for installing an operating system, thereby being beneficial to migration and cloning of virtual machines.
Referring to fig. 11, which is a schematic structural diagram of an authentication server 2 according to an embodiment of the present invention, the authentication server 2 includes: a request receiving module 21, an authentication module 22 and an information sending module 23;
the request receiving module 21 is configured to receive an authentication request forwarded by the storage server 1, where the authentication request is an authentication request with user information sent by the virtual machine server 3;
specifically, the request receiving module 21 may receive an authentication request forwarded by the storage server 1, where the authentication request is an authentication request carrying user information and sent by the virtual machine server 3. The storage server 1 may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server 3, and the like.
The authentication module 22 is configured to authenticate the user information according to the authentication request;
the authentication server 2 stores preset user account information and other information, the authentication module 22 may detect whether the user information in the authentication request exists in the preset user account information, if not, the authentication fails, and the virtual machine server 3 cannot be connected to the storage server 1; when the authentication module 22 detects that the user information in the authentication request exists in the preset user account information, the authentication module 22 may detect the validity of the user information in the authentication request according to the preset user account information, when detecting that the user information is valid, the authentication module 22 passes the authentication of the user information, otherwise, the authentication of the user information fails.
The information sending module 23 is configured to send preset redundant configuration information corresponding to the user information to the storage server 1 when the user information passes authentication, so that the storage server 1 performs redundant configuration on a file created by the virtual machine server 3 according to the redundant configuration information;
specifically, when the authentication module 22 passes the authentication of the user information, the information sending module 23 may send preset redundant configuration information corresponding to the user information to the storage server 1, so that the storage server 1 performs redundant configuration on the file created by the virtual machine server 3 according to the redundant configuration information. The storage server 1 may receive a file creation request sent by the virtual machine server 3, and at this time, the storage server 1 may perform redundant configuration on a file created by the virtual machine server 3 according to the redundant configuration information acquired from the authentication server 2.
By receiving the redundant configuration information corresponding to the user information sent by the authentication server 2, the storage server 1 in the embodiment of the present invention can perform redundant configuration on the file created by the virtual machine corresponding to the user information according to the redundant configuration information, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users, so as to meet the redundancy ratios required by each user.
Referring to fig. 12 again, which is a schematic structural diagram of another authentication server 2 according to an embodiment of the present invention, the authentication server 2 may include an information presetting module 24, a request receiving module 21, an authentication module 22, an information sending module 23, a receiving and updating module 25, and an updating and sending module 26;
the information presetting module 24 is configured to preset user account information, and preset corresponding redundancy configuration information and a Quota quantum value for the user account information;
the information presetting module 24 may preset corresponding user account information according to each user, and preset corresponding redundancy configuration information and Quota quote values for the user account information. The redundant configuration information comprises a redundant mode and a redundant Quota value, and the Quota quote value refers to a capacity value of a virtual machine working disk.
The request receiving module 21 is configured to receive an authentication request forwarded by the storage server 1, where the authentication request is an authentication request with user information sent by the virtual machine server 3;
specifically, the request receiving module 21 may receive an authentication request forwarded by the storage server 1, where the authentication request is an authentication request carrying user information and sent by the virtual machine server 3. Wherein, the virtual machine server 3 maps the virtual machine working disk sharing to the storage server 1, so that the virtual machine server 3 can initiate the sharing connection and authentication request when loading the virtual machine working disk. The storage server 1 may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server 3, and the like.
The authentication module 22 is configured to authenticate the user information according to the authentication request;
the authentication server 2 stores preset user account information and other information, the authentication module 22 may detect whether the user information in the authentication request exists in the preset user account information, if not, the authentication fails, and the virtual machine server 3 cannot be connected to the storage server 1; when the authentication module 22 detects that the user information in the authentication request exists in the preset user account information, the authentication module 22 may detect the validity of the user information in the authentication request according to the preset user account information, when detecting that the user information is valid, the authentication module 22 passes the authentication of the user information, otherwise, the authentication of the user information fails.
The information sending module 23 is configured to send preset redundant configuration information corresponding to the user information to the storage server 1 when the user information passes authentication, so that the storage server 1 performs redundant configuration on a file created by the virtual machine server 3 according to the redundant configuration information;
specifically, when the authentication module 22 passes the authentication of the user information, the information sending module 23 may send preset redundant configuration information corresponding to the user information to the storage server 1, so that the storage server 1 performs redundant configuration on the file created by the virtual machine server 3 according to the redundant configuration information.
The information sending module 23 may be further configured to send a preset Quota value corresponding to the user equipment to the storage server 1 when the user equipment is authenticated, so that the storage server 1 sends the Quota value to the virtual machine server 3 to allocate a capacity value of a virtual machine working disk corresponding to the Quota value.
The receiving and updating module 25 is configured to receive a capacity expansion request sent by a user device using the virtual machine server 3, and update the Quota quote value according to the capacity expansion request;
specifically, when the capacity of the virtual machine working disk is full, the user equipment using the virtual machine server 3 will initiate a capacity expansion request, and at this time, the receiving and updating module 25 may receive the capacity expansion request sent by the user equipment using the virtual machine server 3, and update the Quota value according to the capacity expansion request.
The update sending module 26 is configured to, when it is detected that the virtual machine server 3 reloads the virtual machine working disk, send an updated Quota quote value to the storage server 1, so that the storage server 1 sends the updated Quota quote value to the virtual machine server 3 to reallocate the capacity value of the virtual machine working disk corresponding to the updated Quota quote value;
when the authentication server 2 detects that the virtual machine server 3 reloads the virtual machine working disk through the storage server 1, the virtual machine server 3 will reinitiate the sharing connection and the authentication request, and after the authentication server 2 passes authentication on the user information again, the update sending module 26 can send an updated Quota value to the storage server 1, so that the storage server 1 sends the updated Quota value to the virtual machine server 3 to reallocate the capacity value of the virtual machine working disk corresponding to the updated Quota value; meanwhile, the update sending module 26 may also send the redundant configuration information to the storage server 1 again, so that the storage server 1 may still perform redundant configuration on the file created by the virtual machine server 3 according to the redundant configuration information.
By receiving the redundant configuration information and the Quota quote value which are sent by the authentication server 2 and correspond to the user information, the storage server 1 can determine, according to the redundant configuration information, the file created by the virtual machine corresponding to the user information is configured redundantly, the virtual machine server 3 is controlled to distribute the capacity value of the corresponding virtual machine working disk through the Quota quote value, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users, and allocates virtual machine working disks with different capacity values for different users to meet the redundancy ratio and Quota Quota value required by each user, meanwhile, by updating the Quota quote value, when the virtual machine server 3 reloads the virtual machine working disk, the capacity value of the virtual machine working disk can be redistributed according to the updated Quota quote value, so that the capacity expansion of the virtual machine working disk can be simply realized; in addition, since the virtual machine working disks can share the mapping to the storage server 1, the virtual machine server 3 only needs to have a virtual machine image file for installing an operating system, thereby being beneficial to migration and cloning of virtual machines.
Embodiments of the present invention provide yet another storage server that may include a processor, a communication interface, and a memory (the number of processors in the storage server may be one or more). In some embodiments of the invention, the processor, communication interface, and memory may be connected by a communication bus or other means.
The communication interface is used for communicating with an authentication server and a virtual machine server;
the memory is used for storing programs;
the processor is used for executing the program to realize
When sharing connection is carried out with a virtual machine server, receiving an authentication request which is sent by the virtual machine server and carries user information, and forwarding the authentication request to the authentication server;
when the authentication server passes the authentication of the user information, receiving preset redundant configuration information which is sent by the authentication server and corresponds to the user information;
and when a file creating request initiated by the virtual machine server is received, performing redundancy configuration on the created file according to the redundancy configuration information.
Specifically, before the storage server is connected to the virtual machine server in a shared manner, the virtual machine server installs the virtual machine of the user, and then enters the virtual machine to map the virtual machine working disk to a certain directory of the storage server through the shared manner, and at this time, the user can use the virtual machine through the user equipment. Because the virtual machine working disk is mapped to the storage server through sharing, when the virtual machine working disk is loaded, the virtual machine server initiates a sharing connection to the storage server and sends an authentication request, so that the storage server can receive the authentication request which is sent by the virtual machine server and carries user information, and forwards the authentication request to the authentication server. The storage server may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server, and the like.
After the storage server forwards the authentication request to the authentication server, the storage server may detect whether the authentication server passes authentication of the user information, or the authentication server may send an authentication result to the storage server, and when the authentication server passes authentication of the user information, the storage server may receive preset redundant configuration information corresponding to the user information sent by the authentication server. The redundancy configuration information is preset redundancy configuration information for a user corresponding to each user information in the authentication server by an IT administrator, and the redundancy configuration information comprises a redundancy mode and a redundancy ratio value.
After the authentication server authenticates the user information, a user may initiate a file creation request through a virtual machine, that is, the storage server may receive the file creation request initiated by the virtual machine server, at this time, the storage server may perform redundancy configuration on the created file according to the obtained redundancy configuration information corresponding to the user information, that is, perform redundancy configuration on the created file by using a corresponding redundancy mode and a corresponding redundancy ratio value, so as to implement reliability protection on the file in the virtual machine working disk of each user.
Wherein, when the processor executes the step of performing redundancy configuration on the created file according to the redundancy configuration information, the processor is specifically configured to:
when a file creating request initiated by the virtual machine server is received, extracting a redundancy mode and a redundancy matching value from the redundancy configuration information;
and sending the redundancy mode, the redundancy matching ratio value and the created file to a local distributed file system, and performing redundancy configuration on the created file according to the redundancy mode and the redundancy matching ratio value by the distributed file system.
Specifically, after the capacity value of the virtual machine working disk is allocated by the virtual machine server, a user may initiate a file creation request through the virtual machine server. When the storage server receives a file creation request initiated by the virtual machine server, the storage server may extract a redundancy mode and a redundancy ratio value from the redundancy configuration information.
After the storage server extracts the redundancy mode and the redundancy ratio, the storage server sends the redundancy mode, the redundancy ratio and the created file to a local distributed file system, and the distributed file system performs redundancy configuration on the created file according to the redundancy mode and the redundancy ratio, for example, if the extracted redundancy mode is erase Code and the redundancy ratio is 9:3, the distributed file system splits the created file data into 12 parts, where 9 parts are valid data and 3 parts are check data.
The processor is further configured to:
receiving a preset Quota quote value which is sent by the authentication server and corresponds to the user equipment;
and sending the Quota quote value to the virtual machine server so that the virtual machine server allocates the capacity value of the virtual machine working disk according to the Quota quote value.
Specifically, after the storage server obtains the Quota quote value, the storage server may send the Quota quote value to the virtual machine server, so that the virtual machine server allocates a capacity value of a virtual machine working disk according to the Quota quote value.
Wherein the processor is further configured to:
detecting whether the total capacity of the created file is larger than the Quota quote value;
when detecting that the total capacity of the created file is larger than the Quota quote value, sending error prompt information to user equipment using the virtual machine server, so that the user equipment sends a capacity expansion request to the authentication server to update the Quota quote value;
when the fact that the virtual machine server reloads the virtual machine working disk is detected, receiving an updated Quota quote value sent by the authentication server, and sending the updated Quota quote value to the virtual machine server, so that the virtual machine server redistributes the capacity value of the virtual machine working disk according to the updated Quota quote value.
Specifically, after the storage server detects that the authentication server passes the authentication of the user information, the storage server may detect in real time whether the total volume of the created file is greater than the Quota value, and if the total volume of the created file is smaller than the Quota value, the storage server may continue to receive a file creation request initiated by the virtual machine server and perform redundancy configuration on the created file according to the redundancy configuration information; and if the Quota Quota value is detected to be larger than the Quota Quota value, indicating that the capacity of the working disk of the virtual machine is full.
When detecting that the total capacity of the created file is larger than the Quota quote value, sending error prompt information to user equipment using the virtual machine server to notify a user that the capacity of the virtual machine working disk is full, and at this time, the user equipment can send a capacity expansion request to the authentication server to update the Quota quote value.
When the storage server detects that the virtual machine server reloads the virtual machine working disk, the virtual machine server initiates a sharing connection and an authentication request again, after the authentication server passes authentication on the user information again, the storage server can receive the redundant configuration information and the updated Quota quote value sent by the authentication server, and the storage server can send the updated Quota quote value to the virtual machine server, so that the virtual machine server redistributes the capacity value of the virtual machine working disk according to the updated Quota quote value, the capacity of the virtual machine working disk of the user can be increased, and the user can continue to use the virtual machine.
Wherein the processor is further configured to:
presetting a shared directory corresponding to the virtual machine server;
and the shared directory and the virtual machine working disk in the virtual machine server are in a shared mapping relationship.
Specifically, before the storage server is connected to the virtual machine server in a shared manner, the storage server may preset a shared directory corresponding to the virtual machine server, and at the same time, the virtual machine server first installs a virtual machine of a user, and then enters the virtual machine to map a virtual machine working disk to the preset shared directory in the storage server through sharing, and at this time, the user may use the virtual machine through user equipment.
When the processor executes the step of receiving an authentication request carrying user information sent by the virtual machine server and forwarding the authentication request to the authentication server when performing the shared connection with the virtual machine server, the processor is specifically configured to:
when sharing connection is carried out with a virtual machine server, receiving an authentication request which is sent by the virtual machine server and carries user information, and detecting a storage protocol used by the authentication request sent by the virtual machine server;
forwarding the authentication request to an authentication server corresponding to the storage protocol through the detected storage protocol.
Specifically, since the virtual machine working disk is mapped to the storage server by sharing, when the virtual machine working disk is loaded, the virtual machine server initiates a sharing connection to the storage server and sends an authentication request, so that the storage server can receive the authentication request carrying the user information sent by the virtual machine server, and at this time, the storage server can also detect the storage protocol used by the authentication request sent by the virtual machine server.
Wherein, when executing the step of forwarding the authentication request to the authentication server corresponding to the storage protocol through the detected storage protocol, the processor is specifically configured to:
when detecting that the used storage protocol is a server information block (SMB) protocol, forwarding the authentication request to an Active Directory (AD) server through the server information block (SMB) protocol; or,
when detecting that the used storage protocol is a Network File System (NFS) protocol, forwarding the authentication request to a Lightweight Directory Access Protocol (LDAP) server through the Network File System (NFS) protocol.
Specifically, the storage server may forward the authentication request to an authentication server corresponding to the storage protocol through the detected storage protocol. Further, when detecting that the used storage protocol is a server information block (SMB) protocol, forwarding the authentication request to an Active Directory (AD) server through the server information block (SMB) protocol, and in a subsequent process, the storage server interacts with the authentication server and the virtual machine server by using the SMB protocol; or when detecting that the used storage protocol is a Network File System (NFS) protocol, forwarding the authentication request to a Lightweight Directory Access Protocol (LDAP) server through the Network File System (NFS) protocol, and in a subsequent process, the storage server interacts with the authentication server and the virtual machine server by using the NFS protocol.
According to the embodiment of the invention, the redundant configuration information and the Quota Quota value which are sent by the authentication server and correspond to the user information are received, the file which is created by the virtual machine corresponding to the user information can be configured redundantly according to the redundant configuration information, the capacity value of the corresponding virtual machine working disk is controlled to be distributed to the virtual machine server through the Quota Quota value, so that the distributed NAS storage can configure different redundant proportions for the virtual machine working disks of different users, the virtual machine working disks with different capacity values are distributed to different users, the redundant proportions and the Quota Quota value required by each user are met, and meanwhile, the virtual machine working disks can be shared and mapped to the storage server, so that the virtual machine server only needs to be provided with the virtual machine image file provided with the operating system, and the migration and cloning of the virtual machine are facilitated.
Embodiments of the present invention provide yet another authentication server that may include a processor, a communication interface, and a memory (the number of processors in the authentication server may be one or more). In some embodiments of the invention, the processor, communication interface, and memory may be connected by a communication bus or other means.
The communication interface is used for communicating with a storage server;
the memory is used for storing programs;
the processor is used for executing the program to realize
Receiving an authentication request forwarded by a storage server, wherein the authentication request is an authentication request which is sent by a virtual machine server and carries user information;
authenticating the user information according to the authentication request;
and when the user information passes the authentication, sending preset redundant configuration information corresponding to the user information to the storage server so that the storage server performs redundant configuration on the file created by the virtual machine server according to the redundant configuration information.
Specifically, the authentication server may receive an authentication request forwarded by the storage server, where the authentication request is an authentication request carrying user information and sent by the virtual machine server. The storage server may be a distributed NAS storage server, and the user information may include a user account, a password, a network address of the virtual machine server, and the like.
The authentication server stores preset user account information and other information, and can detect whether the user information in the authentication request exists in the preset user account information, if not, the authentication fails, and the virtual machine server cannot be connected to the storage server; when detecting that the user information in the authentication request exists in the preset user account information, detecting the legality of the user information in the authentication request according to the preset user account information, when detecting that the user information is legal, passing the authentication of the user information, otherwise, failing to authenticate the user information.
When the authentication server passes the authentication of the user information, the authentication server may send preset redundant configuration information corresponding to the user information to the storage server, so that the storage server performs redundant configuration on the file created by the virtual machine server according to the redundant configuration information. The storage server may receive a file creation request sent by the virtual machine server, and at this time, the storage server may perform redundant configuration on the file created by the virtual machine server according to the redundant configuration information acquired from the authentication server.
Wherein the processor is further configured to:
presetting user account information, and presetting corresponding redundant configuration information and Quota Quota values for the user account information;
the redundancy configuration information comprises a redundancy mode and a redundancy ratio value.
The authentication server can preset corresponding user account information according to each user, and preset corresponding redundancy configuration information and Quota quote values for the user account information. The redundant configuration information comprises a redundant mode and a redundant Quota value, and the Quota quote value refers to a capacity value of a virtual machine working disk.
When the step of sending preset redundant configuration information corresponding to the user information to the storage server to enable the storage server to perform redundant configuration on the file created by the virtual machine server according to the redundant configuration information is executed by the processor when the user information passes the authentication, the processor is specifically configured to:
when the user equipment passes the authentication, sending a preset Quota quote value corresponding to the user equipment to the storage server, so that the storage server sends the Quota quote value to the virtual machine server to allocate a capacity value of a virtual machine working disk corresponding to the Quota quote value;
and sending preset redundant configuration information corresponding to the user information to the storage server, so that the storage server performs redundant configuration on the file created by the virtual machine server according to the redundant configuration information.
Wherein the processor is further configured to:
receiving a capacity expansion request sent by user equipment using the virtual machine server, and updating the Quota quote value according to the capacity expansion request;
when the virtual machine server is detected to reload the virtual machine working disk, sending the updated Quota quote value to the storage server, so that the storage server sends the updated Quota quote value to the virtual machine server to redistribute the capacity value of the virtual machine working disk corresponding to the updated Quota quote value.
Specifically, when the capacity of the working disk of the virtual machine is full, the user equipment using the virtual machine server initiates a capacity expansion request, and at this time, the authentication server may receive the capacity expansion request sent by the user equipment using the virtual machine server, and update the Quota quote value according to the capacity expansion request.
When the authentication server detects that the virtual machine server reloads the virtual machine working disk through the storage server, the virtual machine server re-initiates a sharing connection and an authentication request, and after the authentication server passes authentication on the user information again, the authentication server can send an updated Quota quote value to the storage server, so that the storage server sends the updated Quota quote value to the virtual machine server to redistribute the capacity value of the virtual machine working disk corresponding to the updated Quota quote value; meanwhile, the authentication server may also resend the redundant configuration information to the storage server, so that the storage server can still perform redundant configuration on the file created by the virtual machine server according to the redundant configuration information.
By receiving the redundant configuration information and the Quota quote value which are sent by the authentication server and correspond to the user information, the storage server can transmit the Quota quote value to the authentication server, performing redundant configuration on files created by the virtual machines corresponding to the user information, controlling the virtual machine server to allocate the capacity value of the corresponding virtual machine working disk through the Quota quote value, so that the distributed NAS storage can configure different redundancy ratios for the virtual machine working disks of different users, and allocates virtual machine working disks with different capacity values for different users to meet the redundancy ratio and Quota Quota value required by each user, meanwhile, by updating the Quota quote value, when the virtual machine server reloads the virtual machine working disk, the capacity value of the virtual machine working disk can be redistributed according to the updated Quota quote value, so that the capacity expansion of the virtual machine working disk can be simply realized; in addition, because the virtual machine working disks can share and map to the storage server, the virtual machine server only needs to be provided with a virtual machine image file for installing an operating system, thereby being beneficial to the migration and cloning of the virtual machine.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (14)

1. A method of virtual machine configuration, comprising:
when sharing connection is carried out with a virtual machine server, receiving an authentication request which is sent by the virtual machine server and carries user information, and forwarding the authentication request to the authentication server;
when the authentication server passes the authentication of the user information, receiving preset redundant configuration information corresponding to the user information and a Quota quote value corresponding to user equipment, which are sent by the authentication server;
sending the Quota quote value to the virtual machine server so that the virtual machine server allocates the capacity value of the virtual machine working disk according to the Quota quote value;
when a file creating request initiated by the virtual machine server is received, detecting whether the total capacity of the created file is larger than the Quota quote value;
when detecting that the total capacity of the created file is smaller than the Quota quote value, performing redundancy configuration on the created file according to the redundancy configuration information;
when detecting that the total capacity of the created file is larger than the Quota quote value, sending error prompt information to user equipment using the virtual machine server, so that the user equipment sends a capacity expansion request to the authentication server to update the Quota quote value;
when the fact that the virtual machine server reloads the virtual machine working disk is detected, receiving an updated Quota quote value sent by the authentication server, and sending the updated Quota quote value to the virtual machine server, so that the virtual machine server redistributes the capacity value of the virtual machine working disk according to the updated Quota quote value.
2. The method of claim 1, wherein the redundantly configuring the created file according to the redundancy configuration information comprises:
extracting a redundancy mode and a redundancy ratio value from the redundancy configuration information;
and sending the redundancy mode, the redundancy matching ratio value and the created file to a local distributed file system, and performing redundancy configuration on the created file according to the redundancy mode and the redundancy matching ratio value by the distributed file system.
3. The method according to claim 1 or 2, wherein before receiving an authentication request carrying user information sent by the virtual machine server and forwarding the authentication request to the authentication server when performing the shared connection with the virtual machine server, the method further comprises:
presetting a shared directory corresponding to the virtual machine server;
and the shared directory and the virtual machine working disk in the virtual machine server are in a shared mapping relationship.
4. The method of claim 3, wherein when sharing connection is performed with the virtual machine server, receiving an authentication request carrying user information sent by the virtual machine server, and forwarding the authentication request to the authentication server, comprises:
when sharing connection is carried out with a virtual machine server, receiving an authentication request which is sent by the virtual machine server and carries user information, and detecting a storage protocol used by the authentication request sent by the virtual machine server;
forwarding the authentication request to an authentication server corresponding to the storage protocol through the detected storage protocol.
5. The method of claim 4, wherein said forwarding the authentication request to an authentication server corresponding to the storage protocol via the detected storage protocol comprises:
when detecting that the used storage protocol is a server information block (SMB) protocol, forwarding the authentication request to an Active Directory (AD) server through the server information block (SMB) protocol; or,
when detecting that the used storage protocol is a Network File System (NFS) protocol, forwarding the authentication request to a Lightweight Directory Access Protocol (LDAP) server through the Network File System (NFS) protocol.
6. A method of virtual machine configuration, comprising:
receiving an authentication request forwarded by a storage server, wherein the authentication request is an authentication request which is sent by a virtual machine server and carries user information;
authenticating the user information according to the authentication request;
when the user information is authenticated, sending preset redundant configuration information corresponding to the user information and a Quota quote value corresponding to user equipment to the storage server, so that the storage server sends the Quota quote value to the virtual machine server to allocate a capacity value of a virtual machine working disk corresponding to the Quota quote value, and when detecting that the total capacity of files created by the virtual machine server is smaller than the Quota quote value, performing redundant configuration on the files created by the virtual machine server according to the redundant configuration information, and when detecting that the total capacity of the created files is larger than the Quota quote value, sending error prompt information to the user equipment using the virtual machine server;
when a capacity expansion request sent by the user equipment according to the error prompt information is received, updating the Quota quote value according to the capacity expansion request;
when the virtual machine server is detected to reload the virtual machine working disk, sending the updated Quota quote value to the storage server, so that the storage server sends the updated Quota quote value to the virtual machine server to redistribute the capacity value of the virtual machine working disk corresponding to the updated Quota quote value.
7. The method of claim 6, prior to said receiving a storage server forwarded authentication request, further comprising:
presetting user account information, and presetting corresponding redundant configuration information and Quota Quota values for the user account information;
the redundancy configuration information comprises a redundancy mode and a redundancy ratio value.
8. A storage server, comprising:
the receiving and forwarding module is used for receiving an authentication request which is sent by the virtual machine server and carries user information when sharing connection is carried out with the virtual machine server, and forwarding the authentication request to the authentication server;
the first information receiving module is used for receiving preset redundant configuration information which is sent by the authentication server and corresponds to the user information when the authentication server passes the authentication of the user information;
the second information receiving module is used for receiving a preset Quota quote value which is sent by the authentication server and corresponds to the user equipment;
a Quota value sending module, configured to send the Quota quote value to the virtual machine server, so that the virtual machine server allocates a capacity value of a virtual machine working disk according to the Quota quote value;
the capacity detection module is used for detecting whether the total capacity of the created file is greater than the Quota quote value or not when a file creation request initiated by the virtual machine server is received;
the configuration module is used for carrying out redundancy configuration on the created file according to the redundancy configuration information when detecting that the total capacity of the created file is smaller than the Quota quote value;
a prompt sending module, configured to send an error prompt message to the user equipment using the virtual machine server when detecting that the total capacity of the created file is greater than the Quota quote value, so that the user equipment sends a capacity expansion request to the authentication server to update the Quota quote value;
and the update acquisition module is used for receiving an updated Quota quote value sent by the authentication server and sending the updated Quota quote value to the virtual machine server when detecting that the virtual machine server reloads the virtual machine working disk, so that the virtual machine server redistributes the capacity value of the virtual machine working disk according to the updated Quota quote value.
9. The storage server of claim 8, wherein the configuration module comprises:
the extracting unit is used for extracting a redundancy mode and a redundancy ratio value from the redundancy configuration information when receiving a file creating request initiated by the virtual machine server;
and the redundancy configuration unit is used for sending the redundancy mode, the redundancy ratio value and the created file to a local distributed file system, and the distributed file system performs redundancy configuration on the created file according to the redundancy mode and the redundancy ratio value.
10. The storage server of claim 8 or 9, further comprising:
the directory presetting module is used for presetting a shared directory corresponding to the virtual machine server;
and the shared directory and the virtual machine working disk in the virtual machine server are in a shared mapping relationship.
11. The storage server of claim 10, wherein the receive forwarding module comprises:
the protocol detection unit is used for receiving an authentication request which is sent by a virtual machine server and carries user information when sharing connection is carried out with the virtual machine server, and detecting a storage protocol used by the authentication request sent by the virtual machine server;
and the protocol forwarding unit is used for forwarding the authentication request to an authentication server corresponding to the storage protocol through the detected storage protocol.
12. The storage server of claim 11, wherein the protocol forwarding unit comprises:
the first forwarding subunit is used for forwarding the authentication request to an active directory AD server through a server information block SMB protocol when the used storage protocol is detected to be the server information block SMB protocol;
and the second forwarding subunit is used for forwarding the authentication request to a Lightweight Directory Access Protocol (LDAP) server through a Network File System (NFS) protocol when the used storage protocol is detected to be the NFS protocol.
13. An authentication server, comprising:
the request receiving module is used for receiving an authentication request forwarded by the storage server, wherein the authentication request is an authentication request which is sent by the virtual machine server and carries user information;
the authentication module is used for authenticating the user information according to the authentication request;
an information sending module, configured to send, when the user information is authenticated, preset redundant configuration information corresponding to the user information and a Quota quote value corresponding to a user device to the storage server, so that the storage server sends the Quota quote value to the virtual machine server to allocate a capacity value of a virtual machine working disk corresponding to the Quota quote value, and performs redundant configuration on a file created by the virtual machine server according to the redundant configuration information when detecting that a total capacity of the created file is smaller than the Quota quote value, and sends error prompt information to the user device using the virtual machine server when detecting that the total capacity of the file created by the virtual machine server is larger than the Quota quote value;
a receiving and updating module, configured to update the Quota quote value according to the volume expansion request when receiving the volume expansion request sent by the user equipment according to the error prompt information;
and the update sending module is used for sending the updated Quota quote value to the storage server when detecting that the virtual machine working disk is reloaded by the virtual machine server, so that the storage server sends the updated Quota quote value to the virtual machine server to redistribute the capacity value of the virtual machine working disk corresponding to the updated Quota quote value.
14. The authentication server of claim 13, further comprising:
the information presetting module is used for presetting user account information and presetting corresponding redundant configuration information and Quota Quota values for the user account information;
the redundancy configuration information comprises a redundancy mode and a redundancy ratio value.
CN201310570990.8A 2013-11-15 2013-11-15 Virtual machine configuration method and related equipment Active CN103618767B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310570990.8A CN103618767B (en) 2013-11-15 2013-11-15 Virtual machine configuration method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310570990.8A CN103618767B (en) 2013-11-15 2013-11-15 Virtual machine configuration method and related equipment

Publications (2)

Publication Number Publication Date
CN103618767A CN103618767A (en) 2014-03-05
CN103618767B true CN103618767B (en) 2017-01-18

Family

ID=50169471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310570990.8A Active CN103618767B (en) 2013-11-15 2013-11-15 Virtual machine configuration method and related equipment

Country Status (1)

Country Link
CN (1) CN103618767B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094692B (en) * 2014-05-22 2018-07-13 Tcl集团股份有限公司 A kind of Disk Quotas control method and system based on android system
CN107515725B (en) * 2016-06-16 2022-12-09 中兴通讯股份有限公司 Method and device for sharing disk by core network virtualization system and network management MANO system
CN110413584B (en) * 2019-07-24 2021-04-02 华云数据控股集团有限公司 Data storage method, device, equipment and storage medium
CN111240798A (en) * 2019-12-31 2020-06-05 北京安码科技有限公司 Method and system for initializing virtual machine based on mounted file system, electronic device and storage medium
CN117453816B (en) * 2023-10-24 2024-05-07 上海宁盾信息科技有限公司 User data unifying method, system, computer and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270161A (en) * 2011-06-09 2011-12-07 华中科技大学 Methods for storing, reading and recovering erasure code-based multistage fault-tolerant data
CN102333103A (en) * 2010-07-12 2012-01-25 戴元顺 Cloud storage system
CN102594899A (en) * 2011-12-31 2012-07-18 成都市华为赛门铁克科技有限公司 Storage service method and storage server using the same
CN103297496A (en) * 2012-03-02 2013-09-11 国际商业机器公司 Method and system of enhanced storage quota management for cloud computing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333103A (en) * 2010-07-12 2012-01-25 戴元顺 Cloud storage system
CN102270161A (en) * 2011-06-09 2011-12-07 华中科技大学 Methods for storing, reading and recovering erasure code-based multistage fault-tolerant data
CN102594899A (en) * 2011-12-31 2012-07-18 成都市华为赛门铁克科技有限公司 Storage service method and storage server using the same
CN103297496A (en) * 2012-03-02 2013-09-11 国际商业机器公司 Method and system of enhanced storage quota management for cloud computing system

Also Published As

Publication number Publication date
CN103618767A (en) 2014-03-05

Similar Documents

Publication Publication Date Title
US11860738B2 (en) User authorization for file level restoration from image level backups
CN103618767B (en) Virtual machine configuration method and related equipment
CN109067877B (en) Control method for cloud computing platform deployment, server and storage medium
CN103229478B (en) A kind of method and apparatus determining virtual-machine drift
US20160277496A1 (en) Method, server and system for application synchronization
CN106375270B (en) Token generation and authentication method and authentication server
US20130332575A1 (en) Efficient data transfer for cloud storage by centralized management of access tokens
CN110798466B (en) Verification method and system for software license in virtual machine scene
CN105393256A (en) Policy-based secure web boot
CN109033857B (en) Method, device and equipment for accessing data and readable storage medium
KR20130141939A (en) Security method for single use of device interlocking mobile terminal, and mobile host and device apparatus using the same
CN109710695B (en) Transaction request validity identification and initiation method, device, equipment and medium
CN103618768A (en) Method and related device for deploying virtual machine
CN107682184B (en) Cloud service platform region resource extended method, device, equipment and storage medium
CN108400875B (en) Key value-based authorization authentication method, system, electronic device and storage medium
CN103491092A (en) Method and system for separating and binding of application platform and databank
CN107645474B (en) Method and device for logging in open platform
CN102096782A (en) Internet banking safety authentication method based on removable medium of virtual machine
CN105814834B (en) Push-based trust model for public cloud applications
US10116580B2 (en) Seamless location aware network connectivity
CN103024545A (en) Starting method of operating system of set-top box, set-top box and server
WO2022127583A1 (en) Virtual machine control method, cloud management device and storage medium
CN116018580B (en) Techniques for instance persistence data across cloud shells
CN107977564B (en) Transaction authentication processing method, authentication server, terminal and transaction equipment
CN111104363B (en) FPGA cloud platform using method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant