CN113791874A - Configuration method and device for virtual machine boot, computer equipment and storage medium - Google Patents

Configuration method and device for virtual machine boot, computer equipment and storage medium Download PDF

Info

Publication number
CN113791874A
CN113791874A CN202111353338.1A CN202111353338A CN113791874A CN 113791874 A CN113791874 A CN 113791874A CN 202111353338 A CN202111353338 A CN 202111353338A CN 113791874 A CN113791874 A CN 113791874A
Authority
CN
China
Prior art keywords
configuration
virtual machine
boot
guide
item
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
Application number
CN202111353338.1A
Other languages
Chinese (zh)
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 Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur 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 Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111353338.1A priority Critical patent/CN113791874A/en
Publication of CN113791874A publication Critical patent/CN113791874A/en
Priority to PCT/CN2022/089356 priority patent/WO2023087622A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Abstract

The application relates to a configuration method and device for virtual machine boot, computer equipment and a storage medium. The method comprises the following steps: acquiring a default configuration of virtual machine boot, wherein the default configuration comprises at least one boot item; traversing the default configuration, and selecting a boot item matched with the virtual machine to be booted so as to initialize the boot device of the virtual machine to be booted; updating the selection sequence of the guide items in the default configuration according to the guide items matched with the virtual machine to be guided, and acquiring and storing guide configuration; booting the virtual machine to be booted through the boot configuration. The method can provide default configuration for the virtual machine to conduct guidance, select matched guidance items according to the requirements of the virtual machine to be guided, and update the guidance items into guidance configuration, so that the guidance equipment is initialized, the guidance requirements of the virtual machine are met, and the reasonable configuration of various guidance items and the guidance equipment of the virtual machine is realized.

Description

Configuration method and device for virtual machine boot, computer equipment and storage medium
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a configuration method and apparatus for virtual machine boot, a computer device, and a storage medium.
Background
With the development of cloud computing technology, information technology and related industries accelerate the process of deploying services to the cloud.
At present, a cloud deployment form mainly includes a server virtualization platform, and an operating environment of enterprise cloud computing includes a virtual machine, however, in a boot process of the virtual machine, for example, installation or startup of an operating system of the virtual machine needs to be configured by a boot device, and in a large-scale and complicated application scenario, installation, restart, and recovery of the virtual machine are cumbersome, which is not beneficial to operation and maintenance of the virtual machine.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method and an apparatus for configuring virtual machine boot, a computer device, and a storage medium, which can solve the technical problem of inconvenience in virtual machine boot.
In one aspect, a method for booting a virtual machine is provided, where the method for booting a virtual machine includes:
acquiring a default configuration of virtual machine boot, wherein the default configuration comprises at least one boot item;
traversing the default configuration, and selecting a boot item matched with the virtual machine to be booted so as to initialize the boot device of the virtual machine to be booted;
updating the selection sequence of the guide items in the default configuration according to the guide items matched with the virtual machine to be guided, and acquiring and storing guide configuration;
booting the virtual machine to be booted through the boot configuration.
In one embodiment, the step of booting the virtual machine to be booted through the boot configuration further includes:
when the boot device of the virtual machine to be booted is changed, judging whether the boot device with the same type as the boot device before the change exists;
if yes, selecting the guide equipment with the same type from the available equipment list of the guide item;
and if not, traversing the rest guide items in the guide configuration, selecting the guide item matched with the virtual machine to be guided, and updating and storing the guide configuration.
In one embodiment, the method further comprises the following steps:
when editing the booted virtual machine, modifying the booted item of the virtual machine, wherein the modification process comprises one of the following steps:
changing a current boot item, traversing the boot configuration, and selecting a boot item matched with the booted virtual machine so as to initialize a boot device of the booted virtual machine;
deleting the current guide item, traversing the rest guide items in the guide configuration, selecting the guide item matched with the guided virtual machine, and updating and saving the guide configuration.
In one embodiment, modifying the boot entry of the booted virtual machine further comprises:
when the sequence numbers of the guide items in the guide configuration are discontinuous or repeated, the sequence numbers of the guide items in the guide configuration are arranged according to a lifting sequence.
In one embodiment, the step of saving the boot configuration comprises:
and storing the boot configuration when the virtual machine is shut down or started up.
In one embodiment, the step of saving the boot configuration comprises:
performing backup storage on the guide configuration;
when the virtual machine needs to be restored, the boot configuration stored in a backup mode is obtained;
traversing the guide items of the guide configuration and the corresponding guide equipment, and judging whether the guide equipment is available;
if yes, reserving an available guide item in the guide configuration;
if not, deleting unavailable guide items in the guide configuration;
updating the boot configuration.
In one embodiment, the guiding configuration further comprises at least one of:
the serial number of the guide item, the guide equipment corresponding to the guide item and the identification of the guide equipment.
In another aspect, a virtual machine boot configuration apparatus is provided, and includes:
the configuration module is used for acquiring default configuration of virtual machine guidance, wherein the default configuration comprises at least one guidance item, traversing the default configuration, selecting the guidance item matched with the virtual machine to be guided so as to initialize the guidance equipment of the virtual machine to be guided, updating the selection sequence of the guidance item in the default configuration according to the guidance item matched with the virtual machine to be guided, and acquiring and storing the guidance configuration;
and the guide module guides the virtual machine to be guided through the guide configuration.
In another aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
acquiring a default configuration of virtual machine boot, wherein the default configuration comprises at least one boot item;
traversing the default configuration, and selecting a boot item matched with the virtual machine to be booted so as to initialize the boot device of the virtual machine to be booted;
updating the selection sequence of the guide items in the default configuration according to the guide items matched with the virtual machine to be guided, and acquiring and storing guide configuration;
booting the virtual machine to be booted through the boot configuration.
In yet another aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a default configuration of virtual machine boot, wherein the default configuration comprises at least one boot item;
traversing the default configuration, and selecting a boot item matched with the virtual machine to be booted so as to initialize the boot device of the virtual machine to be booted;
updating the selection sequence of the guide items in the default configuration according to the guide items matched with the virtual machine to be guided, and acquiring and storing guide configuration;
booting the virtual machine to be booted through the boot configuration.
The configuration method, the configuration device, the computer equipment and the storage medium for guiding the virtual machine can provide default configuration for the virtual machine to guide, select the matched guiding item according to the requirement of the virtual machine to be guided, update the guiding item into guiding configuration so as to initialize the guiding equipment, meet the guiding requirement of the virtual machine and realize reasonable configuration of various guiding items and guiding equipment of the virtual machine.
Drawings
FIG. 1 is a diagram of an application environment for a configuration method for virtual machine boot in one embodiment;
FIG. 2 is a flowchart illustrating a configuration method for virtual machine boot in one embodiment;
FIG. 3 is a flowchart illustrating a configuration method for virtual machine boot in another embodiment;
FIG. 4 is a flowchart illustrating a configuration method for virtual machine boot in yet another embodiment;
FIG. 5 is a block diagram of an apparatus for configuration of virtual machine boot in one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The configuration method of the virtual machine boot provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The server 104 may be configured as a virtualized platform/virtual machine, and the terminal 102 may be configured as a boot device, and the server 104 may be booted by the terminal 102, for example, when the server 104 generates a virtual machine, the server 104 may be booted by the boot device of the terminal 102, so that the server 104 installs an operating system or enters an already installed operating system. For another example, when the boot entry of the virtual machine is an optical disc, the boot device to be configured is an optical disc drive, when the boot entry of the virtual machine is a Universal Serial Bus (USB) interface, the boot device to be configured is a USB drive, when the boot entry of the virtual machine is a pre-boot eXecution Environment (PXE) resource, the boot device to be configured is a network card, and the server 104 may be implemented by an independent server or a server cluster including a plurality of servers.
In an embodiment, as shown in fig. 2, a configuration method for virtual machine boot is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
s1: acquiring a default configuration of virtual machine boot, wherein the default configuration comprises at least one boot item;
s2: traversing the default configuration, and selecting a boot item matched with the virtual machine to be booted so as to initialize the boot device of the virtual machine to be booted;
s3: updating the selection sequence of the guide items in the default configuration according to the guide items matched with the virtual machine to be guided, and acquiring and storing guide configuration;
s4: booting the virtual machine to be booted through the boot configuration.
In a cloud computing service, a created or updated virtual machine needs to be booted to enable the virtual machine to install an operating system or run the operating system, in some application scenarios, different boot items need to be booted and started automatically, different boot items often need corresponding boot devices, as the number of virtual machines increases, the operation and maintenance pressure of the virtual machine for booting also increases, a default configuration can be provided for the virtual machine for booting, and according to the requirement of the virtual machine to be booted, a matched boot item is selected and updated to a boot configuration, so that the boot device is initialized, the boot requirements of the virtual machine are met, reasonable configurations of various boot items and boot devices of the virtual machine are realized, the boot configuration can be stored, and when the virtual machine fails or is lost, a boot policy can be provided for the virtual machine to be booted from the stored boot configuration, the method is suitable for scenes of mass production of the virtual machines in the industries such as education, scientific research and the like, can be used for configuring guide equipment in batches, greatly reduces the operation and maintenance cost of management and maintenance personnel, and can effectively reduce the operation and maintenance cost and pressure when the method is applied to large-scale or super-large-scale virtual machine groups.
In step S1, it is exemplarily illustrated that a default configuration of the virtual machine boot is obtained, where the boot items in the default configuration include but are not limited to optical discs, universal serial bus interfaces, USB drivers, and pre-boot execution environment resources, a certain number of boot items may be selected in the default configuration, for example, 3 to 5 boot items are not equal, and a maximum value and a minimum value of the number of boot items may also be selected in the default configuration, so as to provide multiple possibilities for booting the virtual machine, and also to be able to adapt to multiple scenarios during the virtual machine boot.
In step S2, it is exemplarily illustrated that, the default configuration is traversed, a boot entry matching the virtual machine to be booted is selected, so as to initialize the boot device of the virtual machine to be booted, for example, a priority order of the boot entries may be set in the default configuration and arranged according to a sequence number, the boot entry matching the virtual machine to be booted is selected by traversing the boot entry in the default configuration, and an available boot device is selected from the device list, so as to initialize the boot device, where the available boot device is a boot device that is marked to be accessible as a boot device or a virtual machine, so as to avoid the boot device in the device list from being in an occupied state and avoid a failure during booting the virtual machine.
In step S3, it is exemplarily illustrated that the boot entry matching the virtual machine to be booted may serve as a boot path of the current virtual machine to be booted, update the selection order of the boot entry in the default configuration, and pre-set the priority sequence number of the matching boot entry as the boot entry of the virtual machine to be booted, complete the update of the default configuration, acquire the boot configuration, and save the boot configuration.
In step S4, it is exemplarily illustrated that the virtual machine may be booted according to the boot configuration, so that the boot configuration boots the virtual machine to install or enter the operating system.
When a new virtual machine is generated in the application environment, the boot device that self-defines and selects each boot entry may be adapted through the default configuration, and may also select a matching boot entry by traversing the boot entries in the default configuration, as shown in fig. 3, the step S4 of booting the virtual machine to be booted through the boot configuration further includes:
s41: when the boot device of the virtual machine to be booted is changed, judging whether the boot device with the same type as the boot device before the change exists;
s42: if yes, selecting the guide equipment with the same type from the available equipment list of the guide item;
s43: and if not, traversing the rest guide items in the guide configuration, selecting the guide item matched with the virtual machine to be guided, and updating and storing the guide configuration.
In step S41, it is exemplarily illustrated that a boot device may be selected from the available device list of each boot item, when the boot device is changed, the boot device of the changed boot item is a designated boot device, marked as an available boot device, and it is determined whether there is another boot device of the same type as the changed boot device after the boot device is changed.
In step S42, it is exemplarily illustrated that the boot devices of the same type are selected from the available device list of the boot entry, for example, the available device list of each boot entry is an unmarked available device if the virtual machine allows the boot device types of each boot entry to be the same, and for example, the available device list of each boot entry is selected by traversing other boot entries if the virtual machine does not allow the boot device types of each boot entry to be the same.
When the boot device of the virtual machine is changed, the selected boot devices in the boot items may also be changed synchronously, and in step S43, for example, when the boot device is deleted, the boot item in which the deleted boot device is located is automatically selected as another boot item in the boot configuration, and when the boot device corresponding to the automatically selected current boot item is unavailable, the current boot item is deleted until the matched boot item is selected, and the selected matched boot item is saved in the boot configuration.
In some embodiments, the method further includes editing the existing virtual machine, and implementing operation and maintenance of the virtual machine, so that the current application scenario is adapted. Modifying a boot entry for a booted virtual machine when editing the booted virtual machine. For example, changing a current boot entry, traversing the boot configuration, and selecting a boot entry matching the booted virtual machine to initialize a boot device of the booted virtual machine; for another example, the current boot item is deleted, the rest boot items in the boot configuration are traversed, the boot item matched with the booted virtual machine is selected, wherein the rest boot items include the boot items except the current boot item in the boot configuration, meanwhile, the boot item information of the current boot item is also deleted, the boot device corresponding to the current boot item is deleted, the boot item matched with the booted virtual machine replaces the deleted current boot item, and the boot configuration is updated and saved.
In order to facilitate the priority ordering of each boot entry in the boot configuration, and to exclude exceptions and faults during the boot process of the boot entry, so as to facilitate the virtual machine to boot according to the boot configuration, in some embodiments, modifying the boot entry of the booted virtual machine further includes:
when the sequence numbers of the guide items in the guide configuration are discontinuous or repeated, the sequence numbers of the guide items in the guide configuration are arranged according to a lifting sequence, for example, the sequence numbers of the guide items in the guide configuration are arranged by adopting the lifting sequence, the efficiency and the correctness when the guide items are traversed are improved, the sequence number of the guide item with higher priority is selected, and for example, the sequence numbers of the guide items in the guide configuration are arranged by adopting the lowering sequence, so that the phenomenon that the sequence numbers of the guide items are discontinuous or repeated is avoided.
In order to facilitate continuous and stable operation of the virtual machine, debugging from a default configuration is avoided when the virtual machine is booted, the actual application scene requirements of the virtual machine boot can be met by storing the boot configuration, and in some embodiments, the boot configuration is stored when the virtual machine is shut down or started. For example, when the system is powered off, data in the boot configuration is persisted in a physical memory in a record form of a database or a file, and for example, when the system is powered on, the persisted data is read and written into a process parameter for starting the virtual machine, the process parameter is stored in a memory, when the virtual machine is started, the process parameter is read and transmitted to a boot program of a boot item in the virtual machine, and boot information is read and enters the boot program to complete the boot.
When disaster tolerance occurs in the server cluster, the virtual machine needs to be restored, and in the process of restoring the virtual machine, installation and import of an operating system are also needed, so that a certain configuration method for guiding the virtual machine needs to be adopted, and in order to avoid data loss caused by disaster tolerance of default configuration or guiding configuration, distributed storage or multiple backup storage can be performed on guiding configuration. In some embodiments, the virtual machine may be serviced by saving the boot configuration, as shown in fig. 4, the step of saving the boot configuration further comprises:
s51: performing backup storage on the guide configuration;
s52: when the virtual machine needs to be restored, the boot configuration stored in a backup mode is obtained;
s53: traversing the guide items of the guide configuration and the corresponding guide equipment, and judging whether the guide equipment is available;
s54: if yes, reserving an available guide item in the guide configuration;
s55: if not, deleting unavailable guide items in the guide configuration;
s56: updating the boot configuration.
In step S51, it is exemplarily explained that the boot configuration is saved in a distributed manner to avoid a concurrent disaster tolerance, and for example, the boot configuration is saved in multiple copies, so that the virtual machine is protected in a backup manner, and all data of the boot device and the boot item are synchronously saved in the backup storage.
In step S52, an exemplary instruction that the virtual machine needs to be restored is obtained, and data is obtained from the boot configuration saved in the backup, so that the boot device and the boot entry complete booting the virtual machine.
In step S53, it is exemplarily explained that the boot configuration is traversed by the boot entry and the corresponding boot device, and whether the backup boot device exists is detected from the boot entry with sequence number 1, and whether the boot device is available is determined.
In step S54, it is exemplarily explained that when it is detected that the boot entry and the corresponding boot device are available, the available boot entry and the corresponding data information are retained.
In step S55, it is exemplarily explained that, when it is detected that the guidance item and the corresponding guidance device are not available, the unavailable guidance item and the corresponding data information are deleted until all guidance items are detected.
In step S56, the boot configuration is updated and saved, for example, information of the boot device matching the boot entry is saved in the boot configuration, and an association with the virtual machine is established.
To facilitate data updating of the default configuration as well as the boot configuration, a data structure may be provided for adapting the default configuration or the boot configuration, which in some embodiments further comprises at least one of: the serial number of the guide item, the guide equipment corresponding to the guide item and the identification of the guide equipment. For example, the data structure may take the following configuration:
configuring the Identity of the boot device as an id (Identity document);
configuring the sequence number of the leading item as: boot _ order, wherein the sequence number of the guide item is an integer starting from 1;
configuring the type of the guide equipment corresponding to the guide item as: boot _ device _ type, types including, but not limited to: magnetic disk, CD driver, USB, network card;
configuring the identity of the boot device to: boot _ device _ id, including without limitation: a magnetic disk id and an optical drive id.
In some embodiments, the boot configuration also includes other configuration information, such as a set of formats: key-value, e.g., boot firmware version: boot firmware version, for example, boot latency: boot delay.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a virtual machine boot configuration apparatus, including: a configuration module and a boot module, the configuration module in signal connection with the boot module, wherein:
the configuration module is used for acquiring default configuration of virtual machine guidance, wherein the default configuration comprises at least one guidance item, traversing the default configuration, selecting the guidance item matched with the virtual machine to be guided so as to initialize the guidance equipment of the virtual machine to be guided, updating the selection sequence of the guidance item in the default configuration according to the guidance item matched with the virtual machine to be guided, and acquiring and storing the guidance configuration;
and the guide module guides the virtual machine to be guided through the guide configuration. The method can provide default configuration for the virtual machine, select matched guide items according to the requirement of the virtual machine to be guided, and update the guide items into guide configuration, so that the guide equipment is initialized, and the guide requirement of the virtual machine is met.
In one embodiment, the step of booting the virtual machine to be booted by the boot module through the boot configuration further includes:
when the boot device of the virtual machine to be booted is changed, judging whether the boot device with the same type as the boot device before the change exists;
if yes, selecting the guide equipment with the same type from the available equipment list of the guide item;
and if not, traversing the rest guide items in the guide configuration, selecting the guide item matched with the virtual machine to be guided, and updating and storing the guide configuration.
In one embodiment, the step of operating the configuration module further comprises:
when editing the booted virtual machine, modifying the booted item of the virtual machine, wherein the modification process comprises one of the following steps:
changing a current boot item, traversing the boot configuration, and selecting a boot item matched with the booted virtual machine so as to initialize a boot device of the booted virtual machine;
deleting the current guide item, traversing the rest guide items in the guide configuration, selecting the guide item matched with the guided virtual machine, and updating and saving the guide configuration.
In one embodiment, the configuration module modifying the boot entry of the booted virtual machine further comprises:
when the sequence numbers of the guide items in the guide configuration are discontinuous or repeated, the sequence numbers of the guide items in the guide configuration are arranged according to a lifting sequence.
In one embodiment, the step of saving the boot configuration by the configuration module comprises:
and storing the boot configuration when the virtual machine is shut down or started up.
In one embodiment, the step of saving the boot configuration by the configuration module comprises:
performing backup storage on the guide configuration;
when the virtual machine needs to be restored, the boot configuration stored in a backup mode is obtained;
traversing the guide items of the guide configuration and the corresponding guide equipment, and judging whether the guide equipment is available;
if yes, reserving an available guide item in the guide configuration;
if not, deleting unavailable guide items in the guide configuration;
updating the boot configuration.
In one embodiment, the guiding configuration further comprises at least one of:
the serial number of the guide item, the guide equipment corresponding to the guide item and the identification of the guide equipment.
For specific limitations of the configuration device for virtual machine boot, reference may be made to the above limitations of the configuration method for virtual machine boot, which are not described herein again. The modules in the virtual machine guided configuration apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing configuration data of virtual machine boot. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a virtual machine booted configuration method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a default configuration of virtual machine boot, wherein the default configuration comprises at least one boot item;
traversing the default configuration, and selecting a boot item matched with the virtual machine to be booted so as to initialize the boot device of the virtual machine to be booted;
updating the selection sequence of the guide items in the default configuration according to the guide items matched with the virtual machine to be guided, and acquiring and storing guide configuration;
booting the virtual machine to be booted through the boot configuration.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a default configuration of virtual machine boot, wherein the default configuration comprises at least one boot item;
traversing the default configuration, and selecting a boot item matched with the virtual machine to be booted so as to initialize the boot device of the virtual machine to be booted;
updating the selection sequence of the guide items in the default configuration according to the guide items matched with the virtual machine to be guided, and acquiring and storing guide configuration;
booting the virtual machine to be booted through the boot configuration.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A configuration method for guiding a virtual machine is characterized by comprising the following steps:
acquiring a default configuration of virtual machine boot, wherein the default configuration comprises at least one boot item;
traversing the default configuration, and selecting a boot item matched with the virtual machine to be booted so as to initialize the boot device of the virtual machine to be booted;
updating the selection sequence of the guide items in the default configuration according to the guide items matched with the virtual machine to be guided, and acquiring and storing guide configuration;
booting the virtual machine to be booted through the boot configuration.
2. The method according to claim 1, wherein the step of booting the virtual machine to be booted by the boot configuration further comprises:
when the boot device of the virtual machine to be booted is changed, judging whether the boot device with the same type as the boot device before the change exists;
if yes, selecting the guide equipment with the same type from the available equipment list of the guide item;
and if not, traversing the rest guide items in the guide configuration, selecting the guide item matched with the virtual machine to be guided, and updating and storing the guide configuration.
3. The virtual machine boot configuration method according to claim 1, further comprising:
when editing the booted virtual machine, modifying the booted item of the virtual machine, wherein the modification process comprises one of the following steps:
changing a current boot item, traversing the boot configuration, and selecting a boot item matched with the booted virtual machine so as to initialize a boot device of the booted virtual machine;
deleting the current guide item, traversing the rest guide items in the guide configuration, selecting the guide item matched with the guided virtual machine, and updating and saving the guide configuration.
4. The configuration method for virtual machine boot according to claim 3, wherein modifying the boot entry of the booted virtual machine further comprises:
when the sequence numbers of the guide items in the guide configuration are discontinuous or repeated, the sequence numbers of the guide items in the guide configuration are arranged according to a lifting sequence.
5. The method according to any one of claims 1 to 4, wherein the step of saving the boot configuration comprises:
and storing the boot configuration when the virtual machine is shut down or started up.
6. The method according to any one of claims 1 to 4, wherein the step of saving the boot configuration further comprises:
performing backup storage on the guide configuration;
when the virtual machine needs to be restored, the boot configuration stored in a backup mode is obtained;
traversing the guide items of the guide configuration and the corresponding guide equipment, and judging whether the guide equipment is available;
if yes, reserving an available guide item in the guide configuration;
if not, deleting unavailable guide items in the guide configuration;
updating the boot configuration.
7. The configuration method for booting a virtual machine according to claim 1, wherein the boot configuration further includes at least one of:
the serial number of the guide item, the guide equipment corresponding to the guide item and the identification of the guide equipment.
8. A virtual machine-guided configuration apparatus, comprising:
the configuration module is used for acquiring default configuration of virtual machine guidance, wherein the default configuration comprises at least one guidance item, traversing the default configuration, selecting the guidance item matched with the virtual machine to be guided so as to initialize the guidance equipment of the virtual machine to be guided, updating the selection sequence of the guidance item in the default configuration according to the guidance item matched with the virtual machine to be guided, and acquiring and storing the guidance configuration;
and the guide module guides the virtual machine to be guided through the guide configuration.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the configuration method of virtual machine booting according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the virtual machine guided configuration method according to any one of claims 1 to 7.
CN202111353338.1A 2021-11-16 2021-11-16 Configuration method and device for virtual machine boot, computer equipment and storage medium Pending CN113791874A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111353338.1A CN113791874A (en) 2021-11-16 2021-11-16 Configuration method and device for virtual machine boot, computer equipment and storage medium
PCT/CN2022/089356 WO2023087622A1 (en) 2021-11-16 2022-04-26 Virtual machine boot configuration method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111353338.1A CN113791874A (en) 2021-11-16 2021-11-16 Configuration method and device for virtual machine boot, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113791874A true CN113791874A (en) 2021-12-14

Family

ID=78955309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111353338.1A Pending CN113791874A (en) 2021-11-16 2021-11-16 Configuration method and device for virtual machine boot, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113791874A (en)
WO (1) WO2023087622A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023087622A1 (en) * 2021-11-16 2023-05-25 苏州浪潮智能科技有限公司 Virtual machine boot configuration method and apparatus, computer device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6810478B1 (en) * 2000-12-12 2004-10-26 International Business Machines Corporation System for remote booting of muntliple operating systems using chained bootstrap mechanism in a network
CN104572164A (en) * 2014-03-21 2015-04-29 中电科技(北京)有限公司 UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Feiteng portable computer
CN107209671A (en) * 2015-01-21 2017-09-26 思科技术公司 The dynamic auto monitoring and control of start-up operation in computer
CN109086099A (en) * 2018-07-25 2018-12-25 浪潮(北京)电子信息产业有限公司 A kind of method, apparatus, equipment and storage medium starting virtual machine
CN110413376A (en) * 2019-07-12 2019-11-05 苏州浪潮智能科技有限公司 A kind of method, equipment and the storage medium of Virtual Machine Manager USB device
CN113517996A (en) * 2021-03-26 2021-10-19 山东英信计算机技术有限公司 Network card equipment polling method, system and related device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9280359B2 (en) * 2012-12-11 2016-03-08 Cisco Technology, Inc. System and method for selecting a least cost path for performing a network boot in a data center network environment
CN111782342A (en) * 2020-06-30 2020-10-16 联想(北京)有限公司 Virtual machine starting method and device
CN113791874A (en) * 2021-11-16 2021-12-14 苏州浪潮智能科技有限公司 Configuration method and device for virtual machine boot, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6810478B1 (en) * 2000-12-12 2004-10-26 International Business Machines Corporation System for remote booting of muntliple operating systems using chained bootstrap mechanism in a network
CN104572164A (en) * 2014-03-21 2015-04-29 中电科技(北京)有限公司 UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Feiteng portable computer
CN107209671A (en) * 2015-01-21 2017-09-26 思科技术公司 The dynamic auto monitoring and control of start-up operation in computer
CN109086099A (en) * 2018-07-25 2018-12-25 浪潮(北京)电子信息产业有限公司 A kind of method, apparatus, equipment and storage medium starting virtual machine
CN110413376A (en) * 2019-07-12 2019-11-05 苏州浪潮智能科技有限公司 A kind of method, equipment and the storage medium of Virtual Machine Manager USB device
CN113517996A (en) * 2021-03-26 2021-10-19 山东英信计算机技术有限公司 Network card equipment polling method, system and related device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
还是那条咸鱼: "彻底学会VMware虚拟机:[3]如何设置引导顺序", 《HTTPS://JINGYAN.BAIDU.COM/ARTICLE/D3B74D64AD186D1F77E609E4.HTML?TJ=FR_IK_QB&BD_PAGE_TYPE=1&ST=1&FROM=&SSID=&UID=BD_1443483089_728&PU=SZ%40224_240%2COS%40&FR=SOLVED&STEP=7&INIT=MIDDLE》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023087622A1 (en) * 2021-11-16 2023-05-25 苏州浪潮智能科技有限公司 Virtual machine boot configuration method and apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
WO2023087622A1 (en) 2023-05-25

Similar Documents

Publication Publication Date Title
CN102402446B (en) Method and device for installing application software
EP3769224B1 (en) Configurable recovery states
US10521218B2 (en) Enhanced techniques for updating software
US11314665B2 (en) Information processing system, information processing device, BIOS updating method for information processing device, and BIOS updating program for information processing device
CN113835644B (en) Complete machine migration method, device, equipment and storage medium
JP2007133544A (en) Failure information analysis method and its implementation device
CN114756290B (en) Operating system installation method, device and readable storage medium
CN111090546B (en) Method, device and equipment for restarting operating system and readable storage medium
CN108459822B (en) Installation method and device of operating system
CN112612417A (en) Data migration method, device, equipment and storage medium
CN113791874A (en) Configuration method and device for virtual machine boot, computer equipment and storage medium
US9852028B2 (en) Managing a computing system crash
CN116880877A (en) Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium
EP3769225B1 (en) Free space pass-through
US11474807B1 (en) Firmware update method and computer program product for updating firmware
CN113778485A (en) System operation method and device of electronic chip, electronic chip and storage medium
KR102423056B1 (en) Method and system for swapping booting disk
CN113467893A (en) Virtual machine automation test method and device, storage medium and processor
JP6099106B2 (en) Method, computer system, and memory device for providing at least one data carrier
CN112463240B (en) Method for restarting access to WinPE
CN112068846B (en) Application distribution method, device and medium based on dual systems
US11709683B2 (en) State semantics kexec based firmware update
US20240104044A1 (en) Method for adjusting drive letters, electronic device, and computer readable storage medium applying the method
US20240036896A1 (en) Generating installation images based upon dpu-specific capabilities
CN117609009A (en) Test method, server, management equipment and test system

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: 20211214