A cloud environment Windows system configuration method, device and system

By performing image installation and automatic service startup in the PXE environment, generating configuration files and writing them to the FAT partition, the complexity and development difficulty of Windows system configuration are solved, and stable multiple configurations and system restart optimizations are achieved.

CN116431163BActive Publication Date: 2026-06-16CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2023-03-12
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, configuring a Windows system using PXE to boot WinRE presents challenges such as high complexity of the PXE service and difficulty in development and deployment, and it is also difficult to achieve direct configuration of the Windows system within a Linux system.

Method used

After image installation in the PXE environment, the device is restarted. During the restart process, the initialization service is automatically started, various plugins are executed, configuration files are generated and written to the FAT partition, and configuration of Windows system is supported. Modular plug-in is used to achieve multiple configurations and reduce the number of system restarts.

Benefits of technology

It reduces the complexity and development difficulty of adapting the PXE environment to Windows system configuration, provides a stable Windows system configuration method, supports multiple configurations, and shares the PXE system installation and configuration environment with Linux systems, reducing external dependencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116431163B_ABST
    Figure CN116431163B_ABST
Patent Text Reader

Abstract

The application discloses a cloud environment Windows system configuration method, device and system, and relates to the technical field of IT and software development.The method comprises the following steps: performing image installation in a PXE environment, and restarting the equipment after completion; the same set of PXE system installation and configuration booting environment can be used for each Linux user system, a new PXE environment adaptation for the Windows system does not need to be added, multiple and multiple entry configurations are supported by generating a new operation ID, each configuration parameter transmitted by the PXE environment can be received in a hidden partition file mode, module plug-in is realized, other configuration item functions are easy to extend, the existing PXE system service is compatible compared with the prior art, a separate PXE service does not need to be provided for the Windows system, the configuration process supports one-time or multiple system restarts, the number of system restarts is optimized, multiple configurations are supported, and external dependence is small.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of IT and software development technology, specifically to a method, apparatus, and system for configuring a Windows system in a cloud environment. Background Technology

[0002] Cloud platforms support various operating systems, including major Linux distributions and Windows (Server) systems. While installation is largely similar, configuration differs significantly. Linux system configuration is file-based, allowing for easy modification of files using tools like chroot. However, the same Linux-based PXE environment struggles to support direct configuration of Windows systems in the same way using tools like chroot.

[0003] On the other hand, configuring a Windows system requires a Windows environment, which is an offline process with less control compared to PXE. Furthermore, the operation is more prone to failure, and context parameters are easily lost after a system restart. It also makes reconfiguration difficult, such as changing user passwords.

[0004] In summary, while configuring a Linux user system after installation can be achieved using the chroot tool in existing technologies, it's difficult to achieve the same functionality because chroot cannot completely infiltrate the Windows system environment. Using PXE to boot WinRE can achieve this goal, but it significantly increases the complexity of PXE services and the difficulty of development and deployment. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method, apparatus, and system for configuring a Windows system in a cloud environment. It solves the problems of high complexity of PXE services and difficulty in development and deployment, which exist in existing technologies that use PXE to boot WinRE to achieve the same functionality. This invention reduces the cost of adapting the PXE environment to Windows system configuration while providing a stable configuration method for Windows users to achieve the same functionality.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for configuring a Windows system in a cloud environment, comprising the following steps:

[0007] S1. Perform image installation in the PXE environment, and restart the device after installation;

[0008] S2. While restarting the device, the initialization service starts automatically and executes each plugin, then restarts the device to complete the system configuration.

[0009] Furthermore, S1 specifically includes the following steps:

[0010] S11. Collect a list of user needs;

[0011] S12. In the PXE boot environment, perform disk RAID configuration, and mount the system disk partition and system directory;

[0012] S13. Copy user image files by disk partition;

[0013] S14 and PXE environments use the context parameters in S12 to apply the configuration file template, generate the configuration file, and write it to the specified directory on the FAT partition.

[0014] S15. Restart the device.

[0015] Furthermore, the user requirement list collected in S11 includes disk RAID, account configuration, and network configuration.

[0016] Furthermore, the PXE in S12 supports reading and writing the NTFS file system under Windows, and requires a FAT partition to be configured to store Windows configuration files.

[0017] Furthermore, the user image file output format in S13 is qcow2.

[0018] Furthermore, the specific steps in S2 to execute each plugin and restart the device to complete the system configuration include:

[0019] S21. Locate and find the FAT partition;

[0020] S22. After locating the TAT partition, obtain the plugin list;

[0021] S23. Execute the plugin module and return a status code;

[0022] S24. Write to the registry based on the status code and determine whether to restart;

[0023] S25. Restart after the plugin is executed.

[0024] Furthermore, the status codes include 1001, 1002, and 1003. When the status code is 1001, it indicates exit, restart, and will not be executed again on the next system startup. When the status code is 1002, it indicates exit, restart without execution, and will be executed on the next startup. When the status code is 1003, it indicates exit, restart, and will be executed again on the next system startup.

[0025] A cloud environment Windows system configuration device includes an image installation module and an initialization module, wherein:

[0026] The image installation module is used to perform image installation in the PXE environment and restart the device after installation.

[0027] The initialization module is used to automatically start the initialization service and execute various plugins when the device is restarted, and then restart the device to complete the system configuration.

[0028] A cloud environment Windows system configuration system includes a PXE runtime module and an initialization service module, wherein:

[0029] The PXE runtime module obtains instructions and parameters through instruction scheduling, enabling the image service to download the image file, booting the TFTP service through the PXE environment, and providing an IP address to DHCP.

[0030] The initialization service module executes the plugin list and restarts to complete the system configuration.

[0031] Furthermore, the plugin list includes setting the hostname, setting the password, and configuring networking plugins.

[0032] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0033] It can use the same PXE system to install and configure the boot environment for various Linux user systems without adding a new PXE environment for Windows systems. It supports multiple and multi-entry configurations by generating new operation IDs. It can receive various configuration parameters passed by the PXE environment by hiding partition files. It is implemented in a modular plug-in manner, making it easy to extend other configuration items. Compared with existing technologies, it is compatible with existing PXE system services and does not require providing a separate PXE service for Windows systems. The configuration process supports one or more system restarts, but at the same time optimizes the number of system restarts, supports multiple configurations, and has fewer external dependencies. Attached Figure Description

[0034] Figure 1 This is a flowchart of the cloud environment Windows system configuration method of the present invention;

[0035] Figure 2 This is a flowchart of the cloud environment Windows system configuration method image installation process of the present invention;

[0036] Figure 3 This is a flowchart of the cloud environment Windows system configuration method initialization service of the present invention;

[0037] Figure 4This is a structural diagram of the cloud environment Windows system configuration device of the present invention;

[0038] Figure 5 This is a system architecture diagram of the Windows system configuration in the cloud environment of this invention. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] This invention proposes a method, device, and system for configuring a Windows system in a cloud environment. It can share a PXE boot service with the installation and configuration of a Linux system, and can help achieve the same system configuration features as the Linux system, including setting accounts, hostnames, and network card networking. It can also reduce system complexity and help reduce the number of system restarts due to configuration.

[0041] like Figure 1 As shown, a method for configuring a Windows system in a cloud environment includes the following steps:

[0042] S1. Perform image installation in the PXE environment, and restart the device after installation;

[0043] S2. While restarting the device, the initialization service starts automatically and executes each plugin, then restarts the device to complete the system configuration.

[0044] like Figure 2 As shown, S1 specifically includes the following steps:

[0045] S11. Collect a list of user needs;

[0046] S12. In the PXE boot environment, perform disk RAID configuration, and mount the system disk partition and system directory;

[0047] S13. Copy user image files by disk partition;

[0048] S14 and PXE environments use the context parameters in S12 to apply the configuration file template, generate the configuration file, and write it to the specified directory on the FAT partition.

[0049] S15. Restart the device.

[0050] Specifically, the user requirement list collected in S11 includes disk RAID, account configuration, and network configuration.

[0051] Specifically, the PXE in S12 supports reading and writing the NTFS file system under Windows, and requires a FAT partition to be configured to store Windows configuration files.

[0052] Specifically, the user image file output format in S13 is qcow2.

[0053] In this implementation plan, a user image is created, with the output format being qcow2. The image comes pre-installed with the Windows version of the configuration initialization service and is configured to start automatically on boot. Before the image is installed, a user requirement list is collected, including disk RAID, account configuration, network configuration, etc. Then, in the PXE boot environment, disk RAID configuration is performed, and system disk partitions and system directories are mounted. This requires the PXE environment to support NTFS file system read and write in the Windows environment, and a FAT partition needs to be configured to store Windows configuration files.

[0054] The user image file is copied to the disk partition. The PXE environment uses the context parameters in step 2 to apply the configuration file template, generates the configuration file, writes it to the specified directory of the FAT partition, and restarts the device.

[0055] like Figure 3 As shown, the specific steps for executing each plugin and restarting the device to complete the system configuration in S2 include:

[0056] S21. Locate and find the FAT partition;

[0057] S22. After locating the TAT partition, obtain the plugin list;

[0058] S23. Execute the plugin module and return a status code;

[0059] S24. Write to the registry based on the status code and determine whether to restart;

[0060] S25. Restart after the plugin is executed.

[0061] In this implementation plan, after entering the installed Windows system, the configuration initialization service will start automatically with the system, attempt to locate the FAT partition and read the configuration file, execute each configuration item plugin, and complete the configuration after one restart. Each time the system is configured, the PXE environment will generate a new operation ID and store the generated operation description file, which can contain multiple operations, in the hidden FAT partition used to save the configuration file.

[0062] The configuration initialization service executes various configuration operations using a plugin queue. Each plugin retrieves its context from the configuration file during execution, and there are generally no obvious dependencies between plugins. Each plugin returns a status code upon completion, the meanings of which are shown in the table below:

[0063]

[0064] The status codes include 1001, 1002, and 1003. Status code 1001 indicates exit, restart, and will not be executed again on the next system startup. Status code 1002 indicates exit, restart without execution, and execution on the next startup. Status code 1003 indicates exit, restart, and execution again on the next system startup. Each operation adds a system registry entry with the operation ID as the key, and each module / plugin name as a sub-key. The execution result returns the status code as the value of the sub-key.

[0065] In this implementation scheme, under the PXE environment, a write image operation is performed to copy the system image to the entire system disk. Using the chroot tool, the system disk's FAT partition is mounted. Using a configuration file template, parameters are filled in to generate a configuration file, which is then saved in the FAT partition. Afterward, the device restarts and enters the installed Windows system. The Agent service within the Windows system is loaded. The Agent service locates the FAT partition, reads the configuration file, and performs operations such as SetHostName, NetworkBonding, and system activation. The system completes the configuration after one or more restarts.

[0066] A cloud environment Windows system configuration device provided for embodiments of this application, such as Figure 4 As shown, it includes an image installation module and an initialization module, wherein:

[0067] The image installation module is used to perform image installation in the PXE environment and restart the device after installation.

[0068] The initialization module is used to automatically start the initialization service and execute various plugins when the device is restarted, and then restart the device to complete the system configuration.

[0069] This implementation plan includes the main process of configuring the Windows system after installation. The image creation process requires the embedding of an initialization service program, the partitioning process requires the creation of a hidden FAT partition to store configuration files, and the installation process, in addition to disk copying, requires the generation and writing of configuration files.

[0070] The technical solutions described in the embodiments of this application above have at least the following technical effects or advantages:

[0071] It can use the same PXE system to install and configure the boot environment for various Linux user systems without adding a new PXE environment for Windows systems. It supports multiple and multi-entry configurations by generating new operation IDs. It can receive various configuration parameters passed by the PXE environment by hiding partition files. It is implemented in a modular plug-in manner, making it easy to extend other configuration items. Compared with existing technologies, it is compatible with existing PXE system services and does not require providing a separate PXE service for Windows systems. The configuration process supports one or more system restarts, but at the same time optimizes the number of system restarts, supports multiple configurations, and has fewer external dependencies.

[0072] A cloud environment Windows system configuration system, such as Figure 5 As shown, it includes a PXE runtime module and an initialization service module, wherein:

[0073] The PXE runtime module obtains instructions and parameters through instruction scheduling, enabling the image service to download the image file, booting the TFTP service through the PXE environment, and providing an IP address to DHCP.

[0074] The initialization service module executes the plugin list and restarts to complete the system configuration.

[0075] Specifically, the list of plugins includes setting the hostname, setting the password, and configuring networking plugins.

[0076] In this implementation scheme, the PXE runtime module obtains instructions and parameters through instruction scheduling during runtime. The image service can download images, the host uses TFTP service to boot the PXE environment, and provides an IP address to DHCP. When the system restarts, the initialization service module starts and executes the plugin list step by step, including setting the hostname, setting the password, configuring network plugins, etc.

[0077] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0078] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0079] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0080] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0081] It should 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 any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0082] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for configuring a Windows system in a cloud environment, characterized in that, Includes the following steps: S1. Perform image installation in the PXE environment, and restart the device after installation; S2. During device restart, the initialization service starts automatically and executes all plugins, then restarts the device to complete system configuration; S1 specifically includes the following steps: S11. Collect a list of user needs; S12. In the PXE boot environment, perform disk RAID configuration, and mount the system disk partition and system directory; S13. Copy user image files by disk partition; S14 and PXE environments use the context parameters in S12 to apply the configuration file template, generate the configuration file, and write it to the specified directory on the FAT partition. S15. Restart the device; The PXE in S12 supports reading and writing to the NTFS file system under Windows, and requires a FAT partition to store Windows configuration files; The user image file output format in S13 is qcow2; The specific steps in S2 to execute each plugin and restart the device to complete the system configuration include: S21. Locate and find the FAT partition; S22. After locating the TAT partition, obtain the plugin list; S23. Execute the plugin module and return a status code; S24. Write to the registry based on the status code and determine whether to restart; S25. Restart after the plugin is executed; The status codes include 1001, 1002, and 1003. Status code 1001 indicates exit, restart, and will not be executed again on the next system startup. Status code 1002 indicates exit, restart without execution, and will be executed on the next startup. Status code 1003 indicates exit, restart, and will be executed again on the next system startup.

2. The cloud environment Windows system configuration method according to claim 1, characterized in that: The user requirement list collected in S11 includes disk RAID, account configuration, and network configuration.

3. The apparatus for configuring a Windows system in a cloud environment according to claim 1 or 2, characterized in that, Includes image installation module and initialization module, wherein: The image installation module is used to perform image installation in the PXE environment and restart the device after installation. The initialization module is used to automatically start the initialization service and execute various plugins when the device is restarted, and then restart the device to complete the system configuration.

4. The system for configuring a Windows system in a cloud environment according to claim 1 or 2, characterized in that, It includes the PXE runtime module and the initialization service module, wherein: The PXE runtime module obtains instructions and parameters through instruction scheduling, enabling the image service to download the image file, booting the TFTP service through the PXE environment, and providing an IP address to DHCP. The initialization service module executes the plugin list and restarts to complete the system configuration.

5. The system of the cloud environment Windows system configuration method according to claim 4, characterized in that: The plugin list includes setting the hostname, setting the password, and configuring network plugins.