CN112835680A - Method for automatically setting password of Windows operating system virtual machine - Google Patents
Method for automatically setting password of Windows operating system virtual machine Download PDFInfo
- Publication number
- CN112835680A CN112835680A CN202110131019.XA CN202110131019A CN112835680A CN 112835680 A CN112835680 A CN 112835680A CN 202110131019 A CN202110131019 A CN 202110131019A CN 112835680 A CN112835680 A CN 112835680A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- password
- operating system
- windows operating
- setting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000009434 installation Methods 0.000 claims description 8
- 238000012795 verification Methods 0.000 claims description 3
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000003213 activating effect Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000012858 packaging process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/45—Structures or tools for the administration of authentication
- G06F21/46—Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a method for automatically setting a password for a virtual machine of a Windows operating system, which comprises the following steps: selecting a windows operating system template through a cloud platform to create a virtual machine, and inputting a login password to be set; and calling an interface for creating the virtual machine, creating a plurality of virtual machines with different SIDs through the same windows operating system template, and logging in by using the input login password. The method can establish the Windows operating system virtual machine on the ESXI host through the cloud platform, can automatically set according to the password appointed by the user under the condition that the SID of the virtual machine is unique, and can remotely log in the virtual machine through the IP address if the allocated IP address is available after the establishment is successful, and the remote login is not required after the setting is carried out on the control console of the virtual machine, so that the safety of the virtual machine is guaranteed, convenience is brought to the user, and the user experience is improved.
Description
Technical Field
The invention relates to the technical field of virtual machines, and particularly provides a method for automatically setting passwords for a Windows operating system virtual machine.
Background
ESXI is a software layer that runs between a physical server and an operating system, allowing multiple operating systems and applications to share a set of underlying physical hardware.
In a cloud computing scenario, when a user creates a virtual machine through a cloud platform, a template corresponding to an operating system is selected, and a login password is specified. For the Windows template on vCenter, the virtual machine can be created, and after relevant configuration, the virtual machine is shut down and then converted into the template. The template can be selected when the virtual machine is created subsequently, and the created virtual machine can log in through the user name and the password of the template, but through the template made in this way, the SIDs of the created multiple virtual machines are the same, and a security problem can be caused.
Disclosure of Invention
To address the problem of SID duplication, the sysprep command may be executed to configure a completely new installation of Windows before the virtual machine that made the template is shut down, and then the virtual machine is converted into the template. When the template is used to create virtual machines, each virtual machine will generate a unique SID.
However, the virtual machine is created based on the template on which the sysprep command is executed, the login console enters the response page after the startup, the password setting is required to be performed manually, the automatic setting cannot be performed according to the password specified by the user during the creation, and thus the created virtual machine cannot be directly remotely logged in through the IP address, and the virtual machine needs to enter the virtual machine console of the cloud platform for setting before logging in.
In order to solve the above problems, the present invention provides a method for automatically setting a password for a virtual machine of a Windows operating system. When the sysprep command is executed, an automatic response file can be appointed, an initial login password is set in the automatic response file, when the created virtual machine is started, the virtual machine directly enters a login page, and the login can be successfully performed by using the login password set in the response file; the packaged interface can be successfully logged in through the set initial password after the vmware tools are started, and a command for setting the password is executed, so that the automatic setting of the password specified by the user is completed.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for automatically setting passwords for a Windows operating system virtual machine is realized by the following contents:
selecting a windows operating system template through a cloud platform to create a virtual machine, and inputting a login password to be set;
and calling an interface for creating the virtual machine, creating a plurality of virtual machines with different SIDs through the same windows operating system template, and logging in by using the input login password.
And the production of the windows operating system template comprises saving the automatic response file under a specific directory and appointing the automatic response file to execute a sysprep command.
The automatic response script is an automatic response script of the windows operating system and is used for completing default setting of the windows system configuration.
The automatic response script completes automatic response when initially logging in the system in an oobeSystempart set by a Windows system, automatically activates an administeror user, and sets a login password, wherein the login password is a password used for logging in a virtual machine in a subsequent program.
The automatic answer script is used when the system is logged in for the first time, so that a welcome interface is skipped when the system is logged in for the first time, default Windows system setting is completed, and an input interface of a user name and a password is entered.
The Windows operating system template manufacturing process comprises the following contents:
creating a virtual machine by mounting an ISO file or a mirror image file of a corresponding operating system, and carrying out system installation;
after the system is successfully installed, VMware Tools are installed, the automatic response file is stored in a specific directory, and other configurations of the virtual machine are carried out according to requirements;
after configuration is completed, designating the automatic response file to execute a sysprep command;
after the sysprep command is executed, deleting system specific data including information such as unique Security ID (SID) and the like from Windows installation, and then automatically shutting down the system;
and after the system is completely shut down, deleting all network cards and floppy drives of the virtual machine, setting the device type of the CD/DVD driver as client equipment, and converting the virtual machine into a template, wherein the template is selected when the Windows operating system virtual machine of the version is created through a cloud platform.
The interface for creating the virtual machine is a virtual machine resource operation interface of a vCenter management platform packaged based on Vmware api, and is called when the cloud platform operates the virtual machine.
The encapsulation process for creating the interface of the virtual machine comprises the following contents:
the interface for creating the virtual machine accepts the virtual machine password input by the user as the access parameter, and the virtual machine is created by calling the vmware api;
after the virtual machine is successfully established, starting up the virtual machine, and after VMware Tools are started, using a user name and a password in the Windows operating system template to carry out interface login;
if the default user name and password authentication is not passed, password setting is not carried out;
after the authentication is passed, executing a command for setting a password, and setting the password input by the user as a new password of the virtual machine;
and after the execution is finished, performing interface login verification by using the user name and the new password, and verifying whether the new password is successfully set.
The process of verifying whether the new password is successfully set further comprises:
if the password setting is unsuccessful, the password resetting operation can be executed again for retry, and if the password setting is unsuccessful after retry, a prompt for password setting failure is returned, and the password resetting operation can be carried out.
According to the method, when the virtual machine is created based on the Windows operating system template through the cloud platform, a login password can be set, the cloud platform obtains the password input by a user, an interface for creating the virtual machine is called, the cloud server virtual machine is created, after the creation is completed, the password of the virtual machine is set, the virtual machine is successfully created, namely the initial password is successfully set, after the creation is successful, the login can be performed by using the input password, and meanwhile, the SID in the virtual machine is unique.
Compared with the prior art, the method for automatically setting the password for the virtual machine of the Windows operating system has the following outstanding advantages that:
the method can establish the Windows operating system virtual machine on the ESXI host through the cloud platform, can automatically set according to the password appointed by the user under the condition that the SID of the virtual machine is unique, and can remotely log in the virtual machine through the IP address if the allocated IP address is available after the establishment is successful, and the remote login is not required after the setting is carried out on the control console of the virtual machine, so that the safety of the virtual machine is guaranteed, convenience is brought to the user, and the user experience is improved.
Drawings
FIG. 1 is a flow chart illustrating the process of creating the virtual machine automatic setting password according to the method of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
A method for automatically setting passwords for a Windows operating system virtual machine is realized by the following contents:
selecting a windows operating system template through a cloud platform to create a virtual machine, and inputting a login password to be set;
and calling an interface for creating the virtual machine, creating a plurality of virtual machines with different SIDs through the same windows operating system template, and logging in by using the input login password.
The method comprises the following steps:
(1) writing an automatic response script of a windows operating system: and compiling an automatic response script, using the automatic response script when logging in the system for the first time, skipping a welcome interface and the like when logging in the system for the first time, completing configuration of default Windows system setting, directly entering an input interface of a user name and a password, namely, completing automatic response when logging in the system for the first time in an oobe system part, automatically activating an administeror user, and setting a login password, namely, a password used for logging in a virtual machine in a subsequent program.
(2) Making a Windows operating system template: creating a virtual machine by mounting an ISO file or an image file corresponding to an operating system, carrying out system installation, installing VMware Tools after the system installation is successful, storing the automatic response file into a specific directory, carrying out other configuration of the virtual machine according to requirements, after the configuration is completed, designating the response file to execute a sysprep command, after the command is executed, deleting system specific data including information such as unique Security ID (SID) and the like from Windows installation, and then automatically shutting down the system; and after the system is completely shut down, deleting all network cards and floppy drives of the virtual machine, setting the device type of the CD/DVD driver as client equipment, and converting the virtual machine into a template, namely the template selected when the Windows operating system virtual machine of the version is created through a cloud platform.
(3) The interface packaging process for creating the virtual machine is as follows, and the virtual machine resource operation interface of the vCenter management platform is packaged based on Vmware api for calling when the virtual machine is operated by the cloud platform. For the interface for creating the virtual machine, accepting the virtual machine password input by the user as an entry parameter: calling VMware api to create a virtual machine, starting the virtual machine after the virtual machine is successfully created, using a default username and password in a known template to log in an interface after VMware Tools are started, and not setting the password if the default username and password authentication is not passed; after the authentication is passed, executing a command for setting a password, namely setting the password input by the user as a new password of the virtual machine; after the execution is finished, the user name and the new password are used for carrying out interface login verification, whether the new password is successfully set or not is verified, if the new password is not successfully set, the execution can be carried out again, the retry is carried out for 3 times, if the password is not successfully set after the retry, a prompt that the password is failed to set is returned, and the password can be reset.
(4) The method comprises the steps that when a virtual machine created based on a Windows operating system template is created through a cloud platform, a login password can be set, the cloud platform obtains the password input by a user, an interface for creating the virtual machine is called to create, after creation is completed, the password of the virtual machine can be set, the virtual machine is successfully created, namely the initial password is successfully set, after creation is successful, the input password can be used for login, and meanwhile, the SID in the virtual machine is unique.
According to the method, when the Windows operating system virtual machine is created on the ESXI host through the cloud platform, the problem of repeated SIDs can be solved, and automatic setting of the designated password can be completed.
As shown in fig. 1, the method is implemented as follows:
1) creating a virtual machine on an ESXI host managed by the zCenter through a cloud platform;
2) appointing a login password of the virtual machine;
3) judging whether the virtual machine is successfully established; if the creation fails, returning a prompt of password setting failure to reset the password;
4) if the creation is successful, starting the virtual machine and waiting for Vmtools to start;
5) entering a newly-built virtual machine through a username and a password of the template to execute a command for setting the password;
6) judging whether the password is successfully set, and if so, logging in by using the input password;
7) if the password setting is unsuccessful, retry is carried out for 3 times, if the password setting is unsuccessful after retry, a prompt of password failure is returned, and the password is reset.
The above-described embodiments are merely preferred embodiments of the present invention, and general changes and substitutions by those skilled in the art within the technical scope of the present invention are included in the protection scope of the present invention.
Claims (10)
1. A method for automatically setting passwords for a virtual machine of a Windows operating system is characterized by comprising the following steps:
selecting a windows operating system template through a cloud platform to create a virtual machine, and inputting a login password to be set;
and calling an interface for creating the virtual machine, creating a plurality of virtual machines with different SIDs through the same windows operating system template, and logging in by using the input login password.
2. The method of claim 1, wherein the making of the Windows os template comprises saving an auto-answer file to a specific directory and specifying the auto-answer file to execute a sysprep command.
3. The method of claim 2, wherein the auto-answer script is an auto-answer script of the Windows operating system, and is used to complete default settings of the Windows system configuration.
4. The method for automatically setting the password for the virtual machine of the Windows operating system according to claim 2 or 3, wherein the automatic response script completes the automatic response when initially logging in the system in the oobeSystempart set in the Windows system, automatically activates the administeror user, and sets a login password, wherein the login password is a password used for logging in the virtual machine in a subsequent program.
5. The method for automatically setting the password for the virtual machine of the Windows operating system as claimed in claim 4, wherein the auto-answer script is used when logging in the system for the first time, so that the welcome interface is skipped when entering for the first time, the default Windows system setting is completed, and the user name and password input interface is entered.
6. The method for automatically setting the password for the virtual machine of the Windows operating system as claimed in claim 4, wherein the Windows operating system template making process comprises the following steps:
creating a virtual machine by mounting an ISO file or a mirror image file of a corresponding operating system, and carrying out system installation;
after the system is successfully installed, VMware Tools are installed, the automatic response file is stored in a specific directory, and other configurations of the virtual machine are carried out according to requirements;
after configuration is completed, designating the automatic response file to execute a sysprep command;
after the sysprep command is executed, deleting system specific data including SID information from Windows installation, and then automatically shutting down the system;
and after the system is completely shut down, deleting all network cards and floppy drives of the virtual machine, setting the device type of the CD/DVD driver as client equipment, and converting the virtual machine into a template, wherein the template is selected when the Windows operating system virtual machine of the version is created through a cloud platform.
7. The method for automatically setting the password for the virtual machine of the Windows operating system according to claim 6, wherein the interface for creating the virtual machine is a virtual machine resource operation interface of a vCenter management platform packaged based on Vmware api, and is called when the virtual machine is operated by the cloud platform.
8. The method for automatically setting the password for the virtual machine of the Windows operating system as claimed in claim 7, wherein the encapsulating process for creating the interface of the virtual machine includes the following steps:
the interface for creating the virtual machine accepts the virtual machine password input by the user as the access parameter, and the virtual machine is created by calling the vmware api;
after the virtual machine is successfully established, starting up the virtual machine, and after VMware Tools are started, using a user name and a password in the Windows operating system template to carry out interface login;
if the default user name and password authentication is not passed, password setting is not carried out;
after the authentication is passed, executing a command for setting a password, and setting the password input by the user as a new password of the virtual machine;
and after the execution is finished, performing interface login verification by using the user name and the new password, and verifying whether the new password is successfully set.
9. The method for automatically setting the password for the virtual machine of the Windows operating system as claimed in claim 8, wherein the process of verifying whether the new password is successfully set further comprises:
if the password setting is unsuccessful, the password resetting operation can be executed again for retry, and if the password setting is unsuccessful after retry, a prompt for password setting failure is returned, and the password resetting operation can be carried out.
10. The method for automatically setting the password for the virtual machine of the Windows operating system according to claim 8, wherein the method can set a login password when the virtual machine is created based on the template of the Windows operating system through the cloud platform, the cloud platform obtains the password input by the user, calls an interface of the created virtual machine, creates the virtual machine of the cloud server, and sets the password of the virtual machine after the creation is completed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110131019.XA CN112835680A (en) | 2021-01-30 | 2021-01-30 | Method for automatically setting password of Windows operating system virtual machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110131019.XA CN112835680A (en) | 2021-01-30 | 2021-01-30 | Method for automatically setting password of Windows operating system virtual machine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112835680A true CN112835680A (en) | 2021-05-25 |
Family
ID=75932603
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110131019.XA Pending CN112835680A (en) | 2021-01-30 | 2021-01-30 | Method for automatically setting password of Windows operating system virtual machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112835680A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114710355A (en) * | 2022-04-11 | 2022-07-05 | 西安万像电子科技有限公司 | Login management method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104484209A (en) * | 2014-12-23 | 2015-04-01 | 国云科技股份有限公司 | Method for automatically accessing mirror image of Windows virtual machine |
CN105653342A (en) * | 2016-02-01 | 2016-06-08 | 福建升腾资讯有限公司 | Method and system for achieving automatic domain entering of Windows pool desktop |
US20180293083A1 (en) * | 2017-04-10 | 2018-10-11 | Hongfujin Precision Electronics (Tianjin) Co.,Ltd. | Virtual desktop system and method of control |
CN109391615A (en) * | 2018-09-27 | 2019-02-26 | 深圳互联先锋科技有限公司 | A kind of server exempts from close login method and system |
-
2021
- 2021-01-30 CN CN202110131019.XA patent/CN112835680A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104484209A (en) * | 2014-12-23 | 2015-04-01 | 国云科技股份有限公司 | Method for automatically accessing mirror image of Windows virtual machine |
CN105653342A (en) * | 2016-02-01 | 2016-06-08 | 福建升腾资讯有限公司 | Method and system for achieving automatic domain entering of Windows pool desktop |
US20180293083A1 (en) * | 2017-04-10 | 2018-10-11 | Hongfujin Precision Electronics (Tianjin) Co.,Ltd. | Virtual desktop system and method of control |
CN109391615A (en) * | 2018-09-27 | 2019-02-26 | 深圳互联先锋科技有限公司 | A kind of server exempts from close login method and system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114710355A (en) * | 2022-04-11 | 2022-07-05 | 西安万像电子科技有限公司 | Login management method and system |
CN114710355B (en) * | 2022-04-11 | 2024-05-17 | 西安万像电子科技有限公司 | Login management method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10462186B2 (en) | Secure configuration evaluation, remediation, and reporting tool (SCERRT) | |
CN106708597A (en) | Method, device and system for creating cluster environment on the basis of Openstack | |
CN106656927B (en) | Method and device for adding Linux account into AD domain | |
US11171824B2 (en) | Configuration of computing devices via containers | |
CN110958217B (en) | Method and device for remotely controlling server, computer equipment and storage medium | |
CN110750415B (en) | Interface service configuration method, device, medium and computer equipment | |
CN112148315A (en) | Software deployment method, device, server and storage medium | |
CN104702624A (en) | Method and system for logging virtual machine based on Cloud Stack platform | |
CN105373417A (en) | Method and system for virtual machine management in cloud computing | |
CN112835680A (en) | Method for automatically setting password of Windows operating system virtual machine | |
CN109992295B (en) | Version management method and server | |
CN115113972A (en) | Application transformation method, system, cluster, medium and program product | |
CN105653342A (en) | Method and system for achieving automatic domain entering of Windows pool desktop | |
CN116627595A (en) | Virtual machine creation method and related components | |
CN110134546B (en) | Batch restarting windows system method, electronic device and storage medium | |
CN115357258B (en) | Application deployment method and device, storage medium and electronic device | |
US20240214220A1 (en) | Implementation Method and Apparatus for Increasing Number of Certificates Supported by PIV Application | |
CN114095498B (en) | Cluster environment deployment method, system, computer equipment and storage medium | |
CN112783609A (en) | Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host | |
CN115499413A (en) | Method and system for batch configuration of fixed IP addresses of virtual machines based on KVM | |
CN114827133A (en) | Application software management method and device and computer | |
CN108375964A (en) | A kind of dialog mode device management method and device | |
CN110851516B (en) | Host operation control system and method | |
CN110688170B (en) | Operation station operation optimization device and method | |
CN111090851A (en) | Method and device for resetting virtual machine authentication information, host machine and storage medium |
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: 20210525 |