CN106557354B - Method for setting attribute parameters of private image and computer equipment - Google Patents

Method for setting attribute parameters of private image and computer equipment Download PDF

Info

Publication number
CN106557354B
CN106557354B CN201611014963.2A CN201611014963A CN106557354B CN 106557354 B CN106557354 B CN 106557354B CN 201611014963 A CN201611014963 A CN 201611014963A CN 106557354 B CN106557354 B CN 106557354B
Authority
CN
China
Prior art keywords
virtual machine
private
registry
image
computer device
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
CN201611014963.2A
Other languages
Chinese (zh)
Other versions
CN106557354A (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.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201611014963.2A priority Critical patent/CN106557354B/en
Publication of CN106557354A publication Critical patent/CN106557354A/en
Application granted granted Critical
Publication of CN106557354B publication Critical patent/CN106557354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/45595Network integration; Enabling network access in 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 relates to the technical field of IT, in particular to a setting method of attribute parameters of a private image in the field of public cloud and computer equipment. In the technical scheme provided by the application, computer equipment acquires a registry file path in the private image; and the computer equipment configures a virtual machine automatic login registry and a virtual machine startup automatic start script registry in the private mirror image according to the registry file path. Through the technical scheme provided by the application, the user can modify the attribute information of the private mirror image without manual operation, the complicated manual configuration of the user is reduced, and the user experience is improved.

Description

Method for setting attribute parameters of private image and computer equipment
Technical Field
The application relates to the technical field of IT, in particular to a setting method of attribute parameters of a private image in the technical field of public cloud and computer equipment.
Background
The virtualization technology is one of key technologies in the field of cloud computing, and can virtualize physical resources of a physical Machine into a plurality of Virtual Machines (VMs), the physical resources are provided to each VM by a virtualization platform in the form of a Virtual resource pool, different VMs can be allocated to different users, and the VMs share the physical resources.
A virtual machine can be viewed as a complete computer system that is emulated by software, has complete hardware system functionality, and runs in a completely isolated environment. The virtual machine image is a cloud server template containing software and necessary configurations. The virtual machine image contains at least an operating system and may also contain application software such as database software.
In the technical field of public cloud, virtual machine images can be divided into public images and private images. The public image is a default image provided by the system, is a public basic image of a standard operating system officially provided by the cloud platform and is visible to all users. The private mirror image is a mirror image created by the user, is a personal mirror image created based on a cloud server or system disk backup, and is only visible to the user; the private image may include a standard operating system, a pre-installed public application environment, and a user's private application, among others. In a specific application, a user can use a public mirror image or a private mirror image to apply for an elastic cloud server, and can also create the private mirror image through an existing cloud server.
Under a public cloud scene, a public cloud platform generates a private mirror image in a clone mode or a mirror image import mode, and the private mirror image is used for creating a virtual machine and is distributed to users for use. In the process of creating a virtual machine or in the process of importing the private image of a user through a public cloud platform, the user cannot configure attribute parameters of the private image in advance, such as setting an original password of the private image. If the user forgets the original password of the private image, the user cannot log in to the virtual machine created using the private image.
Due to the fact that the attribute parameters of the virtual machine cannot be configured in advance, the prior art cannot meet individual requirements of users in actual services in the field of public cloud technologies, such as requirements of different safety of the users in different production environments.
Disclosure of Invention
The embodiment described in the application provides a setting method of attribute parameters of a private image in a public cloud and computer equipment, so that user experience is improved.
On one hand, the application provides a method for setting attribute parameters of a private image in a public cloud, which comprises the following steps: the computer equipment acquires a registry file path in the private mirror image;
and the computer equipment modifies the automatic virtual machine login registry and the automatic virtual machine startup script registry in the private mirror image according to the registry file path.
In a possible manner, the computer device obtains the virtual machine system file in the private image, backs up the virtual machine system file, and performs a clearing operation on the virtual machine system file.
In yet another possible approach, the computer device modifies a close event tracker registry in the private image such that a virtual machine created using the private image does not display a dialog to close the event tracker after startup.
In another possible manner, after the computer device modifies the virtual machine auto-login registry and the virtual machine boot auto-start script registry in the private image according to the registry file path, the method further includes: and the computer equipment creates a virtual machine according to the modified private image.
In another possible approach, before the computer device obtains the registry file path in the private image, the method further includes: the computer device takes the private mirror image as a temporary data disc to be mounted on a temporary host; after the computer device modifies the automatic virtual machine login registry and the automatic virtual machine startup script registry in the private image according to the registry file path, the method further comprises the following steps: and the computer equipment unloads the temporary data disk of the temporary host and mounts the temporary data disk as a system disk onto the virtual machine corresponding to the private mirror image.
In another aspect, the present application provides a computer device, including an obtaining module and a processing module:
the acquisition module is used for acquiring a registry file path in the private mirror image;
the processing module is used for modifying the automatic login registry of the virtual machine and the automatic startup script registry of the virtual machine in the private mirror image according to the registry file path.
In a possible manner, the obtaining module is further configured to obtain a virtual machine system file in the private image; the processing module is further used for backing up the virtual machine system file and executing clearing operation on the virtual machine system file.
In yet another possible approach, the processing module is further to modify a shutdown event tracker registry in the private image.
In another possible approach, the computer device further includes a virtual machine creation module configured to create a virtual machine according to the modified private image.
In another possible manner, the computer device further includes a virtual machine control module, configured to mount the private image as a temporary data disk on a temporary host before the obtaining module obtains the registry file path in the private image; the virtual machine control module is further configured to uninstall the temporary data disk on the temporary host and mount the temporary data disk as a system disk on the virtual machine corresponding to the private image after the processing module modifies the virtual machine automatic login registry and the virtual machine startup automatic start-up script registry in the private image according to the registry file path.
In another aspect, the present application provides a computer device comprising at least one processor and at least one memory, the at least one memory storing a computer program, the at least one processor executing the computer program to cause the computer device to perform the method described herein.
In another aspect, the present application provides a computer storage medium having stored thereon computer software instructions that, when executed, cause a computer to perform the method described herein.
Compared with the prior art, according to the technical scheme provided by the embodiment of the application, the script program is executed by the computer equipment, and the user can modify the attribute parameters of the private image in an off-line state, so that the personalized requirements of the user in actual service are met, and the user experience is improved.
Drawings
To illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is obvious that the following figures reflect only some examples of the present application, and that other embodiments of the present application can be derived from these figures by a person skilled in the art without inventive exercise. And all such embodiments or implementations are within the scope of the present application.
FIG. 1 is a schematic diagram of a possible system architecture for implementing an embodiment of the present application;
FIG. 2 is a schematic diagram of a computer device provided by an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for modifying a login password of a virtual machine of a private image according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present disclosure.
The network architecture and the service scenario described in the embodiment of the present application are for illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application, and it can be known by a person skilled in the art that the technical solution provided in the embodiment of the present application is also applicable to similar technical problems along with the evolution of the network architecture and the appearance of a new service scenario.
As shown in fig. 1, the present application provides a schematic system architecture diagram of a cloud service system, where a user operates a client 106 to access a cloud service through a network 104 and logs in a virtual machine. The cloud service system includes a host 102.
The client 106: the user is connected to the cloud service system through the client 106, and the user can apply for services such as opening a cloud service, applying for a virtual machine, and applying for resetting a virtual machine OS login password through the client 106. The client 106 may be based on various types of platforms including, but not limited to, Web Portal, IOS, android, Linux, and Windows platforms, among others. The client 106 may be installed on a user Equipment, and the user Equipment related to the present application may include various handheld devices with communication functions, vehicle-mounted devices, wearable devices, computing devices, or processing devices connected to various networks, as well as various forms of Mobile Stations (MSs), terminals (Terminal), Terminal devices (Terminal Equipment), and the like. For convenience of description, the above-mentioned devices are collectively referred to as user equipment in this application.
The host computer 102: may be various types of physical servers for providing physical resources. A Virtual Machine Monitor (VMM) 1020 runs on the host 102. VMM 1020 is code located between the operating system and hardware 1022. Using Virtual Machine technology, hardware 1022 is partitioned into multiple Virtual Machines (VMs), such as VM1, VM2, VM3 … … VMn in fig. 1. The virtual machine is a virtual computer, i.e. a logical computer, which is simulated. VMM 1020 may isolate and manage multiple virtual machines running in an upper layer, arbitrate their access to underlying hardware, and virtualize a set of virtual hardware environments, such as processors, memory, I/O devices, etc., for each virtual machine that are independent of the actual hardware.
Fig. 2 is a schematic diagram of a computer device according to an embodiment of the present application. The computer device 200 comprises at least one processor 201, a communication bus 202, at least one memory 203 and at least one communication interface 204.
The processor 201 may be a general purpose Central Processing Unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs in accordance with the present teachings.
The communication bus 202 may include a path for transferring information between the aforementioned components. The communication interface 204 may be any device, such as a transceiver, for communicating with other devices or a communication network. The communication Network may be an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), or the like.
The Memory 203 may be a Read-Only Memory (ROM), a static Memory device that can store static information and instructions, a Random Access Memory (RAM), or a dynamic Memory device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, optical disk storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory 203 may be a stand-alone memory connected to the processor 201 via the communication bus 202; the memory 203 may also be integrated with the processor 201.
The memory 203 can be used for storing application program codes for executing the scheme of the application; the processor 201 may be used to execute application program code stored in the memory 203.
As one embodiment of a specific implementation, the computer device 200 may include multiple processors, such as the processor 201 and the processor 208 in fig. 2. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Each processor itself, such as processor 201, may include one or more CPUs, such as CPU0 and CPU 1.
The computer device 200 may also include an output device 205 and an input device 206. The output device 205 is in communication with the processor 201 and may display information in a variety of ways. The output device 205 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device 206 is in communication with the processor 201 and may receive user input in a variety of ways. The input device 206 may be a mouse, keyboard, touch screen device, or sensing device, etc.
The computer device 200 may be a general-purpose computer device, or a special-purpose computer device. In a specific implementation, the computer device 200 may be a desktop computer, a laptop computer, a web server, a Personal Digital Assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, or the like. The embodiment of the present application does not limit the type of the computer device 200.
It should be noted that the computer device 200 shown in fig. 2 only shows a possible hardware implementation manner of each part in the cloud service system, and according to the difference or change of the functions of each part of the system, hardware components of the computer device may be added or deleted so as to match the functions of each part of the system.
During use of the virtual machine by a user, the user may manually modify the registry key to modify the attribute parameters of the virtual machine. Taking the example that the user modifies the default login password of the virtual machine, the user may perform the following operations:
1) manually expanding 'HKEY _ LOCAL _ MACHINE > SOFTWARE > Microsoft > Windows NT > Currentversion > Windoon' to display all registry entries under 'Windoon', modifying the value of 'DefaultPassionword' and modifying 'AutoAdminLogon' to 1;
2) "HKEY _ LOCAL _ MACHINE > SOFTWARE > Microsoft > Windows > Currentversion > Run" is manually expanded to display all registry entries under "Run", and "C: \ setpass. vbs" is entered in the numerical data item after double clicking "(Default)" pop-up dialog.
Through the above operations, the user configures the default login password of the virtual machine manually, and can create other new virtual machines by using the virtual machine as a mirror image template, so that the user-defined login password is used in the newly created virtual machine. Of course, similarly, the user may also modify the value of the corresponding attribute parameter by finding the registry key corresponding to the other attribute parameters of the virtual machine.
In the specific implementation process, the user can modify the attribute information of the private image, such as a login password of the virtual machine, through the script program without manual operation; therefore, after a new virtual machine is created by using the virtual machine as a private image, a user can log in the newly created virtual machine by using the set login password. An embodiment of modifying the private image's virtual machine login password is described in detail below in conjunction with fig. 3.
Step 301: the computer device obtains a system password file and a registry file path in the private image.
In the implementation of step 301, the computer device may first identify the operating system type of the mounted private image from the directory of the mounted private image, i.e., "$ rootPath". If the mount directory is "$ rootPath/Windows/", it indicates that the virtual machine uses a Windows system; if the mount directory is "$ rootPath/root/", it indicates that the virtual machine uses a Linux operating system.
Taking a Windows System as an example, the System password file path is "$ rootPath/Windows/System32/config/SAM", and the registry file path is "$ rootPath/Windows/System 32/config/SOFTWARE". For convenience of description, the term "Windows/System 32/config/" in this application may be denoted by "$ configPath/" and "Windows/System 32/config/SOFTWARE" may be denoted by "$ systemShowWaepath".
Step 302: the computer equipment backups the system password file and then executes password clearing operation on the system password file.
Specifically, taking a Windows System as an example, a computer device first backs up a System password file such as an SAM file under "$ rootPath/Windows/System32/config/" directory, and then clears the password of the SAM file administerrator user by using a chntpw operation. Example pseudo code to implement step 302 is as follows:
cp-f$rootPath/$configPath/SAM$rootPath/$configPath/SAM_BAK
chntpw-u Administrator$rootPath/$configPath/SAM<<EOF
>1
>y
>EOF
it should be noted that the reason why the computer device backs up the system password file in step 302 is for security, and once the operation of modifying the virtual machine login password of the private image is unsuccessful in this embodiment, the computer device may also restore to the previous state. .
Step 303: the computer equipment modifies the automatic login registry of the virtual machine and the automatic startup script registry of the virtual machine when the virtual machine is started up in the private mirror image.
Taking the Windows system as an example, an example of the automatic login registry of the virtual machine is as follows:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultUserName"="Administrator"
"DefaultPassword"=""
an example of the virtual machine boot auto-start script registry, which takes the Windows system as an example, is as follows:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"InitScript"="c:\\setpass.vbs"
the computer device may modify the virtual machine auto-login registry in step 303 using pseudo-code as exemplified by:
reged-I$rootPath/$systemSoftwarePath HKEY_LOCAL_MACHINE\\SOFTWARE/opt/
ecs_scripts/winlogon.reg–C
in this step 303, the computer device may modify the virtual machine boot auto-start script registry using pseudo code as an example:
reged-I$rootPath/$systemSoftwarePath HKEY_LOCAL_MACHINE\\SOFTWARE/opt/
ecs_scripts/runsetpass.reg–C
step 304: the computer device modifies a close event tracker registry in the private image such that the virtual machine does not display a dialog to close the event tracker after startup.
An example of a close event tracker registry, such as a Windows system, is as follows:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability]
"ShutdownReasonOn"=dword:00000000
in step 304, the computer device may modify a close event tracker registry using pseudo code as exemplified below:
reged-I$rootPath/$systemSoftwarePath HKEY_LOCAL_MACHINE\\SOFTWARE/opt/
ecs_scripts/reliability.reg–C
in step 304, the closing event tracker registry in the private image is modified, so that the influence on the automatic login process of the virtual machine can be reduced, and the user experience can be improved.
It should be noted that, before the step 302, the computer device may further detect the private image, and determine whether the virtual machine login password of the private image has been modified. If the virtual machine login password of the private mirror image is modified, the computer equipment does not modify the virtual machine login password of the virtual machine; the computer device executes the embodiment of modifying the private image's virtual machine login password shown in fig. 3 described above only if the private image's virtual machine login password has not been modified. For example, the computer device may determine whether the virtual machine login password of the private image has been modified by exporting the autorun program registration key in the softward registry file using the retrieved command. If the auto-run program registry contains both "setpass. vbs" and "InitScript", the private image of the virtual machine is the private image that has been configured with "InitScript" ═ C: \ \ setpass. vbs ". The specific implementation pseudo code example is as follows:
Figure BDA0001155644160000091
by using the above embodiment shown in fig. 3 of the present application, through executing the script program by the computer device, the user can modify the attribute parameters of the private image in the offline state, so that the personalized requirements of the user in the actual service, such as the requirements of the user on different safety in different production environments, can be met, and the user experience is improved.
For example, when a user creates a private image in a clone mode or the user imports the private image of the user through a public cloud platform, the user can directly complete the injection of the initial login password of the virtual machine when the private image is used for creating the virtual machine without manually configuring the attribute parameters of the private image. Taking a Windows virtual machine under a public cloud platform based on XEN virtualization as an example, when a user creates the virtual machine through a public cloud interface, the initial login password can be customized, the login password is sent to a virtualization management platform through an interface of an OpenStack of the cloud Computing management platform, the virtualization management platform mounts a mirror image file of a Windows system disk on don 0 on a Computing Node Agent (CNA) and identifies a directory where an SAM file and a SOFTWARE mail registry are located, the virtualization management platform copies a startup script file setpass.vbs and a password configuration file passswjnf to a mount directory of a private mirror image (i.e., a mirror image file of the Windows system disk), i.e., a C-disk directory of the Windows system, and modifies attribute parameters of the mirror image file of the Windows system disk mounted under the mount directory. Therefore, after the virtual machine is started, the startup automatic startup script setpass.vbs can be triggered and executed, the setting of attribute parameters of the private image, such as the login password of the virtual machine, is realized, then the password configuration file passswinf and the startup automatic startup script setpass.vbs are cleaned, and the registry is restored to realize the cleaning of the startup script registry and the automatic login registry setting, so that the field environment is recovered, the virtual machine is restarted, and a clean virtual machine login window is presented to a user.
On the other hand, in a scenario where the user uses the public cloud virtual machine, if the user forgets the password of the virtual machine administrator, the login password of the virtual machine may be reset through the foregoing embodiment shown in fig. 3 of the present application. The computer equipment firstly leads the private image of a user into the public cloud platform through the image service management platform, and before the private image is used for creating the virtual machine instance, the system image file of the virtual machine is used as a temporary data disc to be mounted on a temporary host prepared in advance. Still taking the Windows virtual machine as an example, the user may first prepare a temporary Linux virtual machine as the temporary host for standby, and reset the login password of the virtual machine by the following operations:
1) modifying security group rules of the Windows virtual machine, such as closing 3389 ports of the TCP protocol items to prevent other IP addresses from accessing the virtual machine;
2) closing the Windows virtual machine, unloading a system disk of the Windows virtual machine as a private mirror image of the Windows virtual machine, and mounting the system disk as a temporary data disk onto a temporary Linux virtual machine prepared in advance;
3) remotely logging in the temporary Linux virtual machine, and installing the mounted temporary data disk, such as a software package supporting an NTFS (New technology File System) file system in the temporary data disk and a tool for modifying a windows registry;
4) executing a script for modifying the login password of the Windows virtual machine; clearing an original login password of the Windows virtual machine;
5) unloading a temporary data disk of the temporary Linux virtual machine, namely a system disk of the original Windows virtual machine, on line, and re-mounting the temporary data disk, namely the system disk of the Windows virtual machine, back to the original Windows virtual machine;
6) opening the original Windows virtual machine and recovering the modified security rules in 1) above, such as opening 3389 port of the "TCP" protocol item.
In the above embodiments of the present application, only the login password of the virtual machine is set as an example, and other attribute parameters of the virtual machine may also be set in a similar manner. Vbs script is added with operations for setting machine name and IP address, for example, the above-described embodiments of the present invention may also be used to configure machine name, IP address information, etc. in a private image. The method comprises the following specific steps:
1) before a private mirror image is used for creating a virtual machine, the private mirror image can be mounted on a Domain0, the private mirror image automatically logs in a bottom layer in an off-line configuration mode, a startup automatic start script is written in a registry, and meanwhile, a corresponding custom configuration file such as passcode, network name, hostname and inf is generated according to one or a combination of attribute parameters such as a virtual machine login password, a machine name and an IP address set by a user per se and transmitted through an interface of an OpenStack; and the custom configuration files are injected into the root directory of the Windows system, namely, "$ rootPath".
2) After the virtual machine starts automatic login, a startup automatic startup script setpass.vbs is triggered to be executed, and custom configuration files passsd.inf, network.inf, hostname.inf and the like are read from the startup automatic startup script setpass.vbs to configure the attribute parameters of the virtual machine.
3) Deleting the self-defined configuration file and the setpass.
As shown in fig. 4, which is a schematic structural diagram of a computer device 400 provided in an embodiment of the present application, the computer device 400 includes an obtaining module 402 and a processing module 404. Wherein:
the obtaining module 402 is configured to obtain a registry file path in the private image;
the processing module 404 is configured to modify the automatic virtual machine login registry and the automatic virtual machine startup script registry in the private image according to the registry file path.
With the computer device shown in fig. 4, the user can set the attribute parameters of the private image without manual operation. Taking the modification of the virtual machine login password in the private image as an example, the processing module 404 may be implemented by using the method in the embodiment shown in fig. 3 of the present application. In a specific implementation, because there is a case that the operation of modifying the login password of the virtual machine of the private image is unsuccessful, for security, the obtaining module 402 in the computer device 400 of the present application may further be configured to obtain a system file of the virtual machine in the private image, and the processing module 404 is configured to back up the system file of the virtual machine and perform a clearing operation.
To reduce the impact on the automatic login process of the virtual machine and improve the user experience, the processing module 404 in the computer device 400 may also modify the close event tracker registry in the private image so that the virtual machine does not display the dialog box for closing the event tracker after being started.
The computer device 400 of the present application may further include a virtual machine creation module 406 for creating a virtual machine from the modified private image. Thus, when a user creates a virtual machine by using a private image created in a clone manner or importing a private image of the user through a public cloud platform, the user can directly complete setting of attribute parameters when creating the virtual machine, such as injection of an initial login password of the virtual machine, without manually configuring the attribute parameters of the private image by using the computer device 400 of the present application. After the attribute parameters are set, the field environment is recovered, the virtual machine is restarted, and a clean virtual machine login window is presented to the user, so that the user experience is improved.
Computer device 400 of the present application may also include a virtual machine control module 408. The virtual machine control module 408 is configured to mount a system disk of the virtual machine as a temporary data disk on the temporary host before the obtaining module 402 obtains the registry file path in the private image; further, the virtual machine control module 408 is further configured to, after the processing module 404 modifies the virtual machine automatic login registry and the virtual machine startup automatic startup script registry in the private image according to the registry file path, uninstall the temporary data disk on the temporary host, and mount the temporary data disk as a system disk on the virtual machine corresponding to the private image. The virtual machine control module 408 can also be configured to shut down the virtual machine corresponding to the private image.
In a scenario where a user uses a public cloud virtual machine, if the user forgets a password of a virtual machine administrator, through cooperation of the virtual machine control module 408, the computer device 400 may implement resetting of an attribute parameter of the virtual machine, such as a login password, through the foregoing embodiment shown in fig. 3 of the present application.
It should be noted that the computer 400 according to the above-mentioned embodiment of the present application may include at least one processor and at least one memory, and after the at least one processor executes the computer program stored in the at least one memory, the computer device 400 executes the method for setting the attribute parameters of the virtual machine according to the above-mentioned embodiment of the present application.
Embodiments of the present application further provide a computer storage medium for storing computer software instructions, which includes a program designed to execute the above method embodiments of the present application. By executing the stored program, the method for setting the attribute parameters of the virtual machine provided by the application can be realized.
While the present application has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus (device), or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein. A computer program stored/distributed on a suitable medium supplied together with or as part of other hardware, may also take other distributed forms, such as via the Internet or other wired or wireless telecommunication systems.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the present application has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and figures are merely exemplary of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. The method for setting the attribute parameters of the private mirror image in the public cloud is characterized by comprising the following steps:
the computer equipment acquires a registry file path in the private mirror image; the private mirror is a cloud server template comprising a standard operating system;
the computer equipment modifies the automatic login registry of the virtual machine and the automatic startup script registry of the virtual machine in the private mirror image according to the registry file path;
and the computer equipment creates a virtual machine according to the modified private image.
2. The method of claim 1, wherein the method further comprises:
and the computer equipment acquires the virtual machine system file in the private mirror image, backups the virtual machine system file and executes clearing operation on the virtual machine system file.
3. The method of claim 1 or 2, wherein the method further comprises:
the computer device modifies a close event tracker program registry in the private image such that a virtual machine created using the private image does not display a dialog to close the event tracker program after startup.
4. The method of claim 1 or 2, wherein prior to the computer device obtaining the registry file path in the private image, the method further comprises:
the computer device takes the private mirror image as a temporary data disc to be mounted on a temporary host;
after the computer device modifies the automatic virtual machine login registry and the automatic virtual machine startup script registry in the private image according to the registry file path, the method further comprises the following steps:
and the computer equipment unloads the temporary data disk of the temporary host and mounts the temporary data disk as a system disk onto the virtual machine corresponding to the private mirror image.
5. A computer device, characterized in that the computer device comprises an acquisition module and a processing module:
the acquisition module is used for acquiring a registry file path in the private mirror image; the private mirror is a cloud server template comprising a standard operating system;
the processing module is used for modifying the automatic login registry of the virtual machine and the automatic startup script registry of the virtual machine in the private mirror image according to the registry file path;
the computer device further comprises a virtual machine creation module for creating a virtual machine according to the modified private image.
6. The computer device of claim 5, wherein the obtaining module is further to obtain a virtual machine system file in the private image;
the processing module is further used for backing up the virtual machine system file and executing clearing operation on the virtual machine system file.
7. The computer device of claim 5 or 6, wherein the processing module is further to modify a close event tracker registry in the private image.
8. The computer device according to claim 5 or 6, wherein the computer device further comprises a virtual machine control module for mounting the private image as a temporary data disk on a temporary host before the obtaining module obtains the registry file path in the private image;
the virtual machine control module is further configured to uninstall the temporary data disk on the temporary host and mount the temporary data disk as a system disk on the virtual machine corresponding to the private image after the processing module modifies the virtual machine automatic login registry and the virtual machine startup automatic start-up script registry in the private image according to the registry file path.
9. A computer device, comprising at least one processor and at least one memory, the at least one memory storing a computer program, the at least one processor configured to execute the computer program to cause the computer device to perform the method of any of claims 1-4.
10. A computer storage medium having stored thereon computer software instructions that, when executed, cause a computer to perform the method of any of claims 1 to 4.
CN201611014963.2A 2016-11-17 2016-11-17 Method for setting attribute parameters of private image and computer equipment Active CN106557354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611014963.2A CN106557354B (en) 2016-11-17 2016-11-17 Method for setting attribute parameters of private image and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611014963.2A CN106557354B (en) 2016-11-17 2016-11-17 Method for setting attribute parameters of private image and computer equipment

Publications (2)

Publication Number Publication Date
CN106557354A CN106557354A (en) 2017-04-05
CN106557354B true CN106557354B (en) 2020-12-25

Family

ID=58444857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611014963.2A Active CN106557354B (en) 2016-11-17 2016-11-17 Method for setting attribute parameters of private image and computer equipment

Country Status (1)

Country Link
CN (1) CN106557354B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684028B (en) * 2017-10-18 2024-04-12 中兴通讯股份有限公司 Method, device and equipment for separating operating system from user data
CN109445709B (en) * 2018-11-05 2022-09-20 郑州云海信息技术有限公司 Method and device for managing storage resources in virtualization system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414274A (en) * 2007-10-18 2009-04-22 上海广联电子有限公司 Method for rapidly recovering picking machine system
US7996414B2 (en) * 2008-02-29 2011-08-09 International Business Machines Corporation Method and system for separating file system metadata from other metadata in virtual machine image format
CN102402446A (en) * 2011-11-22 2012-04-04 成都市华为赛门铁克科技有限公司 Method and device for installing application software
CN102637144A (en) * 2012-03-31 2012-08-15 奇智软件(北京)有限公司 System fault processing method and device
CN103514023A (en) * 2013-10-22 2014-01-15 中国科学院信息工程研究所 Method and system for off-line and automatically installing software of virtual machine
US8839228B2 (en) * 2010-04-21 2014-09-16 Ca, Inc. System and method for updating an offline virtual machine
CN104182257A (en) * 2011-11-22 2014-12-03 华为数字技术(成都)有限公司 Application software installation method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414274A (en) * 2007-10-18 2009-04-22 上海广联电子有限公司 Method for rapidly recovering picking machine system
US7996414B2 (en) * 2008-02-29 2011-08-09 International Business Machines Corporation Method and system for separating file system metadata from other metadata in virtual machine image format
US8839228B2 (en) * 2010-04-21 2014-09-16 Ca, Inc. System and method for updating an offline virtual machine
CN102402446A (en) * 2011-11-22 2012-04-04 成都市华为赛门铁克科技有限公司 Method and device for installing application software
CN104182257A (en) * 2011-11-22 2014-12-03 华为数字技术(成都)有限公司 Application software installation method and device
CN102637144A (en) * 2012-03-31 2012-08-15 奇智软件(北京)有限公司 System fault processing method and device
CN103514023A (en) * 2013-10-22 2014-01-15 中国科学院信息工程研究所 Method and system for off-line and automatically installing software of virtual machine

Also Published As

Publication number Publication date
CN106557354A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
US11405274B2 (en) Managing virtual network functions
CN109154888B (en) Super fusion system equipped with coordinator
US9218176B1 (en) Software deployment in a distributed virtual machine environment
US9361147B2 (en) Guest customization
US10255095B2 (en) Temporal dynamic virtual machine policies
US9477507B2 (en) State customization of forked virtual machines
US9542174B2 (en) Deployment of software images with distinct configuration logic
US10303458B2 (en) Multi-platform installer
US11210132B2 (en) Virtual machine migration in virtualization environment having different virtualization systems
US8621081B2 (en) Hypervisor controlled user device that enables available user device resources to be used for cloud computing
US11886902B2 (en) Physical-to-virtual migration method and apparatus, and storage medium
CN104951694A (en) Isolation method and apparatus for management virtual machine
CN112256393B (en) Resource management method and equipment for bare metal server
CN107463426B (en) Method and device for cloning virtual machine under KVM virtualization
CN106557354B (en) Method for setting attribute parameters of private image and computer equipment
US10409631B2 (en) Setup of management system in a virtualization system
CN112286633A (en) Virtual machine creating method, device, equipment and storage medium based on CloudStack platform
CN115499413A (en) Method and system for batch configuration of fixed IP addresses of virtual machines based on KVM
CN116700897A (en) Method and device for creating computing environment template, computing equipment and storage medium
Baclit et al. Linux Virtualization

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220215

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.