[go: up one dir, main page]

CN106293877B - Virtual machine creating method and system - Google Patents

Virtual machine creating method and system Download PDF

Info

Publication number
CN106293877B
CN106293877B CN201610638519.1A CN201610638519A CN106293877B CN 106293877 B CN106293877 B CN 106293877B CN 201610638519 A CN201610638519 A CN 201610638519A CN 106293877 B CN106293877 B CN 106293877B
Authority
CN
China
Prior art keywords
virtual
virtual machine
bios
software
software stack
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
CN201610638519.1A
Other languages
Chinese (zh)
Other versions
CN106293877A (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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201610638519.1A priority Critical patent/CN106293877B/en
Publication of CN106293877A publication Critical patent/CN106293877A/en
Application granted granted Critical
Publication of CN106293877B publication Critical patent/CN106293877B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, 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)
  • Stored Programmes (AREA)

Abstract

The application discloses a virtual machine creating method, which comprises the following steps: before a target virtual machine is created, N types of software stacks required to be contained in the target virtual machine are predetermined; acquiring the N types of software stacks, and respectively calling N virtual BIOS (basic input output System) segments which are created in advance and correspond to the N types of software stacks one by one according to the N types of software stacks; integrating the N virtual BIOS fragments to obtain a virtual BIOS corresponding to a target virtual machine; and performing virtual machine creation operation by using the N-type software stack and the virtual BIOS to obtain a target virtual machine. Therefore, before the virtual machine is created, the virtual BIOS corresponding to the required software stack in the virtual machine is created, so that the virtual BIOS can just meet the requirement of the software stack in the virtual machine on the input and output functions, and the condition that the input and output functions are wasted in the virtual machine is avoided. In addition, the invention also discloses a virtual machine creating system.

Description

一种虚拟机创建方法及系统A method and system for creating a virtual machine

技术领域technical field

本发明涉及虚拟机技术领域,特别涉及一种虚拟机创建方法及系统。The invention relates to the technical field of virtual machines, in particular to a method and system for creating a virtual machine.

背景技术Background technique

当前,随着计算机技术的发展,许多硬件计算终端上开始安装一台甚至多台的虚拟机。每台虚拟机能够像一台硬件计算机那样进行工作,这样就相当于将一台硬件计算终端当作多台计算终端来使用,从而能够为技术人员节省大量的硬件采购成本。At present, with the development of computer technology, one or more virtual machines have been installed on many hardware computing terminals. Each virtual machine can work like a hardware computer, which is equivalent to using one hardware computing terminal as multiple computing terminals, thereby saving a lot of hardware procurement costs for technicians.

在创建虚拟机之前,需要先准备好相应的虚拟BIOS(BIOS,即Basic Input OutputSystem,基本输入输出系统),然后基于该虚拟BIOS创建相应的虚拟机。现有技术中,硬件终端上的虚拟BIOS是恒定不变的,由此使得,所有基于该虚拟BIOS创建的虚拟机所拥有的输入输出功能是相同的,然而,由于某些虚拟机中可能不需要使用到某些输入输出功能,这样便会导致虚拟机中存在输入输出功能过剩的问题,也即,虚拟机中携带了一些其根本不会用到的输入输出功能,这样既造成了功能上的浪费,也使得虚拟机本身变得过于臃肿。Before creating a virtual machine, a corresponding virtual BIOS (BIOS, that is, Basic Input Output System, basic input output system) needs to be prepared first, and then a corresponding virtual machine is created based on the virtual BIOS. In the prior art, the virtual BIOS on the hardware terminal is constant, so that all virtual machines created based on the virtual BIOS have the same input and output functions. Some input and output functions need to be used, which will lead to the problem of excess input and output functions in the virtual machine, that is, the virtual machine carries some input and output functions that it will not use at all, which not only causes functional problems It also makes the virtual machine itself too bloated.

综上所述可以看出,如何避免虚拟机中输入输出功能过剩的情况是目前有待解决的问题。In summary, it can be seen that how to avoid the situation of excessive input and output functions in the virtual machine is a problem to be solved at present.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种虚拟机创建方法及系统,避免了虚拟机中输入输出功能过剩的情况。其具体方案如下:In view of this, the purpose of the present invention is to provide a method and system for creating a virtual machine, which avoids the situation of excessive input and output functions in the virtual machine. Its specific plan is as follows:

一种虚拟机创建方法,包括:A method for creating a virtual machine, comprising:

在创建目标虚拟机之前,预先确定所述目标虚拟机中需要包含的N类软件堆栈,N为正整数;Before creating a target virtual machine, pre-determine N types of software stacks that need to be included in the target virtual machine, where N is a positive integer;

获取所述N类软件堆栈,并根据所述N类软件堆栈,分别调取预先创建的与所述N类软件堆栈一一对应的N个虚拟BIOS片段;acquiring the N-type software stack, and respectively calling the pre-created N virtual BIOS segments corresponding to the N-type software stack according to the N-type software stack;

对所述N个虚拟BIOS片段进行整合,得到与所述目标虚拟机对应的虚拟BIOS;Integrating the N virtual BIOS segments to obtain a virtual BIOS corresponding to the target virtual machine;

利用所述N类软件堆栈和所述虚拟BIOS进行虚拟机创建操作,得到所述目标虚拟机。A virtual machine creation operation is performed by using the N-type software stack and the virtual BIOS to obtain the target virtual machine.

优选的,在所述预先确定所述目标虚拟机中需要包含的N类软件堆栈的过程之前,还包括:Preferably, before the process of predetermining the N types of software stacks that need to be included in the target virtual machine, the method further includes:

根据不同的软件功能类型,对已知的所有软件堆栈进行分类,得到M类软件堆栈,M为不小于N的整数;其中,每类软件堆栈中包括至少一个软件堆栈。According to different software function types, all known software stacks are classified to obtain M types of software stacks, where M is an integer not less than N; wherein, each type of software stack includes at least one software stack.

优选的,在所述分别调取预先创建的与所述N类软件堆栈一一对应的N个虚拟BIOS片段的过程之前,还包括:Preferably, before the process of respectively calling the pre-created N virtual BIOS segments corresponding to the N types of software stacks one-to-one, the method further includes:

创建与所述M类软件堆栈中的每类软件堆栈相对应的虚拟BIOS片段,相应地得到M个虚拟BIOS片段。A virtual BIOS segment corresponding to each type of software stack in the M types of software stacks is created, and M virtual BIOS segments are obtained accordingly.

优选的,在所述相应地得到M个虚拟BIOS片段之后,还包括:Preferably, after the corresponding obtaining of the M virtual BIOS segments, the method further includes:

将所述M个虚拟BIOS片段分别一对一地保存至M个操作系统中。The M virtual BIOS segments are stored in the M operating systems on a one-to-one basis, respectively.

优选的,所述根据所述N类软件堆栈,分别调取预先创建的与所述N类软件堆栈一一对应的N个虚拟BIOS片段的过程,包括:Preferably, according to the N-type software stack, the process of respectively calling the pre-created N virtual BIOS segments corresponding to the N-type software stack one-to-one includes:

从与所述N类软件堆栈对应的N个操作系统中调取相对应的N个虚拟BIOS片段。The corresponding N virtual BIOS segments are called from the N operating systems corresponding to the N types of software stacks.

本发明还公开了一种虚拟机创建系统,包括:The invention also discloses a virtual machine creation system, comprising:

信息确定模块,用于在创建目标虚拟机之前,预先确定所述目标虚拟机中需要包含的N类软件堆栈,N为正整数;an information determination module, configured to predetermine N types of software stacks that need to be included in the target virtual machine before creating the target virtual machine, where N is a positive integer;

信息获取模块,用于获取所述N类软件堆栈,并根据所述N类软件堆栈,分别调取预先创建的与所述N类软件堆栈一一对应的N个虚拟BIOS片段;an information acquisition module, configured to acquire the N-type software stack, and according to the N-type software stack, respectively call pre-created N virtual BIOS fragments corresponding to the N-type software stack one-to-one;

虚拟BIOS整合模块,用于对所述N个虚拟BIOS片段进行整合,得到与所述目标虚拟机对应的虚拟BIOS;a virtual BIOS integration module, configured to integrate the N virtual BIOS segments to obtain a virtual BIOS corresponding to the target virtual machine;

虚拟机创建模块,用于利用所述N类软件堆栈和所述虚拟BIOS进行虚拟机创建操作,得到所述目标虚拟机。A virtual machine creation module, configured to perform a virtual machine creation operation by using the N-type software stack and the virtual BIOS to obtain the target virtual machine.

优选的,所述虚拟机创建系统,还包括:Preferably, the virtual machine creation system further includes:

信息分类模块,用于在所述信息确定模块确定所述N类软件堆栈之前,根据不同的软件功能类型,对已知的所有软件堆栈进行分类,得到M类软件堆栈,M为不小于N的整数;其中,每类软件堆栈中包括至少一个软件堆栈。The information classification module is used to classify all known software stacks according to different software function types before the information determination module determines the N-type software stacks, and obtain M-type software stacks, where M is not less than N Integer; where each type of software stack includes at least one software stack.

优选的,所述虚拟机创建系统,还包括:Preferably, the virtual machine creation system further includes:

虚拟BIOS片段创建模块,用于在所述信息获取模块调取所述N个虚拟BIOS片段之前,创建与所述M类软件堆栈中的每类软件堆栈相对应的虚拟BIOS片段,相应地得到M个虚拟BIOS片段。A virtual BIOS segment creation module, configured to create a virtual BIOS segment corresponding to each type of software stack in the M types of software stacks before the information acquisition module calls the N virtual BIOS segments, and obtain M correspondingly A virtual BIOS segment.

优选的,所述虚拟机创建系统,还包括:Preferably, the virtual machine creation system further includes:

虚拟BIOS片段创建模块,用于在所述虚拟BIOS片段创建模块得到所述M个虚拟BIOS片段之后,将所述M个虚拟BIOS片段分别一对一地保存至M个操作系统中。The virtual BIOS segment creation module is configured to save the M virtual BIOS segments into the M operating systems on a one-to-one basis after the virtual BIOS segment creation module obtains the M virtual BIOS segments.

优选的,所述信息获取模块包括:Preferably, the information acquisition module includes:

软件堆栈获取单元,用于获取所述N类软件堆栈;a software stack acquisition unit for acquiring the N-type software stack;

虚拟BIOS片段获取单元,用于从与所述N类软件堆栈对应的N个操作系统中调取相对应的N个虚拟BIOS片段。A virtual BIOS fragment obtaining unit, configured to retrieve N corresponding virtual BIOS fragments from N operating systems corresponding to the N types of software stacks.

本发明中,虚拟机创建方法包括:在创建目标虚拟机之前,预先确定目标虚拟机中需要包含的N类软件堆栈;获取上述N类软件堆栈,并根据上述N类软件堆栈,分别调取预先创建的与上述N类软件堆栈一一对应的N个虚拟BIOS片段;对上述N个虚拟BIOS片段进行整合,得到与目标虚拟机对应的虚拟BIOS;利用上述N类软件堆栈和上述虚拟BIOS进行虚拟机创建操作,得到目标虚拟机。可见,本发明在创建虚拟机之前,先确定该待创建的虚拟机中需要包含的各类软件堆栈,然后调取预先创建的与上述各类软件堆栈对应的多个虚拟BIOS片段,进而对上述调取出来的多个虚拟BIOS片段进行整合,得到一个完整的虚拟BIOS,接着利用这个完整的虚拟BIOS和上述各类软件堆栈,生成相应的虚拟机。也即,本发明在创建虚拟机之前,先创建了与该虚拟机中所需的软件堆栈对应的虚拟BIOS,从而使得该虚拟BIOS恰好能够满足虚拟机中的软件堆栈对输入输出功能的需求,避免了虚拟机中出现输入输出功能浪费的情况。In the present invention, the method for creating a virtual machine includes: before creating a target virtual machine, pre-determining N types of software stacks that need to be included in the target virtual machine; Created N virtual BIOS fragments corresponding to the above N types of software stacks one-to-one; Integrate the above N virtual BIOS fragments to obtain a virtual BIOS corresponding to the target virtual machine; use the above N types of software stacks and the above virtual BIOS to perform virtual Machine creation operation to get the target virtual machine. It can be seen that, before creating a virtual machine, the present invention first determines various software stacks that need to be included in the virtual machine to be created, and then retrieves multiple pre-created virtual BIOS fragments corresponding to the above-mentioned various software stacks, and then interprets the above-mentioned software stacks. The extracted multiple virtual BIOS segments are integrated to obtain a complete virtual BIOS, and then a corresponding virtual machine is generated by using the complete virtual BIOS and the above-mentioned various software stacks. That is, before creating a virtual machine, the present invention creates a virtual BIOS corresponding to the software stack required in the virtual machine, so that the virtual BIOS can just meet the input and output function requirements of the software stack in the virtual machine, It avoids the waste of input and output functions in the virtual machine.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative work.

图1为本发明实施例公开的一种虚拟机创建方法流程图;1 is a flowchart of a method for creating a virtual machine disclosed in an embodiment of the present invention;

图2为本发明实施例公开的一种虚拟机创建系统结构示意图。FIG. 2 is a schematic structural diagram of a system for creating a virtual machine disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例公开了一种虚拟机创建方法,参见图1所示,该方法包括:An embodiment of the present invention discloses a method for creating a virtual machine, as shown in FIG. 1 , the method includes:

步骤S11:在创建目标虚拟机之前,预先确定目标虚拟机中需要包含的N类软件堆栈,N为正整数。Step S11: Before creating the target virtual machine, pre-determine N types of software stacks that need to be included in the target virtual machine, where N is a positive integer.

可以理解的是,本实施例在确定目标虚拟机中需要包含的各类软件堆栈之前,需要先对软件堆栈的类别进行划分。It can be understood that, in this embodiment, before determining various types of software stacks that need to be included in the target virtual machine, it is necessary to divide the types of software stacks first.

步骤S12:获取上述N类软件堆栈,并根据上述N类软件堆栈,分别调取预先创建的与上述N类软件堆栈一一对应的N个虚拟BIOS片段。Step S12: Acquire the above-mentioned N types of software stacks, and according to the above-mentioned N types of software stacks, respectively call the pre-created N virtual BIOS segments corresponding to the above-mentioned N types of software stacks one-to-one.

需要说明的是,在获取上述N类软件堆栈之前,需要对各类软件堆栈进行预先存储。It should be noted that, before acquiring the above-mentioned N types of software stacks, various types of software stacks need to be pre-stored.

另外,本实施例需要预先创建与每类软件堆栈对应的虚拟BIOS片段。本实施例中,可以优先将软件堆栈和相应的虚拟BIOS片段保存至同一个存储区域中。可以理解的是,本实施例中所谓的虚拟BIOS片段本质上是一个完整的虚拟BIOS中的一个程序片段。其中,与某类软件堆栈对应的虚拟BIOS片段恰好能够为该类软件堆栈提供相匹配的输入输出功能。In addition, in this embodiment, a virtual BIOS segment corresponding to each type of software stack needs to be created in advance. In this embodiment, the software stack and the corresponding virtual BIOS segment may be preferentially stored in the same storage area. It can be understood that the so-called virtual BIOS segment in this embodiment is essentially a program segment in a complete virtual BIOS. Among them, the virtual BIOS segment corresponding to a certain type of software stack can just provide matching input and output functions for this type of software stack.

步骤S13:对上述N个虚拟BIOS片段进行整合,得到与目标虚拟机对应的虚拟BIOS。Step S13: Integrate the above N virtual BIOS segments to obtain a virtual BIOS corresponding to the target virtual machine.

例如,假设上述N个虚拟BIOS片段分别为与支持用户验证的软件堆栈对应的虚拟BIOS片段、与支持光驱驱动的软件堆栈对应的虚拟BIOS片段以及与支持ACPI(即AdvancedConfiguration and Power Management Interface,高级配置和电源管理接口)的软件堆栈对应的虚拟BIOS片段,则对上述三个虚拟BIOS片段整合,得到一个完整的虚拟BIOS,后续便可利用这个完整的虚拟BIOS创建相应的虚拟机。For example, it is assumed that the above N virtual BIOS segments are respectively a virtual BIOS segment corresponding to a software stack supporting user authentication, a virtual BIOS segment corresponding to a software stack supporting an optical drive driver, and a virtual BIOS segment corresponding to a software stack supporting ACPI (ie, Advanced Configuration and Power Management Interface, Advanced Configuration and Power Management Interface). The virtual BIOS segment corresponding to the software stack of the power management interface), the above three virtual BIOS segments are integrated to obtain a complete virtual BIOS, which can be used to create a corresponding virtual machine subsequently.

步骤S14:利用上述N类软件堆栈和上述虚拟BIOS进行虚拟机创建操作,得到目标虚拟机。Step S14: Use the above-mentioned N-type software stack and the above-mentioned virtual BIOS to perform a virtual machine creation operation to obtain a target virtual machine.

可见,本发明实施例在创建虚拟机之前,先确定该待创建的虚拟机中需要包含的各类软件堆栈,然后调取预先创建的与上述各类软件堆栈对应的多个虚拟BIOS片段,进而对上述调取出来的多个虚拟BIOS片段进行整合,得到一个完整的虚拟BIOS,接着利用这个完整的虚拟BIOS和上述各类软件堆栈,生成相应的虚拟机。也即,本发明实施例在创建虚拟机之前,先创建了与该虚拟机中所需的软件堆栈对应的虚拟BIOS,从而使得该虚拟BIOS恰好能够满足虚拟机中的软件堆栈对输入输出功能的需求,避免了虚拟机中出现输入输出功能浪费的情况。It can be seen that, before creating a virtual machine in this embodiment of the present invention, various types of software stacks that need to be included in the virtual machine to be created are determined, and then a plurality of pre-created virtual BIOS segments corresponding to the various types of software stacks are called, and then The multiple virtual BIOS segments retrieved above are integrated to obtain a complete virtual BIOS, and then a corresponding virtual machine is generated by using the complete virtual BIOS and the above-mentioned various software stacks. That is, in this embodiment of the present invention, before creating a virtual machine, a virtual BIOS corresponding to the software stack required in the virtual machine is created, so that the virtual BIOS can just satisfy the input and output functions of the software stack in the virtual machine. requirements, avoiding the waste of input and output functions in the virtual machine.

本发明实施例公开了一种具体的虚拟机创建方法,相对于上一实施例,本实施例对技术方案作了进一步的说明和优化。具体的:The embodiment of the present invention discloses a specific method for creating a virtual machine. Compared with the previous embodiment, this embodiment further describes and optimizes the technical solution. specific:

上一实施例步骤S11中,需要在创建目标虚拟机之前,预先确定目标虚拟机中需要包含的N类软件堆栈。本实施例中,在预先确定目标虚拟机中需要包含的N类软件堆栈的过程之前,还包括:根据不同的软件功能类型,对已知的所有软件堆栈进行分类,得到M类软件堆栈,M为不小于N的整数;其中,每类软件堆栈中包括至少一个软件堆栈。也即,本发明实施例可以预先基于软件的功能类型,对软件堆栈进行分类。In step S11 of the previous embodiment, it is necessary to pre-determine the N types of software stacks that need to be included in the target virtual machine before the target virtual machine is created. In this embodiment, before the process of predetermining the N-type software stacks that need to be included in the target virtual machine, the method further includes: classifying all known software stacks according to different software function types to obtain M-type software stacks. is an integer not less than N; wherein, each type of software stack includes at least one software stack. That is, in this embodiment of the present invention, software stacks may be classified in advance based on the function types of the software.

另外,在上一实施例步骤S12中,在分别调取预先创建的与上述N类软件堆栈一一对应的N个虚拟BIOS片段的过程之前,还包括:创建与上述M类软件堆栈中的每类软件堆栈相对应的虚拟BIOS片段,相应地得到M个虚拟BIOS片段。也即,本发明预先开发出与软件堆栈对应的虚拟BIOS片段,后续需要创建一个完整的虚拟BIOS时,直接调取相应的虚拟BIOS片段,然后对调取出来的虚拟BIOS片段进行整合便可。In addition, in step S12 of the previous embodiment, before the process of respectively retrieving the pre-created N virtual BIOS segments corresponding to the above-mentioned N-type software stacks one-to-one, the method further includes: creating each of the above-mentioned M-type software stacks The virtual BIOS segments corresponding to the class software stack are correspondingly obtained M virtual BIOS segments. That is, the present invention develops a virtual BIOS segment corresponding to the software stack in advance. When a complete virtual BIOS needs to be created later, the corresponding virtual BIOS segment can be directly retrieved, and then the retrieved virtual BIOS segment can be integrated.

进一步的,本发明实施例在得到上述M个虚拟BIOS片段之后,还可以将上述M个虚拟BIOS片段分别一对一地保存至M个操作系统中。可以理解的是,上述M个操作系统的系统类型优先为虚拟的操作系统。Further, in this embodiment of the present invention, after the above-mentioned M virtual BIOS fragments are obtained, the above-mentioned M virtual BIOS fragments can also be saved in the M operating systems in a one-to-one manner, respectively. It can be understood that, the system type of the above M operating systems is preferably a virtual operating system.

相应的,上一实施例步骤S12中,根据上述N类软件堆栈,分别调取预先创建的与上述N类软件堆栈一一对应的N个虚拟BIOS片段的过程,具体包括:从与上述N类软件堆栈对应的N个操作系统中调取相对应的N个虚拟BIOS片段。可以理解的是,上述M个操作系统包括上述N个操作系统。Correspondingly, in step S12 of the previous embodiment, according to the above-mentioned N-type software stack, the process of retrieving the pre-created N virtual BIOS fragments corresponding to the above-mentioned N-type software stack one-to-one, specifically includes: from the above-mentioned N-type software stack. The corresponding N virtual BIOS segments are called from the N operating systems corresponding to the software stack. It can be understood that the above-mentioned M operating systems include the above-mentioned N operating systems.

另外,本发明实施例还公开了一种虚拟机创建系统,参见图2所示,该系统包括:In addition, an embodiment of the present invention also discloses a system for creating a virtual machine, as shown in FIG. 2 , the system includes:

信息确定模块21,用于在创建目标虚拟机之前,预先确定目标虚拟机中需要包含的N类软件堆栈,N为正整数;The information determination module 21 is used to predetermine N types of software stacks that need to be included in the target virtual machine before creating the target virtual machine, where N is a positive integer;

信息获取模块22,用于获取上述N类软件堆栈,并根据上述N类软件堆栈,分别调取预先创建的与上述N类软件堆栈一一对应的N个虚拟BIOS片段;The information obtaining module 22 is used to obtain the above-mentioned N-type software stack, and according to the above-mentioned N-type software stack, respectively call pre-created N virtual BIOS fragments corresponding to the above-mentioned N-type software stack;

虚拟BIOS整合模块23,用于对上述N个虚拟BIOS片段进行整合,得到与目标虚拟机对应的虚拟BIOS;The virtual BIOS integration module 23 is used for integrating the above N virtual BIOS segments to obtain a virtual BIOS corresponding to the target virtual machine;

虚拟机创建模块24,用于利用上述N类软件堆栈和上述虚拟BIOS进行虚拟机创建操作,得到目标虚拟机。The virtual machine creation module 24 is configured to use the above-mentioned N-type software stack and the above-mentioned virtual BIOS to perform a virtual machine creation operation to obtain a target virtual machine.

可见,本发明实施例在创建虚拟机之前,先确定该待创建的虚拟机中需要包含的各类软件堆栈,然后调取预先创建的与上述各类软件堆栈对应的多个虚拟BIOS片段,进而对上述调取出来的多个虚拟BIOS片段进行整合,得到一个完整的虚拟BIOS,接着利用这个完整的虚拟BIOS和上述各类软件堆栈,生成相应的虚拟机。也即,本发明实施例在创建虚拟机之前,先创建了与该虚拟机中所需的软件堆栈对应的虚拟BIOS,从而使得该虚拟BIOS恰好能够满足虚拟机中的软件堆栈对输入输出功能的需求,避免了虚拟机中出现输入输出功能浪费的情况。It can be seen that, before creating a virtual machine in this embodiment of the present invention, various types of software stacks that need to be included in the virtual machine to be created are determined, and then a plurality of pre-created virtual BIOS segments corresponding to the various types of software stacks are called, and then The multiple virtual BIOS segments retrieved above are integrated to obtain a complete virtual BIOS, and then a corresponding virtual machine is generated by using the complete virtual BIOS and the above-mentioned various software stacks. That is, in this embodiment of the present invention, before creating a virtual machine, a virtual BIOS corresponding to the software stack required in the virtual machine is created, so that the virtual BIOS can just satisfy the input and output functions of the software stack in the virtual machine. requirements, avoiding the waste of input and output functions in the virtual machine.

进一步的,本实施例中的虚拟机创建系统,还包括:Further, the virtual machine creation system in this embodiment further includes:

信息分类模块,用于在上述信息确定模块确定上述N类软件堆栈之前,根据不同的软件功能类型,对已知的所有软件堆栈进行分类,得到M类软件堆栈,M为不小于N的整数;其中,每类软件堆栈中包括至少一个软件堆栈。The information classification module is used for classifying all known software stacks according to different software function types before the information determination module determines the above-mentioned N-type software stacks, and obtains M-type software stacks, where M is an integer not less than N; Wherein, each type of software stack includes at least one software stack.

另外,本发明实施例中的虚拟机创建系统,还包括:In addition, the virtual machine creation system in the embodiment of the present invention further includes:

虚拟BIOS片段创建模块,用于在上述信息获取模块调取上述N个虚拟BIOS片段之前,创建与上述M类软件堆栈中的每类软件堆栈相对应的虚拟BIOS片段,相应地得到M个虚拟BIOS片段。A virtual BIOS segment creation module, configured to create a virtual BIOS segment corresponding to each type of software stack in the above-mentioned M types of software stacks before the above-mentioned information acquisition module calls the above-mentioned N virtual BIOS segments, and correspondingly obtain M virtual BIOS segments Fragment.

本实施例中的虚拟机创建系统,还包括:The virtual machine creation system in this embodiment further includes:

虚拟BIOS片段创建模块,用于在上述虚拟BIOS片段创建模块得到上述M个虚拟BIOS片段之后,将上述M个虚拟BIOS片段分别一对一地保存至M个操作系统中。The virtual BIOS segment creation module is configured to save the M virtual BIOS segments into the M operating systems on a one-to-one basis after the virtual BIOS segment creation module obtains the M virtual BIOS segments.

具体的,上述信息获取模块包括软件堆栈获取单元和虚拟BIOS片段获取单元;其中,Specifically, the above information acquisition module includes a software stack acquisition unit and a virtual BIOS fragment acquisition unit; wherein,

软件堆栈获取单元,用于获取上述N类软件堆栈;a software stack obtaining unit, used to obtain the above-mentioned N-type software stack;

虚拟BIOS片段获取单元,用于从与上述N类软件堆栈对应的N个操作系统中调取相对应的N个虚拟BIOS片段。The virtual BIOS fragment obtaining unit is used for fetching corresponding N virtual BIOS fragments from the N operating systems corresponding to the above-mentioned N types of software stacks.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or that there is any such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

以上对本发明所提供的一种虚拟机创建方法及系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A method and system for creating a virtual machine provided by the present invention have been introduced in detail above. The principles and implementations of the present invention are described with specific examples in this paper. The descriptions of the above embodiments are only used to help understand the present invention. method and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. Invention limitations.

Claims (10)

1.一种虚拟机创建方法,其特征在于,包括:1. a method for creating a virtual machine, comprising: 在创建目标虚拟机之前,预先确定所述目标虚拟机中需要包含的N类软件堆栈,N为正整数;Before creating a target virtual machine, pre-determine N types of software stacks that need to be included in the target virtual machine, where N is a positive integer; 获取所述N类软件堆栈,并根据所述N类软件堆栈,分别调取预先创建的与所述N类软件堆栈一一对应的N个虚拟BIOS片段;其中,所述虚拟BIOS片段为虚拟BIOS的程序片段;Acquiring the N-type software stack, and respectively fetching pre-created N virtual BIOS segments corresponding to the N-type software stack according to the N-type software stack; wherein, the virtual BIOS segment is a virtual BIOS program fragment; 对所述N个虚拟BIOS片段进行整合,得到与所述目标虚拟机对应的虚拟BIOS;Integrating the N virtual BIOS segments to obtain a virtual BIOS corresponding to the target virtual machine; 利用所述N类软件堆栈和所述虚拟BIOS进行虚拟机创建操作,得到所述目标虚拟机。A virtual machine creation operation is performed by using the N-type software stack and the virtual BIOS to obtain the target virtual machine. 2.根据权利要求1所述的虚拟机创建方法,其特征在于,在所述预先确定所述目标虚拟机中需要包含的N类软件堆栈的过程之前,还包括:2. The method for creating a virtual machine according to claim 1, wherein before the process of predetermining the N-type software stack that needs to be included in the target virtual machine, the method further comprises: 根据不同的软件功能类型,对已知的所有软件堆栈进行分类,得到M类软件堆栈,M为不小于N的整数;其中,每类软件堆栈中包括至少一个软件堆栈。According to different software function types, all known software stacks are classified to obtain M types of software stacks, where M is an integer not less than N; wherein, each type of software stack includes at least one software stack. 3.根据权利要求2所述的虚拟机创建方法,其特征在于,在所述分别调取预先创建的与所述N类软件堆栈一一对应的N个虚拟BIOS片段的过程之前,还包括:3. The method for creating a virtual machine according to claim 2, wherein, before the process of respectively calling the pre-created N virtual BIOS fragments corresponding to the N-type software stacks one-to-one, the method further comprises: 创建与所述M类软件堆栈中的每类软件堆栈相对应的虚拟BIOS片段,相应地得到M个虚拟BIOS片段。A virtual BIOS segment corresponding to each type of software stack in the M types of software stacks is created, and M virtual BIOS segments are obtained accordingly. 4.根据权利要求3所述的虚拟机创建方法,其特征在于,在所述相应地得到M个虚拟BIOS片段之后,还包括:4. The method for creating a virtual machine according to claim 3, wherein after the correspondingly obtaining M virtual BIOS fragments, the method further comprises: 将所述M个虚拟BIOS片段分别一对一地保存至M个操作系统中。The M virtual BIOS segments are stored in the M operating systems on a one-to-one basis, respectively. 5.根据权利要求4所述的虚拟机创建方法,其特征在于,所述根据所述N类软件堆栈,分别调取预先创建的与所述N类软件堆栈一一对应的N个虚拟BIOS片段的过程,包括:5 . The method for creating a virtual machine according to claim 4 , wherein according to the N-type software stack, N virtual BIOS segments that are pre-created and corresponding to the N-type software stack are respectively called. 5 . process, including: 从与所述N类软件堆栈对应的N个操作系统中调取相对应的N个虚拟BIOS片段。The corresponding N virtual BIOS segments are called from the N operating systems corresponding to the N types of software stacks. 6.一种虚拟机创建系统,其特征在于,包括:6. A system for creating a virtual machine, comprising: 信息确定模块,用于在创建目标虚拟机之前,预先确定所述目标虚拟机中需要包含的N类软件堆栈,N为正整数;an information determination module, configured to predetermine N types of software stacks that need to be included in the target virtual machine before creating the target virtual machine, where N is a positive integer; 信息获取模块,用于获取所述N类软件堆栈,并根据所述N类软件堆栈,分别调取预先创建的与所述N类软件堆栈一一对应的N个虚拟BIOS片段;其中,所述虚拟BIOS片段为虚拟BIOS的程序片段;an information acquisition module, configured to acquire the N-type software stack, and respectively call the pre-created N virtual BIOS segments corresponding to the N-type software stack according to the N-type software stack; wherein, the The virtual BIOS segment is a program segment of the virtual BIOS; 虚拟BIOS整合模块,用于对所述N个虚拟BIOS片段进行整合,得到与所述目标虚拟机对应的虚拟BIOS;a virtual BIOS integration module, configured to integrate the N virtual BIOS segments to obtain a virtual BIOS corresponding to the target virtual machine; 虚拟机创建模块,用于利用所述N类软件堆栈和所述虚拟BIOS进行虚拟机创建操作,得到所述目标虚拟机。A virtual machine creation module, configured to perform a virtual machine creation operation by using the N-type software stack and the virtual BIOS to obtain the target virtual machine. 7.根据权利要求6所述的虚拟机创建系统,其特征在于,还包括:7. The virtual machine creation system according to claim 6, further comprising: 信息分类模块,用于在所述信息确定模块确定所述N类软件堆栈之前,根据不同的软件功能类型,对已知的所有软件堆栈进行分类,得到M类软件堆栈,M为不小于N的整数;其中,每类软件堆栈中包括至少一个软件堆栈。The information classification module is used to classify all known software stacks according to different software function types before the information determination module determines the N-type software stacks, and obtain M-type software stacks, where M is not less than N Integer; where each type of software stack includes at least one software stack. 8.根据权利要求7所述的虚拟机创建系统,其特征在于,还包括:8. The virtual machine creation system according to claim 7, further comprising: 虚拟BIOS片段创建模块,用于在所述信息获取模块调取所述N个虚拟BIOS片段之前,创建与所述M类软件堆栈中的每类软件堆栈相对应的虚拟BIOS片段,相应地得到M个虚拟BIOS片段。A virtual BIOS segment creation module, configured to create a virtual BIOS segment corresponding to each type of software stack in the M types of software stacks before the information acquisition module calls the N virtual BIOS segments, and obtain M correspondingly A virtual BIOS segment. 9.根据权利要求8所述的虚拟机创建系统,其特征在于,还包括:9. The virtual machine creation system according to claim 8, further comprising: 虚拟BIOS片段创建模块,用于在所述虚拟BIOS片段创建模块得到所述M个虚拟BIOS片段之后,将所述M个虚拟BIOS片段分别一对一地保存至M个操作系统中。The virtual BIOS segment creation module is configured to save the M virtual BIOS segments into the M operating systems on a one-to-one basis after the virtual BIOS segment creation module obtains the M virtual BIOS segments. 10.根据权利要求9所述的虚拟机创建系统,其特征在于,所述信息获取模块包括:10. The virtual machine creation system according to claim 9, wherein the information acquisition module comprises: 软件堆栈获取单元,用于获取所述N类软件堆栈;a software stack acquisition unit for acquiring the N-type software stack; 虚拟BIOS片段获取单元,用于从与所述N类软件堆栈对应的N个操作系统中调取相对应的N个虚拟BIOS片段。A virtual BIOS fragment obtaining unit, configured to retrieve N corresponding virtual BIOS fragments from N operating systems corresponding to the N types of software stacks.
CN201610638519.1A 2016-08-05 2016-08-05 Virtual machine creating method and system Active CN106293877B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610638519.1A CN106293877B (en) 2016-08-05 2016-08-05 Virtual machine creating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610638519.1A CN106293877B (en) 2016-08-05 2016-08-05 Virtual machine creating method and system

Publications (2)

Publication Number Publication Date
CN106293877A CN106293877A (en) 2017-01-04
CN106293877B true CN106293877B (en) 2020-03-03

Family

ID=57665638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610638519.1A Active CN106293877B (en) 2016-08-05 2016-08-05 Virtual machine creating method and system

Country Status (1)

Country Link
CN (1) CN106293877B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0543610A3 (en) * 1991-11-18 1993-09-22 International Business Machines Corporation Data processing system
CN101313277A (en) * 2005-11-17 2008-11-26 国际商业机器公司 Method and system for carrying multiple suspended runtime images
CN101819538A (en) * 2009-01-30 2010-09-01 惠普开发有限公司 The requests of operating systems in virtual machine is carried out in management
CN103493012A (en) * 2011-04-21 2014-01-01 惠普发展公司,有限责任合伙企业 Virtual bios

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0543610A3 (en) * 1991-11-18 1993-09-22 International Business Machines Corporation Data processing system
CN101313277A (en) * 2005-11-17 2008-11-26 国际商业机器公司 Method and system for carrying multiple suspended runtime images
CN101819538A (en) * 2009-01-30 2010-09-01 惠普开发有限公司 The requests of operating systems in virtual machine is carried out in management
CN103493012A (en) * 2011-04-21 2014-01-01 惠普发展公司,有限责任合伙企业 Virtual bios

Also Published As

Publication number Publication date
CN106293877A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN103412769B (en) External card parameter configuration, equipment and system
CN108427649B (en) Access management method, terminal device, system and storage medium of USB interface
US12164742B2 (en) Device state identification method and apparatus, and intelligent terminal
CN106873970B (en) Installation method and device of operating system
CN106250180B (en) A kind of ODEX optimization control method and mobile terminal
WO2019041771A1 (en) List segmentation method and apparatus, storage medium, and terminal
CN110147350A (en) File search method, device, electronic equipment and storage medium
CN107317928A (en) Information processing method, mobile terminal and computer-readable recording medium
CN107590248B (en) Search method, search device, search terminal and computer-readable storage medium
CN106127045A (en) File fingerprint identifies and introduction method and system automatically
CN106802821A (en) Recognition application installs the method and device in source
CN108733536B (en) Monitoring management system and method
CN111352791A (en) System application detection method and device, terminal equipment and storage medium
CN106250181A (en) The performance optimization method of a kind of (SuSE) Linux OS and framework
US20140365758A1 (en) Techniques for booting an information processing system
CN107272989B (en) Using starting method, apparatus and terminal device
WO2019136813A1 (en) Api file management method, server, and storage medium
CN106293877B (en) Virtual machine creating method and system
CN110134546B (en) Batch restarting windows system method, electronic device and storage medium
WO2019062020A1 (en) Asynchronous task unified processing method and apparatus, and storage medium
WO2024103583A1 (en) Method and apparatus for changed bios options to take effect, nonvolatile readable storage medium, and electronic apparatus
CN117251361A (en) Method, device, equipment and storage medium for testing system stability
CN108595292A (en) System optimization method, mobile terminal and computer storage medium
US11050643B2 (en) Method for managing software service, and server
CN110321132B (en) Code release method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200109

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 100085 Beijing, Haidian District on the road to information on the ground floor, building 2-1, No. 1, C

Applicant before: INSPUR (BEIJING) ELECTRONIC INFORMATION INDUSTRY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China