CN107357633A - The creation method and creating device of a kind of virtual machine - Google Patents
The creation method and creating device of a kind of virtual machine Download PDFInfo
- Publication number
- CN107357633A CN107357633A CN201710583287.9A CN201710583287A CN107357633A CN 107357633 A CN107357633 A CN 107357633A CN 201710583287 A CN201710583287 A CN 201710583287A CN 107357633 A CN107357633 A CN 107357633A
- Authority
- CN
- China
- Prior art keywords
- bandwidth
- virtual machine
- test
- bandwidth value
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了一种虚拟机的创建方法及创建装置,包括:获取一组各不相同的带宽值;根据获取的一组带宽值创建一组虚拟机模板;获取期望带宽值;根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板;根据选择的目标虚拟机模板创建虚拟机。从本发明提供的技术方案可见,由于根据获取的一组带宽值创建了一组带宽值不同的虚拟机模板,因此,在进行虚拟机的创建时,可以根据具体期望选择拥有不同带宽值的不同虚拟机模板创建虚拟机,从而简单、便捷地实现了拥有期望带宽的虚拟机的创建,满足了用作不同用途的虚拟机拥有期望带宽的要求。
The embodiment of the present invention discloses a method and device for creating a virtual machine, including: obtaining a group of different bandwidth values; creating a group of virtual machine templates according to the obtained group of bandwidth values; obtaining expected bandwidth values; Select a virtual machine template from the set of created virtual machine templates as the target virtual machine template; create a virtual machine based on the selected target virtual machine template. It can be seen from the technical solution provided by the present invention that since a group of virtual machine templates with different bandwidth values are created according to the obtained group of bandwidth values, when creating a virtual machine, different templates with different bandwidth values can be selected according to specific expectations. The virtual machine template creates a virtual machine, thereby simply and conveniently realizing the creation of a virtual machine with expected bandwidth, and meeting the requirement that virtual machines for different purposes have expected bandwidth.
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种虚拟机的创建方法及创建装置。The present invention relates to the field of computer technology, in particular to a virtual machine creation method and creation device.
背景技术Background technique
虚拟机模板是云计算平台中以定制化驱动为用户创建虚拟机提供个性化服务的模板,通过虚拟机模板就可以实现虚拟机的创建。A virtual machine template is a template in the cloud computing platform that uses a customized driver to provide personalized services for users to create a virtual machine. The creation of a virtual machine can be realized through the virtual machine template.
相关技术中,由于所创建的虚拟机模板中的带宽值都是固定的,因此由虚拟机模块创建的虚拟机的带宽也是固定不变的。In the related art, since the bandwidth values in the created virtual machine templates are all fixed, the bandwidth of the virtual machine created by the virtual machine module is also constant.
然而,随着虚拟机的用途越来越广泛,对于用作不同用途的虚拟机出现了不同的带宽要求,因此,这种虚拟机的创建方法已无法满足所创建出的虚拟机拥有期望带宽的要求。However, as the use of virtual machines becomes more and more extensive, different bandwidth requirements appear for virtual machines used for different purposes. Therefore, this method of creating virtual machines cannot meet the requirement that the created virtual machines have expected bandwidth. Require.
发明内容Contents of the invention
为了解决上述技术问题,本发明提供一种虚拟机的创建方法及创建装置,能够简单、便捷地实现拥有期望带宽的虚拟机的创建。In order to solve the above technical problems, the present invention provides a virtual machine creation method and creation device, which can simply and conveniently realize the creation of a virtual machine with desired bandwidth.
为了达到本发明目的,本发明提供了一种虚拟机的创建方法,包括:In order to achieve the purpose of the present invention, the present invention provides a method for creating a virtual machine, including:
获取一组各不相同的带宽值;Get a set of different bandwidth values;
根据获取的所述一组带宽值创建一组虚拟机模板;Create a set of virtual machine templates according to the acquired set of bandwidth values;
获取期望带宽值;Get the expected bandwidth value;
根据获取的所述期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板;Selecting a virtual machine template from a set of created virtual machine templates as a target virtual template according to the obtained expected bandwidth value;
根据选择的所述目标虚拟机模板创建虚拟机。A virtual machine is created based on the selected target virtual machine template.
所述根据选择的目标虚拟机模板生成虚拟机之后,还包括:After the virtual machine is generated according to the selected target virtual machine template, it also includes:
获取带宽测试请求;其中,所述带宽测试请求中包含带宽测试指标;所述带宽测试指标包括每秒进行读写操作总次数的测试指标、每秒进行读操作次数的测试指标和每秒进行写操作次数的测试指标中的至少一个测试指标;Obtain a bandwidth test request; wherein, the bandwidth test request includes a bandwidth test index; the bandwidth test index includes a test index for the total number of read and write operations per second, a test index for the number of read operations per second, and a test index for the number of write operations per second At least one test index in the test index of the number of operations;
根据获取的所述带宽测试请求测试所述虚拟机的带宽值,得到实际带宽值;Test the bandwidth value of the virtual machine according to the obtained bandwidth test request to obtain an actual bandwidth value;
显示所述实际带宽值,以使得用户能够比较所述实际带宽值与所述期望带宽值是否一致。The actual bandwidth value is displayed, so that the user can compare whether the actual bandwidth value is consistent with the expected bandwidth value.
所述获取带宽测试请求之前,还包括:Before obtaining the bandwidth test request, it also includes:
获取针对所述虚拟机的带宽测试工具的安装指令;Obtain an installation instruction for the bandwidth testing tool of the virtual machine;
根据获取的所述安装指令在所述虚拟机上安装带宽测试工具;Install a bandwidth testing tool on the virtual machine according to the obtained installation instruction;
相应的,所述根据获取的带宽测试请求测试虚拟机的带宽值,得到实际带宽值,包括:Correspondingly, said testing the bandwidth value of the virtual machine according to the obtained bandwidth test request to obtain the actual bandwidth value includes:
根据获取的所述带宽测试请求中包含的带宽测试指标测试所述虚拟机的带宽值,得到所述实际带宽值。The actual bandwidth value is obtained by testing the bandwidth value of the virtual machine according to the obtained bandwidth test index included in the bandwidth test request.
所述根据获取的带宽测试请求中包含的带宽测试指标测试虚拟机的带宽值,得到实际带宽值,包括:Said testing the bandwidth value of the virtual machine according to the bandwidth test index contained in the obtained bandwidth test request to obtain the actual bandwidth value includes:
在所述虚拟机中根据所述带宽测试请求中包含的宽带测试指标创建测试脚本;Create a test script in the virtual machine according to the broadband test index contained in the bandwidth test request;
运行所述测试脚本,得到所述实际带宽值。Run the test script to obtain the actual bandwidth value.
所述获取一组各不相同的带宽值,包括:The obtained set of different bandwidth values includes:
接收用户通过云计算管理平台的管理接口输入的所述一组各不相同的带宽值。The set of different bandwidth values input by the user through the management interface of the cloud computing management platform is received.
本发明还提供了一种虚拟机的创建方法,包括:The present invention also provides a method for creating a virtual machine, including:
第一获取模块,用于获取一组各不相同的带宽值;The first obtaining module is used to obtain a set of different bandwidth values;
第一创建模块,用于根据获取的所述一组带宽值创建一组虚拟机模板;A first creating module, configured to create a set of virtual machine templates according to the acquired set of bandwidth values;
第二获取模块,用于获取期望带宽值;The second obtaining module is used to obtain the expected bandwidth value;
选择模块,用于根据获取的所述期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板;A selection module, configured to select a virtual machine template from a set of created virtual machine templates as a target virtual template according to the obtained expected bandwidth value;
第二创建模块,用于根据选择的所述目标虚拟机模板创建虚拟机。The second creating module is configured to create a virtual machine according to the selected target virtual machine template.
还包括:Also includes:
第三获取模块,用于获取带宽测试请求;其中,所述带宽测试请求中包含带宽测试指标;所述带宽测试指标包括每秒进行读写操作总次数的测试指标、每秒进行读操作次数的测试指标和每秒进行写操作次数的测试指标中的至少一个测试指标;The third obtaining module is used to obtain a bandwidth test request; wherein, the bandwidth test request includes a bandwidth test index; the bandwidth test index includes a test index for the total number of read and write operations per second, and a test index for the number of read operations per second At least one test indicator in the test indicator and the test indicator of the number of write operations per second;
测试模块,用于根据获取的所述带宽测试请求测试所述虚拟机的带宽值,得到实际带宽值;A test module, configured to test the bandwidth value of the virtual machine according to the acquired bandwidth test request, to obtain an actual bandwidth value;
显示模块,用于显示所述实际带宽值,以使得用户能够比较所述实际带宽值与所述期望带宽值是否一致。A display module, configured to display the actual bandwidth value, so that the user can compare whether the actual bandwidth value is consistent with the expected bandwidth value.
还包括:Also includes:
第四获取模块,用于获取针对所述虚拟机的带宽测试工具的安装指令;A fourth acquiring module, configured to acquire an installation instruction of the bandwidth testing tool for the virtual machine;
处理模块,用于根据获取的所述安装指令在所述虚拟机上安装带宽测试工具;A processing module, configured to install a bandwidth testing tool on the virtual machine according to the acquired installation instruction;
所述测试模块,具体用于根据获取的所述带宽测试请求中包含的带宽测试指标测试所述虚拟机的带宽值,得到所述实际带宽值。The test module is specifically configured to test the bandwidth value of the virtual machine according to the obtained bandwidth test index contained in the bandwidth test request, to obtain the actual bandwidth value.
所述测试模块包括:The test modules include:
创建单元,用于在所述虚拟机中根据所述带宽测试请求中包含的宽带测试指标创建测试脚本;A creation unit is used to create a test script in the virtual machine according to the broadband test index contained in the bandwidth test request;
运行单元,用于运行所述测试脚本,得到所述实际带宽值。The running unit is configured to run the test script to obtain the actual bandwidth value.
所述第一获取模块具体用于,接收用户通过云计算管理平台的管理接口输入的所述一组各不相同的带宽值。The first obtaining module is specifically configured to receive the set of different bandwidth values input by the user through the management interface of the cloud computing management platform.
与现有技术相比,本发明至少包括获取一组各不相同的带宽值;根据获取的一组带宽值创建一组虚拟机模板;获取期望带宽值;根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板;根据选择的目标虚拟机模板创建虚拟机。从本发明提供的技术方案可见,由于根据获取的一组带宽值创建了一组带宽值不同的虚拟机模板,因此,在进行虚拟机的创建时,可以根据具体期望选择拥有不同带宽值的不同虚拟机模板创建虚拟机,从而简单、便捷地实现了拥有期望带宽的虚拟机的创建,满足了用作不同用途的虚拟机拥有期望带宽的要求。Compared with the prior art, the present invention at least includes obtaining a group of different bandwidth values; creating a group of virtual machine templates according to the obtained group of bandwidth values; obtaining expected bandwidth values; Select a virtual machine template in the group virtual machine template as the target virtual machine template; create a virtual machine based on the selected target virtual machine template. It can be seen from the technical solution provided by the present invention that since a group of virtual machine templates with different bandwidth values are created according to the obtained group of bandwidth values, when creating a virtual machine, different templates with different bandwidth values can be selected according to specific expectations. The virtual machine template creates a virtual machine, thereby simply and conveniently realizing the creation of a virtual machine with expected bandwidth, and meeting the requirement that virtual machines for different purposes have expected bandwidth.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
附图用来提供对本发明技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本发明的技术方案,并不构成对本发明技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present invention, and constitute a part of the description, and are used together with the embodiments of the application to explain the technical solution of the present invention, and do not constitute a limitation to the technical solution of the present invention.
图1为本发明实施例提供的一种虚拟机的创建方法的流程示意图;FIG. 1 is a schematic flowchart of a method for creating a virtual machine provided by an embodiment of the present invention;
图2为本发明实施例提供的另一种虚拟机的创建方法的流程示意图;FIG. 2 is a schematic flowchart of another method for creating a virtual machine provided by an embodiment of the present invention;
图3为本发明实施例提供的又一种虚拟机的创建方法的流程示意图;FIG. 3 is a schematic flowchart of another method for creating a virtual machine provided by an embodiment of the present invention;
图4为本发明实施例提供的一种虚拟机的创建装置的结构示意图;FIG. 4 is a schematic structural diagram of an apparatus for creating a virtual machine provided by an embodiment of the present invention;
图5为本发明实施例提供的另一种虚拟机的创建装置的结构示意图;FIG. 5 is a schematic structural diagram of another device for creating a virtual machine provided by an embodiment of the present invention;
图6为本发明实施例提供的又一种虚拟机的创建装置的结构示意图。FIG. 6 is a schematic structural diagram of another device for creating a virtual machine provided by an embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.
本发明实施例提供一种虚拟机的创建方法,如图1所示,该方法包括:The embodiment of the present invention provides a method for creating a virtual machine, as shown in Figure 1, the method includes:
步骤101、获取一组各不相同的带宽值。Step 101. Obtain a set of different bandwidth values.
其中,一组各不相同的带宽值即指这组带宽值中的任意一个带宽值与其余带宽值都不相同。Wherein, a group of different bandwidth values means that any bandwidth value in the group of bandwidth values is different from other bandwidth values.
步骤102、根据获取的一组带宽值创建一组虚拟机模板。Step 102, create a set of virtual machine templates according to the acquired set of bandwidth values.
具体的,一组带宽值中的带宽值数量有几个,所创建的虚拟机模板的数量。虚拟机模板在云计算管理平台OpenStack中指的就是虚拟机套餐类型flavor,OpenStack是一个旨在为客户提供云服务的开源项目,由计算、镜像、存储、网络等几个主要的组件组合起来完成云服务相关工作,其目标是为全球数以亿计的用户提供实施简单、可大规模扩展、丰富、标准统一的云计算管理平台。Specifically, how many bandwidth values are there in a set of bandwidth values, and the number of created virtual machine templates. The virtual machine template refers to the virtual machine package type flavor in the cloud computing management platform OpenStack. OpenStack is an open source project designed to provide cloud services to customers. It is composed of several main components such as computing, mirroring, storage, and network to complete the cloud Service-related work, the goal is to provide hundreds of millions of users around the world with a cloud computing management platform that is simple to implement, scalable, rich, and standardized.
具体的,根据获取的一组带宽值创建一组虚拟机模板指的是根据获取的一组带宽值设置虚拟机模板中的带宽负载rxtx属性,以创建出一组虚拟机模板(即一组不同rxtx的flavor)。Specifically, creating a set of virtual machine templates according to the obtained set of bandwidth values refers to setting the bandwidth load rxtx attribute in the virtual machine template according to the obtained set of bandwidth values, so as to create a set of virtual machine templates (that is, a set of different The flavor of rxtx).
步骤103、获取期望带宽值。Step 103, obtaining an expected bandwidth value.
步骤104、根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板。Step 104: Select a virtual machine template from the created group of virtual machine templates as the target virtual template according to the acquired expected bandwidth value.
具体的,根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟机模板指的是根据获取的期望宽带值从创建的一组虚拟机模板中选择宽带值符合期望的虚拟机模板作为目标虚拟模板。Specifically, selecting a virtual machine template from a set of created virtual machine templates according to the obtained expected bandwidth value as the target virtual machine template refers to selecting a bandwidth value from the created set of virtual machine templates according to the obtained expected bandwidth value. The desired virtual machine template as the target virtual template.
步骤105、根据选择的目标虚拟机模板创建虚拟机。Step 105, creating a virtual machine according to the selected target virtual machine template.
本发明实施例所提供的虚拟机的创建方法,获取一组各不相同的带宽值;根据获取的一组带宽值创建一组虚拟机模板;获取期望带宽值;根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板;根据选择的目标虚拟机模板创建虚拟机。从本发明提供的技术方案可见,由于根据获取的一组带宽值创建了一组带宽值不同的虚拟机模板,因此,在进行虚拟机的创建时,可以根据具体期望选择拥有不同带宽值的不同虚拟机模板创建虚拟机,从而简单、便捷地实现了拥有期望带宽的虚拟机的创建,满足了用作不同用途的虚拟机拥有期望带宽的要求。The virtual machine creation method provided by the embodiment of the present invention obtains a group of different bandwidth values; creates a group of virtual machine templates according to the obtained group of bandwidth values; obtains the expected bandwidth value; Select a virtual machine template from a group of virtual machine templates as the target virtual template; create a virtual machine according to the selected target virtual machine template. It can be seen from the technical solution provided by the present invention that since a group of virtual machine templates with different bandwidth values are created according to the obtained group of bandwidth values, when creating a virtual machine, different templates with different bandwidth values can be selected according to specific expectations. The virtual machine template creates a virtual machine, thereby simply and conveniently realizing the creation of a virtual machine with expected bandwidth, and meeting the requirement that virtual machines for different purposes have expected bandwidth.
本发明实施例提供另一种虚拟机的创建方法,如图2所示,该方法包括:The embodiment of the present invention provides another method for creating a virtual machine, as shown in Figure 2, the method includes:
步骤201、接收用户通过云计算管理平台的管理接口输入的一组各不相同的带宽值。Step 201, receiving a set of different bandwidth values input by the user through the management interface of the cloud computing management platform.
具体的,若云计算管理平台是OpenStack,那么管理接口就是使用Django应用程序为用户和管理员提供管理OpenStack服务的接口Horizon。Specifically, if the cloud computing management platform is OpenStack, then the management interface is to use the Django application program to provide users and administrators with the interface Horizon to manage OpenStack services.
步骤202、根据获取的一组带宽值创建一组虚拟机模板。Step 202, create a group of virtual machine templates according to the obtained group of bandwidth values.
步骤203、获取期望带宽值。Step 203, obtaining an expected bandwidth value.
具体的,期望宽带值可以是由用户通过云计算管理平台的管理接口输入的。Specifically, the expected bandwidth value may be input by the user through the management interface of the cloud computing management platform.
步骤204、根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板。Step 204: Select a virtual machine template from the created group of virtual machine templates as the target virtual template according to the obtained expected bandwidth value.
步骤205、根据选择的目标虚拟机模板创建虚拟机。Step 205, creating a virtual machine according to the selected target virtual machine template.
步骤206、获取带宽测试请求。Step 206, acquiring a bandwidth test request.
其中,带宽测试请求中包含带宽测试指标;带宽测试指标包括每秒进行读写操作总次数的测试指标、每秒进行读操作次数的测试指标和每秒进行写操作次数的测试指标中的至少一个测试指标。Wherein, the bandwidth test request includes a bandwidth test index; the bandwidth test index includes at least one of the test index of the total number of read and write operations per second, the test index of the number of read operations per second, and the test index of the number of write operations per second Test indicators.
具体的,带宽测试请求可以是由用户通过云计算管理平台的管理接口发送的。Specifically, the bandwidth test request may be sent by the user through the management interface of the cloud computing management platform.
具体的,带宽测试指标可以是每秒进行读写操作的次数(Input/OutputOperations Per Second,IOPS),每秒进行读写操作总次数的测试指标可以是total_iops_sec,每秒进行读操作次数的测试指标可以是read_iops_sec,每秒进行写操作次数的测试指标可以是write_iops_sec。Specifically, the bandwidth test index can be the number of read and write operations per second (Input/OutputOperations Per Second, IOPS), the test index of the total number of read and write operations per second can be total_iops_sec, and the test index of the number of read operations per second It can be read_iops_sec, and the test indicator for the number of write operations per second can be write_iops_sec.
步骤207、根据获取的带宽测试请求测试虚拟机的带宽值,得到实际带宽值。Step 207: Test the bandwidth value of the virtual machine according to the obtained bandwidth test request to obtain the actual bandwidth value.
步骤208、显示实际带宽值,以使得用户能够比较实际带宽值与期望带宽值是否一致。Step 208, displaying the actual bandwidth value, so that the user can compare whether the actual bandwidth value is consistent with the expected bandwidth value.
需要说明的是,步骤206~208是一个带宽测试过程,在创建出虚拟机后对虚拟机所拥有的带宽进行测试,产生测试结果进行显示以使得用户明确。It should be noted that steps 206-208 are a bandwidth testing process. After the virtual machine is created, the bandwidth owned by the virtual machine is tested, and the test results are generated and displayed to make it clear to the user.
本发明实施例所提供的虚拟机的创建方法,获取一组各不相同的带宽值;根据获取的一组带宽值创建一组虚拟机模板;获取期望带宽值;根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板;根据选择的目标虚拟机模板创建虚拟机。从本发明提供的技术方案可见,由于根据获取的一组带宽值创建了一组带宽值不同的虚拟机模板,因此,在进行虚拟机的创建时,可以根据具体期望选择拥有不同带宽值的不同虚拟机模板创建虚拟机,从而简单、便捷地实现了拥有期望带宽的虚拟机的创建,满足了用作不同用途的虚拟机拥有期望带宽的要求。The virtual machine creation method provided by the embodiment of the present invention obtains a group of different bandwidth values; creates a group of virtual machine templates according to the obtained group of bandwidth values; obtains the expected bandwidth value; Select a virtual machine template from a group of virtual machine templates as the target virtual template; create a virtual machine according to the selected target virtual machine template. It can be seen from the technical solution provided by the present invention that since a group of virtual machine templates with different bandwidth values are created according to the obtained group of bandwidth values, when creating a virtual machine, different templates with different bandwidth values can be selected according to specific expectations. The virtual machine template creates a virtual machine, thereby simply and conveniently realizing the creation of a virtual machine with expected bandwidth, and meeting the requirement that virtual machines for different purposes have expected bandwidth.
本发明实施例提供又一种虚拟机的创建方法,如图3所示,该方法包括:The embodiment of the present invention provides another method for creating a virtual machine, as shown in Figure 3, the method includes:
步骤301、接收用户通过云计算管理平台的管理接口输入的一组各不相同的带宽值。Step 301: Receive a set of different bandwidth values input by a user through a management interface of a cloud computing management platform.
步骤302、根据获取的一组带宽值创建一组虚拟机模板。Step 302: Create a group of virtual machine templates according to the obtained group of bandwidth values.
步骤303、获取期望宽带值。Step 303, obtaining the expected bandwidth value.
步骤304、根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板。Step 304: Select a virtual machine template from the created group of virtual machine templates as the target virtual template according to the acquired expected bandwidth value.
步骤305、根据选择的目标虚拟机模板创建虚拟机。Step 305, creating a virtual machine according to the selected target virtual machine template.
步骤306、获取针对虚拟机的带宽测试工具的安装指令。Step 306, obtaining an installation instruction of the bandwidth testing tool for the virtual machine.
具体的,带宽测试工具可以是fio,fio是一种便捷易用的硬件压力测试工具,它可以通过多线程或进程模拟各种输入输出操作以进行带宽测试。Specifically, the bandwidth testing tool may be fio, which is a convenient and easy-to-use hardware stress testing tool, which can simulate various input and output operations through multiple threads or processes to perform bandwidth testing.
步骤307、根据获取的安装指令在虚拟机上安装带宽测试工具。Step 307, install the bandwidth testing tool on the virtual machine according to the acquired installation instruction.
步骤308、获取带宽测试请求。Step 308, acquiring a bandwidth test request.
其中,带宽测试请求中包含带宽测试指标;带宽测试指标包括每秒进行读写操作总次数的测试指标、每秒进行读操作次数的测试指标和每秒进行写操作次数的测试指标中的至少一个测试指标。Wherein, the bandwidth test request includes a bandwidth test index; the bandwidth test index includes at least one of the test index of the total number of read and write operations per second, the test index of the number of read operations per second, and the test index of the number of write operations per second Test indicators.
具体的,带宽测试指标可以是每秒进行读写操作总次数的测试指标、每秒进行读操作次数的测试指标和每秒进行写操作次数的测试指标中的任意一个或任意两个或全部。Specifically, the bandwidth test index may be any one or any two or all of the test index of the total number of read and write operations per second, the test index of the number of read operations per second, and the test index of the number of write operations per second.
步骤309、根据获取的带宽测试请求中包含的带宽测试指标测试虚拟机的带宽值,得到实际带宽值。Step 309: Test the bandwidth value of the virtual machine according to the bandwidth test index included in the obtained bandwidth test request to obtain the actual bandwidth value.
具体的,步骤309可以通过步骤309a、309b实现:Specifically, step 309 can be realized through steps 309a and 309b:
步骤309a、在虚拟机中根据带宽测试请求中包含的宽带测试指标创建测试脚本。Step 309a, create a test script in the virtual machine according to the broadband test index included in the bandwidth test request.
步骤309b、运行测试脚本,得到实际带宽值。Step 309b, run the test script to obtain the actual bandwidth value.
步骤310、显示实际带宽值,以使得用户能够比较实际带宽值与期望带宽值是否一致。Step 310, displaying the actual bandwidth value, so that the user can compare whether the actual bandwidth value is consistent with the expected bandwidth value.
本发明实施例所提供的虚拟机的创建方法,获取一组各不相同的带宽值;根据获取的一组带宽值创建一组虚拟机模板;获取期望带宽值;根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板;根据选择的目标虚拟机模板创建虚拟机。从本发明提供的技术方案可见,由于根据获取的一组带宽值创建了一组带宽值不同的虚拟机模板,因此,在进行虚拟机的创建时,可以根据具体期望选择拥有不同带宽值的不同虚拟机模板创建虚拟机,从而简单、便捷地实现了拥有期望带宽的虚拟机的创建,满足了用作不同用途的虚拟机拥有期望带宽的要求。The virtual machine creation method provided by the embodiment of the present invention obtains a group of different bandwidth values; creates a group of virtual machine templates according to the obtained group of bandwidth values; obtains the expected bandwidth value; Select a virtual machine template from a group of virtual machine templates as the target virtual template; create a virtual machine according to the selected target virtual machine template. It can be seen from the technical solution provided by the present invention that since a group of virtual machine templates with different bandwidth values are created according to the obtained group of bandwidth values, when creating a virtual machine, different templates with different bandwidth values can be selected according to specific expectations. The virtual machine template creates a virtual machine, thereby simply and conveniently realizing the creation of a virtual machine with expected bandwidth, and meeting the requirement that virtual machines for different purposes have expected bandwidth.
本发明实施例提供一种虚拟机的创建装置,如图4所示,该创建装置4包括:An embodiment of the present invention provides a device for creating a virtual machine. As shown in FIG. 4, the device for creating 4 includes:
第一获取模块401,用于获取一组各不相同的带宽值。The first obtaining module 401 is configured to obtain a group of different bandwidth values.
第一创建模块402,用于根据获取的所述一组带宽值创建一组虚拟机模板。The first creation module 402 is configured to create a group of virtual machine templates according to the obtained group of bandwidth values.
第二获取模块403,用于获取期望带宽值。The second acquiring module 403 is configured to acquire an expected bandwidth value.
选择模块404,用于根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟机模板。The selection module 404 is configured to select a virtual machine template from a set of created virtual machine templates as a target virtual machine template according to the acquired expected bandwidth value.
第二创建模块405,用于根据选择的目标虚拟机模板创建虚拟机。The second creating module 405 is configured to create a virtual machine according to the selected target virtual machine template.
进一步,在图4对应的实施例的基础上,本发明实施例提供另一种虚拟机的创建装置,如图5所示,该创建装置4还包括:Further, on the basis of the embodiment corresponding to FIG. 4 , the embodiment of the present invention provides another virtual machine creation device. As shown in FIG. 5 , the creation device 4 further includes:
第三获取模块406,用于获取带宽测试请求;其中,带宽测试请求中包含带宽测试指标;带宽测试指标包括每秒进行读写操作总次数的测试指标、每秒进行读操作次数的测试指标和每秒进行写操作次数的测试指标中的至少一个测试指标。The third obtaining module 406 is used to obtain a bandwidth test request; wherein, the bandwidth test request includes a bandwidth test index; the bandwidth test index includes a test index for the total number of read and write operations per second, a test index for the number of read operations per second, and At least one test indicator in the test indicators of the number of write operations per second.
测试模块407,用于根据获取的带宽测试请求测试虚拟机的带宽值,得到实际带宽值。The testing module 407 is configured to test the bandwidth value of the virtual machine according to the obtained bandwidth test request to obtain the actual bandwidth value.
显示模块408,用于显示实际带宽值,以使得用户能够比较实际带宽值与期望带宽值是否一致。The display module 408 is configured to display the actual bandwidth value, so that the user can compare whether the actual bandwidth value is consistent with the expected bandwidth value.
进一步,在图5对应的实施例的基础上,本发明实施例提供另一种虚拟机的创建装置,如图6所示,该创建装置4还包括:Further, on the basis of the embodiment corresponding to FIG. 5, the embodiment of the present invention provides another virtual machine creation device. As shown in FIG. 6, the creation device 4 further includes:
第四获取模块409,用于获取针对虚拟机的带宽测试工具的安装指令;The fourth obtaining module 409 is used to obtain the installation instruction of the bandwidth testing tool for the virtual machine;
处理模块410,用于根据获取的安装指令在虚拟机上安装带宽测试工具。The processing module 410 is configured to install the bandwidth testing tool on the virtual machine according to the acquired installation instruction.
测试模块407,具体用于根据获取的带宽测试请求中包含的带宽测试指标测试虚拟机的带宽值,得到实际带宽值。The test module 407 is specifically configured to test the bandwidth value of the virtual machine according to the bandwidth test index contained in the obtained bandwidth test request to obtain the actual bandwidth value.
测试模块407包括:The testing module 407 includes:
创建单元4071,用于在虚拟机中根据带宽测试请求中包含的宽带测试指标创建测试脚本。The creating unit 4071 is configured to create a test script in the virtual machine according to the broadband test index contained in the bandwidth test request.
运行单元4072,用于运行测试脚本,得到实际带宽值。The running unit 4072 is used to run the test script to obtain the actual bandwidth value.
进一步,第一获取模块具体用于401,接收用户通过云计算管理平台的管理接口输入的所述一组各不相同的带宽值。Further, the first obtaining module is specifically configured to 401, receiving the set of different bandwidth values input by the user through the management interface of the cloud computing management platform.
本发明实施例所提供的虚拟机的创建装置,获取一组各不相同的带宽值;根据获取的一组带宽值创建一组虚拟机模板;获取期望带宽值;根据获取的期望带宽值从创建的一组虚拟机模板中选择一个虚拟机模板作为目标虚拟模板;根据选择的目标虚拟机模板创建虚拟机。从本发明提供的技术方案可见,由于根据获取的一组带宽值创建了一组带宽值不同的虚拟机模板,因此,在进行虚拟机的创建时,可以根据具体期望选择拥有不同带宽值的不同虚拟机模板创建虚拟机,从而简单、便捷地实现了拥有期望带宽的虚拟机的创建,满足了用作不同用途的虚拟机拥有期望带宽的要求。The virtual machine creation device provided by the embodiment of the present invention obtains a group of different bandwidth values; creates a group of virtual machine templates according to the obtained group of bandwidth values; obtains the expected bandwidth value; Select a virtual machine template from a group of virtual machine templates as the target virtual template; create a virtual machine according to the selected target virtual machine template. It can be seen from the technical solution provided by the present invention that since a group of virtual machine templates with different bandwidth values are created according to the obtained group of bandwidth values, when creating a virtual machine, different templates with different bandwidth values can be selected according to specific expectations. The virtual machine template creates a virtual machine, thereby simply and conveniently realizing the creation of a virtual machine with expected bandwidth, and meeting the requirement that virtual machines for different purposes have expected bandwidth.
在实际应用中,所述第一获取模块401、第一创建模块402、第二获取模块403、选择模块404、第二创建模块405、第三获取模块406、测试模块407、创建单元4071、运行单元4072、显示模块408、第四获取模块409、处理模块410均可由位于虚拟机的创建装置中的中央处理器(Central Processing Unit,CPU)、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)或现场可编程门阵列(Field ProgrammableGate Array,FPGA)等实现。In practical applications, the first acquisition module 401, the first creation module 402, the second acquisition module 403, the selection module 404, the second creation module 405, the third acquisition module 406, the test module 407, the creation unit 4071, the running The unit 4072, the display module 408, the fourth acquisition module 409, and the processing module 410 can all be composed of a central processing unit (Central Processing Unit, CPU), a microprocessor (Micro Processor Unit, MPU), digital signal Processor (Digital Signal Processor, DSP) or Field Programmable Gate Array (Field Programmable Gate Array, FPGA) and other implementations.
虽然本发明所揭露的实施方式如上,但所述的内容仅为便于理解本发明而采用的实施方式,并非用以限定本发明。任何本发明所属领域内的技术人员,在不脱离本发明所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本发明的专利保护范围,仍须以所附的权利要求书所界定的范围为准。Although the embodiments disclosed in the present invention are as above, the described content is only an embodiment adopted for understanding the present invention, and is not intended to limit the present invention. Anyone skilled in the field of the present invention can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed by the present invention, but the patent protection scope of the present invention must still be The scope defined by the appended claims shall prevail.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710583287.9A CN107357633A (en) | 2017-07-17 | 2017-07-17 | The creation method and creating device of a kind of virtual machine |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710583287.9A CN107357633A (en) | 2017-07-17 | 2017-07-17 | The creation method and creating device of a kind of virtual machine |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107357633A true CN107357633A (en) | 2017-11-17 |
Family
ID=60293493
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710583287.9A Pending CN107357633A (en) | 2017-07-17 | 2017-07-17 | The creation method and creating device of a kind of virtual machine |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107357633A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111917604A (en) * | 2020-07-28 | 2020-11-10 | 苏州浪潮智能科技有限公司 | Method for automatically testing SONiC based on virtual switch simulation platform |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160162317A1 (en) * | 2014-12-05 | 2016-06-09 | International Business Machines Corporation | Configuring monitoring for virtualized servers |
| CN106155759A (en) * | 2015-03-26 | 2016-11-23 | 华为软件技术有限公司 | virtual machine batch creation method and device |
| CN106502796A (en) * | 2016-10-27 | 2017-03-15 | 广东浪潮大数据研究有限公司 | A kind of software development test platform, system and using method |
| CN106648464A (en) * | 2016-12-22 | 2017-05-10 | 柏域信息科技(上海)有限公司 | Multi-node mixed block cache data read-writing method and system based on cloud storage |
| CN106775946A (en) * | 2016-12-16 | 2017-05-31 | 无锡华云数据技术服务有限公司 | A kind of virtual machine Method of Creation Process |
-
2017
- 2017-07-17 CN CN201710583287.9A patent/CN107357633A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160162317A1 (en) * | 2014-12-05 | 2016-06-09 | International Business Machines Corporation | Configuring monitoring for virtualized servers |
| CN106155759A (en) * | 2015-03-26 | 2016-11-23 | 华为软件技术有限公司 | virtual machine batch creation method and device |
| CN106502796A (en) * | 2016-10-27 | 2017-03-15 | 广东浪潮大数据研究有限公司 | A kind of software development test platform, system and using method |
| CN106775946A (en) * | 2016-12-16 | 2017-05-31 | 无锡华云数据技术服务有限公司 | A kind of virtual machine Method of Creation Process |
| CN106648464A (en) * | 2016-12-22 | 2017-05-10 | 柏域信息科技(上海)有限公司 | Multi-node mixed block cache data read-writing method and system based on cloud storage |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111917604A (en) * | 2020-07-28 | 2020-11-10 | 苏州浪潮智能科技有限公司 | Method for automatically testing SONiC based on virtual switch simulation platform |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9684743B2 (en) | Isolated debugging in an FPGA based emulation environment | |
| US10552304B2 (en) | Using test workload run facts and problem discovery data as input for business analytics to determine test effectiveness | |
| CN106383786A (en) | Interface pressure performance testing method and device and electronic equipment | |
| CN111290941B (en) | Testing method, device, computing equipment and medium for multiple interfaces | |
| US11238632B2 (en) | Interface to index and display geospatial data | |
| US10176082B2 (en) | Z/OS SMF/RMF workload data playback with web dashboard visualization | |
| JP6600011B2 (en) | Efficient waveform generation for emulation | |
| US11182606B2 (en) | Converting chart data | |
| US10671506B2 (en) | Evaluating fairness in devices under test | |
| CN114880238A (en) | Mobile terminal interface testing method, device, equipment and storage medium | |
| CN108924547A (en) | TV motherboard test method, device, system and test host computer | |
| CN107357633A (en) | The creation method and creating device of a kind of virtual machine | |
| US9280627B1 (en) | GUI based verification at multiple abstraction levels | |
| US20180196928A1 (en) | Network visualization for access controls | |
| US10289530B2 (en) | Run time test workload customer profiling baselines visualization | |
| CN107943635A (en) | A kind of test method of storage device, device and medium | |
| CN112445711A (en) | Test method for generating simulation test scene based on visual dragging of Web page | |
| US10423579B2 (en) | Z/OS SMF record navigation visualization tooling | |
| US10628840B2 (en) | Using run-time and historical customer profiling and analytics to determine and score customer adoption levels of platform technologies | |
| US10643228B2 (en) | Standardizing customer and test data and information collection for run time and historical profiling environments and workload comparisons | |
| US10353805B2 (en) | Using customer workload profiling and analytics to understand and visualize customer workload execution | |
| US20210303766A1 (en) | Pre-silicon chip model of extracted workload inner loop instruction traces | |
| CN112685282A (en) | Test method, test device, electronic equipment and computer readable storage medium | |
| US20180189802A1 (en) | System, method and computer program product for sensory simulation during product testing | |
| US9983980B2 (en) | Visual test workload execution modeling |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171117 |