CN112783609A - Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host - Google Patents

Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host Download PDF

Info

Publication number
CN112783609A
CN112783609A CN202110131021.7A CN202110131021A CN112783609A CN 112783609 A CN112783609 A CN 112783609A CN 202110131021 A CN202110131021 A CN 202110131021A CN 112783609 A CN112783609 A CN 112783609A
Authority
CN
China
Prior art keywords
password
virtual machine
file
iso
resetting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110131021.7A
Other languages
Chinese (zh)
Inventor
彭海燕
于昊
田雨
蒋善坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202110131021.7A priority Critical patent/CN112783609A/en
Publication of CN112783609A publication Critical patent/CN112783609A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The invention discloses a method for automatically resetting a password for a virtual machine on an ESXI host, which comprises the steps of generating a corresponding ISO file for setting the password by packaging an interface for resetting the password, acquiring an input new password through a cloud platform when the password is reset, and calling the interface for resetting the password to complete the resetting of the password of the virtual machine on the ESXI host. The method can automatically reset the password for the virtual machine on the ESXI host through the cloud platform, and after the user forgets the password of the established virtual machine, the password can be reset through the cloud platform, so that the data of the virtual machine is not influenced, the virtual machine can be continuously available, and convenience is brought to the user; the reset password is effective when the computer is restarted, and the user can sense the reset password in the implementation process, so that the operation safety is improved.

Description

Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host
Technical Field
The invention relates to the technical field of virtual machines, and particularly provides a method for automatically resetting passwords for a virtual machine on an ESXI host.
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 order to ensure the safety of the use of the virtual machine, a user sets a password for the virtual machine, and the legality of the user identity is determined through the correctness of the password during login. However, if the user forgets the password of the virtual machine, the user cannot log in the virtual machine to operate, and at this time, the user needs to reset the password for the virtual machine. The password cracking tool can be used for violently cracking the password of the virtual machine, the method is troublesome to operate, and inconvenience is brought to a user.
Disclosure of Invention
The invention provides a method for automatically resetting a password for a virtual machine on an ESXI host in order to solve the problems. The cloud platform automatically resets the password for the virtual machine on the ESXI host, so that the user can reset the password through the method after forgetting the password of the virtual machine of the user, and the user can log in the virtual machine again through the new password to operate.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for automatically resetting a password for a virtual machine on an ESXI host comprises the steps of generating a corresponding ISO file for setting the password by packaging an interface for resetting the password, acquiring an input new password through a cloud platform when the password is reset, calling the interface for resetting the password, and completing the resetting of the password of the virtual machine on the ESXI host, so that a user can reset the password through the cloud platform after forgetting the password of the virtual machine of the user, and log in the virtual machine again for operation by using the new password.
The interface packaging process of the reset password comprises the following steps:
generating a corresponding execution file for setting the password according to different operating systems, and then generating a corresponding ISO file through the execution file;
mounting the ISO file on a shutdown virtual machine with a password to be reset;
after the virtual machine is started, the system processes the mounted ISO through the self-starting script, and then unloads and deletes the ISO.
The self-starting script writes and processes ISO equipment on the virtual machine according to different operating systems, and the specific processing process comprises the following steps:
firstly, mounting ISO equipment to a specified path or entering a mounted disk path to obtain an execution file with a specified name;
then judging whether the content in the execution file is only a command for setting the password, if not, not executing the execution file, and if so, executing the command for setting the password;
and after the execution is not carried out or is finished, clearing the newly added path or file during the operation.
When the password of the virtual machine created based on the operating system template of the virtual machine is reset through the cloud platform, the cloud platform obtains a new password input by a user, calls the packaged interface to reset the password, and prompts the user whether the password is reset successfully or not according to interface return information; and if the password is failed, resetting the password again through the cloud platform.
The manufacturing process of the operating system template of the virtual machine 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, and the self-starting script is added to the self-starting directory of the corresponding system;
then, other configurations of the virtual machine are carried out according to requirements;
and after the configuration is finished, clearing the operation records to finish the manufacture of the virtual machine operation system template.
The virtual machine established based on the operating system template supports the function of resetting the password, the self-starting script supporting the function of resetting the password in the virtual machine is reserved under the self-starting catalog and cannot be deleted, and if the self-starting script is deleted, the function is not effective when the password is subsequently reset.
The reset password interface accepts the new password input by the user as the input parameter, and the interface packaging process comprises the following steps:
1) generating an ISO file: setting different commands for resetting the password according to different operating systems, generating a corresponding command for setting the password according to the type of the operating system, writing the command into a corresponding execution file with a specified name, and then generating a corresponding ISO file through the execution file;
2) uploading an ISO file: acquiring a storage list accessible by the virtual machine, uploading the generated ISO file to a certain storage accessible by the virtual machine, and recording a storage path of the ISO file;
3) closing the virtual machine: shutting down the virtual machine;
4) mounting an ISO file: according to the storage path of the ISO file, mounting the ISO file on the virtual machine, and waiting for the completion of mounting;
5) starting the virtual machine: starting up the virtual machine;
6) and starting VMware Tools, automatically executing a self-starting script placed in the virtual machine, processing the mounted ISO file according to logic in the script, and finishing setting a new password.
The method comprises the steps of performing interface login authentication by using a user name and a new password, and judging whether the password is successfully set or not according to a corresponding return value given by an authentication result.
After the password is reset, the method unloads and deletes the ISO file: whether the password resetting operation is successful or failed or other abnormal steps exist in the middle, whether the virtual machine has the ISO file mounted or not is judged; if so, it is unloaded and removed from its store.
The method comprises the following steps:
1) a password needing to be reset is appointed to the virtual machine;
2) generating a corresponding ISO file and uploading the ISO file to an accessible storage;
3) mounting the ISO file on a virtual machine;
4) starting VMware Tools, processing the mounted ISO file, and finishing the setting of a new password;
5) whether the password is reset successfully or not is judged through the prompt of the cloud platform;
6) detecting whether the ISO file is mounted or not, and unloading the ISO file if the ISO file is mounted;
7) and detecting whether the ISO file exists, and deleting the ISO file if the ISO file exists.
Compared with the prior art, the method for automatically resetting the password for the virtual machine on the ESXI host has the following outstanding beneficial effects:
the method can automatically reset the password for the virtual machine on the ESXI host through the cloud platform, and after the user forgets the password of the established virtual machine, the password can be reset through the cloud platform, so that the data of the virtual machine is not influenced, the virtual machine can be continuously available, and convenience is brought to the user; the reset password is effective when the computer is restarted, and the user can sense the reset password in the implementation process, so that the operation safety is improved.
Drawings
FIG. 1 is a flow chart of the method for resetting the password of the virtual machine.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
A method for automatically resetting a password for a virtual machine on an ESXI host, the method comprising the steps of:
according to different operating systems, writing a corresponding specific self-starting script, and verifying whether the script is only the operation of resetting the password;
creating a virtual machine, adding a specific self-starting execution script, then configuring the virtual machine, and completing template making;
packaging an interface with a password resetting function, namely generating a corresponding execution file for setting the password according to different operating systems, then generating a corresponding ISO file through the execution file, mounting the ISO file on a shutdown virtual machine with the password to be reset, after the virtual machine is started, processing the mounted ISO by a self-starting script, and then unloading and deleting the ISO;
the password is reset to the virtual machine through the cloud platform, the cloud platform obtains the input new password, an interface for resetting the password is called, and automatic resetting of the password of the virtual machine is completed.
The self-starting script is used for creating different self-starting scripts according to different operating systems, and is mainly used for processing ISO equipment on a virtual machine, if the ISO equipment exists, the equipment is mounted, whether the mounted equipment is a file with a specified name or not is checked, whether the file is only a command for setting a password or not is checked, and if the ISO equipment does not pass the check, the self-starting script is not executed; if the check is passed, executing a command for setting a password; and then clearing the newly added path or file during operation.
The packaging process of the interface of the reset password function comprises the following steps: generating a corresponding execution file for setting the password according to the type of the operating system, and then obtaining a corresponding ISO file according to the execution file; uploading the ISO file to storage accessible by the virtual machine; closing the virtual machine and mounting the ISO file on the virtual machine; starting the virtual machine, and waiting for VMware Tools to be started, wherein the self-starting script can process the mounted ISO file; judging whether the password is successfully set; uninstall ISO and delete it from its storage.
As shown in fig. 1, the method is implemented as follows:
1) a password needing to be reset is appointed to the virtual machine;
2) generating a corresponding ISO file; uploading to an accessible store;
3) after the virtual machine is shut down, mounting the ISO file on the virtual machine;
4) starting the virtual machine, starting VMware Tools, processing the mounted ISO file, and finishing the setting of a new password;
5) whether the password is reset successfully or not is judged through the prompt of the cloud platform;
6) detecting whether the ISO file is mounted or not, and unloading the ISO file if the ISO file is mounted;
7) and detecting whether the ISO file exists, and deleting the ISO file if the ISO file exists.
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 resetting a password for a virtual machine on an ESXI host, comprising: the method comprises the steps of generating a corresponding ISO file for setting the password by packaging an interface for resetting the password, acquiring an input new password through a cloud platform when the password is reset, and calling the interface for resetting the password to complete the resetting of the password of the virtual machine on the ESXI host.
2. The method of claim 1, wherein the interface encapsulation process for resetting the password comprises:
generating a corresponding execution file for setting the password according to different operating systems, and then generating a corresponding ISO file through the execution file;
mounting the ISO file on a shutdown virtual machine with a password to be reset;
after the virtual machine is started, the system processes the mounted ISO through the self-starting script, and then unloads and deletes the ISO.
3. The method of claim 2, wherein the self-starting script is written according to different operating systems to process ISO devices on the virtual machines, and the specific processing procedure comprises:
firstly, mounting ISO equipment to a specified path or entering a mounted disk path to obtain an execution file with a specified name;
then judging whether the content in the execution file is only a command for setting the password, if not, not executing the execution file, and if so, executing the command for setting the password;
and after the execution is not carried out or is finished, clearing the newly added path or file during the operation.
4. The method for automatically resetting the password for the virtual machine on the ESXI host according to claim 3, wherein the method resets the password for the virtual machine created based on the operating system template of the virtual machine through the cloud platform, calls the encapsulated interface to reset the password according to the new password input by the user acquired by the cloud platform, and prompts the user whether the password resetting is successful or not according to the interface return information; and if the password is failed, resetting the password again through the cloud platform.
5. The method of claim 4, wherein the operating system template creation process for the virtual machine comprises:
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, and the self-starting script is added to the self-starting directory of the corresponding system;
then, other configurations of the virtual machine are carried out according to requirements;
and after the configuration is finished, clearing the operation records to finish the manufacture of the virtual machine operation system template.
6. The method of claim 5, wherein the virtual machine created based on the operating system template supports a function of resetting the password, and wherein a self-boot script in the virtual machine that supports the function of resetting the password is retained in a self-boot directory.
7. The method of claim 6, wherein the reset password interface accepts a new password entered by a user as an entry, and the interface encapsulation process comprises:
1) generating an ISO file: setting different commands for resetting the password according to different operating systems, generating a corresponding command for setting the password according to the type of the operating system, writing the command into a corresponding execution file with a specified name, and then generating a corresponding ISO file through the execution file;
2) uploading an ISO file: acquiring a storage list accessible by the virtual machine, uploading the generated ISO file to a certain storage accessible by the virtual machine, and recording a storage path of the ISO file;
3) closing the virtual machine;
4) mounting an ISO file: according to the storage path of the ISO file, mounting the ISO file on the virtual machine;
5) starting the virtual machine;
6) VMware Tools initiation: and automatically executing the self-starting script placed in the virtual machine, processing the mounted ISO file according to the logic in the script, and finishing the setting of the new password.
8. The method of claim 7, wherein the method performs interface login authentication by using a user name and a new password, and determines whether the password is successfully set according to a corresponding return value given by the authentication result.
9. A method for automatically resetting a password for a virtual machine on an ESXI host machine according to claim 7 or 8, wherein: the method is characterized in that when the ISO file is unloaded and deleted: whether the password resetting operation is successful or failed or other abnormal steps exist in the middle, whether the virtual machine has the ISO file mounted or not is judged; if so, it is unloaded and removed from its store.
10. A method of automatically resetting a password for a virtual machine on an ESXI host machine according to claim 9, wherein: the method comprises the following steps:
1) a password needing to be reset is appointed to the virtual machine;
2) generating a corresponding ISO file and uploading the ISO file to an accessible storage;
3) mounting the ISO file on a virtual machine;
4) starting VMware Tools, processing the mounted ISO file, and finishing the setting of a new password;
5) whether the password is reset successfully or not is judged through the prompt of the cloud platform;
6) detecting whether the ISO file is mounted or not, and unloading the ISO file if the ISO file is mounted;
7) and detecting whether the ISO file exists, and deleting the ISO file if the ISO file exists.
CN202110131021.7A 2021-01-30 2021-01-30 Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host Pending CN112783609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110131021.7A CN112783609A (en) 2021-01-30 2021-01-30 Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110131021.7A CN112783609A (en) 2021-01-30 2021-01-30 Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host

Publications (1)

Publication Number Publication Date
CN112783609A true CN112783609A (en) 2021-05-11

Family

ID=75760095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110131021.7A Pending CN112783609A (en) 2021-01-30 2021-01-30 Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host

Country Status (1)

Country Link
CN (1) CN112783609A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312149A (en) * 2021-06-18 2021-08-27 浪潮云信息技术股份公司 Password resetting method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015027852A1 (en) * 2013-08-30 2015-03-05 Tencent Technology (Shenzhen) Company Limited Method and apparatus for resetting a user-login password for a virtual machine
CN105159750A (en) * 2015-09-14 2015-12-16 浪潮集团有限公司 Virtual machine creation method and apparatus
CN105589722A (en) * 2015-12-23 2016-05-18 浪潮集团有限公司 Method for initializing user name and password of virtual machine based on virtual machine template
WO2017166785A1 (en) * 2016-04-01 2017-10-05 华为技术有限公司 Method for deploying virtual machines, host machine, and system
CN107579823A (en) * 2017-10-10 2018-01-12 郑州云海信息技术有限公司 A kind of virtual machine entry password remapping method and device
CN108829490A (en) * 2018-04-13 2018-11-16 广东睿江云计算股份有限公司 A kind of method of cloud platform resetting KVM virtualization platform Linux virtual machine password
CN110968852A (en) * 2019-12-20 2020-04-07 深信服科技股份有限公司 Virtual machine password management method, system, equipment and computer storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015027852A1 (en) * 2013-08-30 2015-03-05 Tencent Technology (Shenzhen) Company Limited Method and apparatus for resetting a user-login password for a virtual machine
CN105159750A (en) * 2015-09-14 2015-12-16 浪潮集团有限公司 Virtual machine creation method and apparatus
CN105589722A (en) * 2015-12-23 2016-05-18 浪潮集团有限公司 Method for initializing user name and password of virtual machine based on virtual machine template
WO2017166785A1 (en) * 2016-04-01 2017-10-05 华为技术有限公司 Method for deploying virtual machines, host machine, and system
CN107579823A (en) * 2017-10-10 2018-01-12 郑州云海信息技术有限公司 A kind of virtual machine entry password remapping method and device
CN108829490A (en) * 2018-04-13 2018-11-16 广东睿江云计算股份有限公司 A kind of method of cloud platform resetting KVM virtualization platform Linux virtual machine password
CN110968852A (en) * 2019-12-20 2020-04-07 深信服科技股份有限公司 Virtual machine password management method, system, equipment and computer storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312149A (en) * 2021-06-18 2021-08-27 浪潮云信息技术股份公司 Password resetting method

Similar Documents

Publication Publication Date Title
CN112256558B (en) Test case generation method and device, computer equipment and storage medium
CN106656927B (en) Method and device for adding Linux account into AD domain
US11171824B2 (en) Configuration of computing devices via containers
US10817211B2 (en) Method for completing a secure erase operation
US7007195B2 (en) BIOS shadowed small-print hard disk drive as robust, always on, backup for hard disk image & software failure
CN112783609A (en) Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host
CN107220085B (en) Method for automatically upgrading RAID card firmware
CN110134546B (en) Batch restarting windows system method, electronic device and storage medium
CN112559352A (en) Interface test method, device, equipment and storage medium
CN112835680A (en) Method for automatically setting password of Windows operating system virtual machine
CN112214231A (en) CI-based virtualized software upgrade package generation method and system
CN114443166B (en) Shared file processing method, device and medium
CN107392010B (en) Root operation execution method and device, terminal equipment and storage medium
CN107222355B (en) Server upgrading method and device
CN112463042B (en) Data volume import data verification method, device, terminal and storage medium
CN112148597B (en) Method for eliminating iOS device authorization dialog box, test method and storage medium
CN110851516B (en) Host operation control system and method
CN113868639A (en) Linux system reinforcing method and device, computer equipment and storage medium
CN113467893A (en) Virtual machine automation test method and device, storage medium and processor
CN112527371A (en) Boot loader upgrading method and device, electronic equipment and storage medium
CN114880157B (en) Fault injection method and device
CN115617489B (en) Operating system migration method, migration application and migration application deployment method
CN117130672A (en) Server start flow control method, system, terminal and storage medium
CN115576626A (en) Method, device and storage medium for safe mounting and dismounting of USB (Universal Serial bus) device
CN112115458A (en) Embedded system for automatically setting and verifying file attribute and authority

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

Application publication date: 20210511

RJ01 Rejection of invention patent application after publication