IP Library Granted Patent US 11,922,205
Granted Patent B2
US 11,922,205 · App. 18/270,229 · Granted Mar 5, 2024

Virtual machine management method and apparatus, device, and readable storage medium

Inventors: Kai Liu (Jiangsu, CN); Zheng Xu (Jiangsu, CN); Yi Fan (Jiangsu, CN); Lihua Yan (Jiangsu, CN); Wen Huo (Jiangsu, CN)
Assignee: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
G06F9/45558G06F2009/45562G06F2009/45595
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,922,205
App. No.
18/270,229
Granted
Mar 5, 2024
Kind
B2
Abstract

A virtual machine management method and apparatus, a device, and a readable storage medium. The virtual machine management method is applied to a private cloud, and comprises: acquiring a SELinux label, the SELinux label comprising five elements: User, Role, Type, Sensitivity, and Category (S 101 ); setting elements other than Category in the SELinux label as default values (S 102 ); assigning different values to Category according to a preset Category variable combination so as to obtain multiple non-duplicate label groups (S 103 ); and configuring each label group to a virtual machine in the private cloud, so that virtual machines configured with the same label group communicate with each other, and virtual machines configured with different label groups are isolated from each other (S 104 ).

Claims (61)

1. A method for managing virtual machines, applied to a private cloud, comprising:

acquiring a security-enhanced linux (SElinux) label, wherein the SElinux label comprises five elements of User, Role, Type, Sensitivity, and Category;

setting elements other than the Category in the SElinux label as default values;

obtaining a plurality of distinct label groups by assigning different values to variables in a preset Category variable combination, wherein the Category comprises a preset variable combination selected from a plurality of preset Category variable combinations within a first predefined range, and wherein each of the different values assigned to variables is within a second predefined range; and

configuring each of the label groups for creating virtual machines in a private cloud, so that virtual machines configured with the same label group intercommunicate, and virtual machines configured with different label groups are isolated from each other;

wherein the configuring each of the label groups for creating virtual machines in a private cloud comprises:

extracting identification information about a label configuration switch and an ID of a to-be-configured label group from a request for creating a virtual machine, wherein the label configuration switch is used for indicating whether a SElinux label group is set for the virtual machine;

determining that the to-be-configured label group is available based on the ID of to-be-configured label group being stored in a label group data table;

configuring, based on the to-be-configured label group a basic parameter file used for creating a virtual machine and

creating the virtual machine based on the basic parameter file, in response to determining based on the identification information that the label configuration switch is enabled and determining based on the ID that the to-be-configured label group is available.

2. The method for managing virtual machines according to claim 1 , wherein a value range of a count of variables in the preset Category variable combination is [1, 1024]; an assignment range for each of the variables is [0, 1023], and the assignment for a latter variable in the preset Category variable combination is greater than the assignment for a former variable in the preset Category variable combination.

3. The method for managing virtual machines according to claim 2 , wherein the obtaining a plurality of distinct label groups by assigning different values to variables in the preset Category variable combination comprises:

obtaining the plurality of distinct label groups by assigning different values to the variables in the preset Category variable combination using an incremental strategy or a random strategy.

4. The method for managing virtual machines according to claim 1 , further comprising:

storing the plurality of distinct label groups.

5. The method for managing virtual machines according to claim 1 , further comprising:

returning a notification message indicating a virtual machine creation failure or jumping to a label group creation interface in response to determining based on the ID that the to-be configured label group is not available.

6. The method for managing virtual machines according to claim 5 , wherein the determining based on the ID that the to-be-configured label group is not available comprises:

determining, based on the ID, that the to-be-configured label group is not stored in the label group data table.

7. The method for managing virtual machines according to claim 1 , further comprising:

establishing a mapping relationship between the ID and a created virtual machine, and storing the mapping relationship to a mapping table.

8. The method for managing virtual machines according to claim 7 , further comprising:

querying, based on the ID, the mapping relationship as well as the label group and the virtual machine associated with the mapping relationship.

9. The method for managing virtual machines according to claim 7 , further comprising:

releasing and deleting the mapping relationship between a target virtual machine configured with a target label group and the target label group after deleting the target virtual machine.

10. The method for managing virtual machines according to claim 1 , wherein the SElinux label is set for processes and files by SElinux, and is SElinux is a security subsystem of Mandatory Access Control (MAC) developed under an open source community of Linux.

11. The method for managing virtual machines according to claim 1 , wherein in response to determining based on the identification information that the label configuration switch is disabled, a virtual machine is directly created based on the basic parameter file.

12. An electronic device, comprising:

a memory for storing a computer program; and

a processor for executing the computer program to implement operations of:

acquiring a security-enhanced linux (SElinux) label, wherein the SElinux label comprises five elements of User, Role, Type, Sensitivity and Category;

setting elements other than the Category in the SElinux label as default values;

obtaining a plurality of distinct label groups by assigning different values to variables in a preset Category variable combination, wherein the Category comprises a preset variable combination selected from a plurality of preset Category variable combinations within a first predefined range, and wherein each of the different values assigned to variables is within a second predefined range; and

configuring each of the label groups for creating virtual machines in a private cloud, so that virtual machines configured with the same label group intercommunicate, and virtual machines configured with different label groups are isolated from each other;

wherein the configuring each of the label groups for creating virtual machines in a private cloud comprises:

extracting identification information about a label configuration switch and an ID of a to-be-configured label group from a request for creating a virtual machine, wherein the label configuration switch is used for indicating whether a SElinux label group is set for the virtual machine;

determining that the to-be-configured label group is available based on the ID of to-be-configured label group being stored in a label group data table;

configuring, based on the to-be-configured label group a basic parameter file used for creating a virtual machine; and

creating the virtual machine based on the basic parameter file, in response to determining based on the identification information that the label configuration switch is enabled and determining based on the ID that the to-be-configured label group is available.

13. The electronic device according to claim 12 , wherein a value range of a count of variables in the preset Category variable combination is [1, 1024]; an assignment range for each of the variables is [0, 1023], and the assignment for a latter variable in the preset Category variable combination is greater than the assignment for a former variable in the preset Category variable combination.

14. The electronic device according to claim 13 , wherein the processor is further configured to implement operations of:

obtaining the plurality of distinct label groups by assigning different values to variables in the preset Category variable combination using an incremental strategy or a random strategy.

15. The electronic device according to claim 12 , wherein the processor is further configured to implement operations of:

storing the plurality of distinct label groups.

16. The electronic device according to claim 12 , wherein the processor is further configured to implement operations of:

returning a notification message indicating a virtual machine creation failure or jumping to a label group creation interface in response to determining based on the ID that the to-be-configured label group is not available.

17. The electronic device according to claim 12 , wherein the processor is further configured to implement operations of:

establishing a mapping relationship between the ID and a created virtual machine, and

storing the mapping relationship to a mapping table.

18. The electronic device according to claim 17 , wherein the processor is further configured to implement operations of:

querying, based on the ID, the mapping relationship as well as the label group and the virtual machine associated with the mapping relationship.

19. A non-transient computer-readable storage medium for saving a computer program, wherein the computer program, when executed by a processor, causes the processor to perform operations of:

acquiring a security-enhanced linux (SElinux) label, wherein the SElinux label comprises five elements of User, Role, Type, Sensitivity and Category;

setting elements other than the Category in the SElinux label as default values;

obtaining a plurality of distinct label groups by assigning different values to variables in a preset Category variable combination, wherein the Category comprises a preset variable combination selected from a plurality of preset Category variable combinations within a first predefined range, and wherein each of the different values assigned to variables is within a second predefined range;

configuring each of the label groups for creating virtual machines in a private cloud, so that virtual machines configured with the same label group intercommunicate, and virtual machines configured with different label groups are isolated from each other;

wherein the configuring each of the label groups for creating virtual machines in a private cloud comprises:

extracting identification information about a label configuration switch and an ID of a to-be-configured label group from a request for creating a virtual machine, wherein the label configuration switch is used for indicating whether a SElinux label group is set for the virtual machine;

determining that the to-be-configured label group is available based on the ID of to-be-configured label group being stored in a label group data table;

configuring, based on the to-be-configured label group, a basic parameter file used for creating a virtual machine; and

creating the virtual machine based on the basic parameter file, in response to determining based on the identification information that the label configuration switch is enabled and determining based on the ID that the to-be-configured label group is available.

Assignments (2)
LICENSE Recorded Jun 30, 2026
From: IEIT SYSTEMS CO., LTD
To: AIVRES SYSTEMS INC.
Reel/Frame 075857/0939 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 29, 2023
From: LIU, KAI; XU, ZHENG; FAN, YI; YAN, LIHUA; HUO, WEN
To: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
Reel/Frame 064106/0933 →
Priority Claims (1)
CN 202110916334.3 · Aug 11, 2021 · national
Continuity (1)
Related Publication 20230393880A1 · Dec 7, 2023