CN105589722A - Method for initializing user name and password of virtual machine based on virtual machine template - Google Patents

Method for initializing user name and password of virtual machine based on virtual machine template Download PDF

Info

Publication number
CN105589722A
CN105589722A CN201510980548.1A CN201510980548A CN105589722A CN 105589722 A CN105589722 A CN 105589722A CN 201510980548 A CN201510980548 A CN 201510980548A CN 105589722 A CN105589722 A CN 105589722A
Authority
CN
China
Prior art keywords
virtual machine
template
user name
password
iso
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
CN201510980548.1A
Other languages
Chinese (zh)
Inventor
李栋梁
赵仁明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Group Co Ltd
Original Assignee
Inspur Group 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 Group Co Ltd filed Critical Inspur Group Co Ltd
Priority to CN201510980548.1A priority Critical patent/CN105589722A/en
Publication of CN105589722A publication Critical patent/CN105589722A/en
Pending legal-status Critical Current

Links

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/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • 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/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • 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

Abstract

The invention provides a method for initializing the user name and the password of a virtual machine based on a virtual machine template, and relates to the field of cloud computing. The method comprises the steps of packaging the user name and password information uploaded by a foreground into an ISO file; and inserting a virtual drive after the virtual machine is established by using the template, wherein after starting up, the virtual machine automatically calls the file in the ISO to set the user name and the password of the virtual machine. The method is optimized based on the prior art, thus the run time can be completed within 30 seconds.

Description

A kind of method of the initialization virtual machine user name password based on virtual machine template
Technical field
The present invention relates to cloud computing field, relate in particular to a kind of initialization virtual machine user based on virtual machine templateThe method of name password.
Background technology
Cloud computing (cloudcomputing) be the related service based on internet increase, use and pay mouldFormula, being usually directed to is provided dynamically easily expansion and is often virtualized resource by internet. Cloud computing is logicalCross and make Computation distribution on a large amount of distributed computers, but not in local computer or remote server, enterpriseThe operation of data center will be more similar to internet. This makes the enterprise can be by resource switch to the application of needs,Access computer and storage system according to demand. At present virtual is a kind of mainstream technology that realizes cloud computing.
Virtual (Virtualization) is the term of a broad sense, refers to that computing element is on virtual basisThe upper operation in upper instead of real basis, be one for streamlining management, optimize the solution of resource. AsSpacious, penetrating office building, the wall that whole floor is not fixed, user can construct with same costMore autonomous applicable working space, and then save cost, performance space peak use rate.
The cloud platform of current use Intel Virtualization Technology on the market has two kinds of modes to create virtual machine substantially:
(1) create blank virtual machine, then client manually inserts ISO file, installing operating system;
(2) create virtual machine by template way, in template, from tape operation system, client does not need manual installation.
First kind of way is more flexible, and client can independently arrange system, but threshold is relatively high, more complicated.The second way is relatively convenient, but underaction, as virtual machine user name password etc. cannot be before installationConfirm.
Summary of the invention
For the above second way, the present invention proposes a kind of initialization virtual machine based on virtual machine template and useThe method of name in an account book password.
The present invention adopts and creates ISO file and insert virtual machine CD-ROM drive → virtual machine carry ISO → virtual machine and carry outInitialize user's script three steps and realize initialization virtual machine user name password.
User name, encrypted message that foreground is uploaded are encapsulated into ISO file, and use template establishment to complete at virtual machineRear insertion virtual drive, the file in can Automatically invoked ISO after virtual machine start, arrange virtual machine user name,Password.
Need to first make template, derivation template after template construct completes, is used the mould creating while creating virtual machinePlate creates virtual machine.
The self-triggered program of Linux virtual machine based on (SuSE) Linux OS, first carry ISO, carries out respective footThis.
Use virtual machine template and insert ISO file mode, ensure the correct transmission of parameter and call.
Windows virtual machine, based on CloudBase-Init, is revised wherein correlative code, makes it need local tuneWith adding user, user cipher plug-in unit being set, initialize virtual machine user name password.
The self-triggered program of Linux virtual machine based on (SuSE) Linux OS, first carry ISO, carries out respective footThis.
The invention has the beneficial effects as follows.
Windows virtual machine uses CloudBase-Init to initialize virtual machine user name password, stillThe time of implementation of CloudBase-Init acquiescence approximately needs 10 minutes. This method is optimized it, makes operationTime can complete in 30 seconds.
This method is not only applicable to initialize virtual machine user name password, under host name setting, Linux, upgradesThe local cache of apt-get, the size of adjustment file system also can adopt the method.
Brief description of the drawings
Fig. 1 is request flow chart of the present invention.
Detailed description of the invention
Content of the present invention is carried out to more detailed elaboration below:
(1) template construct
Window template:
1, installCloudBaselnit
2, enter C:/ProgramFiles/CloudbaseSolutions/Cloudbase-lnit/config, amendmentCloudbase-init-unattend,coNf file, willmetadataservicesBe revised asmetadata_services=cloudbaseinit.metadata.service.configdriver.ConfigDriveServiceAnd delete next
3, enter C:/ProaramFiles/Cloudbasesolutions/Cloudbase-lnit/Python/Lib/site-Packages/cloudbaseinit/utils catalogue, amendment network.py: by MAX_URL_CHECK_RETRIES=3,Be revised as MAX_URL_CHECK_RETRIES=O
4, the new compiling of electricity network.py file python-m after amendmentpycompilenetwork.py
5, amendment factory.py enters C:/ProgramFiles/Clpudbasesolutions/Cloubase-Init/Python/Lib/site-packages/cloudbaseinit/plugins, amendment factory, py, by default in optsContent only retainsUserDataPluginWithSetUserPasswordPlugin, all the other deletions. Recompilate factory.py
6, amendment init.py. enters C:/ProgramFiles/Cloudbasesolutions/Cloudbase-Init/Python/Lib/site-packages/cloudbseinitCatalogue, amendment init.py, willconfigurehosIn t functionself.checklatestversion() and if partial content are below deleted
7, enter C:/ProgramFiles/Cloudbasesolutions/Cloudbase-init/Python/Lib/site-Packages/cloudbaseinit/metadata/ catalogue, amendment factory.py file, in the default in optsHold and deleteHttpServive, recompilate.
Attention: need use keeper to enter dos when compiling; When compiling, usecloudbaseThe python carrying, does not fill againpython!!!!
When revised file, may not under current directory, preserve, need be saved in behind other positions again copy to current directory.And then compiling
Linux template (taking centos as example)
1, newly-built/mnt/media catalogue, gives authority 777
2, amendment/etc/rc.d/rc.local file, adds following content:
mount-tiso9660-oloop/dev/cdrom/mnt/media
cat</mnt/media/openstack/latest/meta_data.json|xargs-n1useradd-m
chpasswd</mnt/media/openstack/latest/user_data
pwconv
3, use ln threaded file: enter/etc/rc2.d catalogue, is used ln-s/etc/init.d/cloudInitUser.sh.S99InitUser
Derivation template after template construct completes.
(2) create virtual machine
While creating virtual machine, use the template establishment virtual machine creating, and fill in user name, password, request is pressedAccompanying drawing 1 flow performing, can realize the initialization of user name password.

Claims (3)

1. the method for the initialization virtual machine user name password based on virtual machine template, it is characterized in that, user name, encrypted message that foreground is uploaded are encapsulated into ISO file, and after using template establishment to complete, virtual machine inserts virtual drive, file after virtual machine start in meeting Automatically invoked ISO, arranges virtual machine user name, password.
2. method according to claim 1, is characterized in that, first makes template, and derivation template after template construct completes is used the template establishment virtual machine creating while creating virtual machine.
3. method according to claim 2, is characterized in that, the self-triggered program of Linux virtual machine based on (SuSE) Linux OS, and first carry ISO, carries out corresponding scripts.
CN201510980548.1A 2015-12-23 2015-12-23 Method for initializing user name and password of virtual machine based on virtual machine template Pending CN105589722A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510980548.1A CN105589722A (en) 2015-12-23 2015-12-23 Method for initializing user name and password of virtual machine based on virtual machine template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510980548.1A CN105589722A (en) 2015-12-23 2015-12-23 Method for initializing user name and password of virtual machine based on virtual machine template

Publications (1)

Publication Number Publication Date
CN105589722A true CN105589722A (en) 2016-05-18

Family

ID=55929328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510980548.1A Pending CN105589722A (en) 2015-12-23 2015-12-23 Method for initializing user name and password of virtual machine based on virtual machine template

Country Status (1)

Country Link
CN (1) CN105589722A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529241A (en) * 2016-11-18 2017-03-22 郑州云海信息技术有限公司 Virtual machine user account and password resetting method and system
CN107038062A (en) * 2017-04-17 2017-08-11 广东浪潮大数据研究有限公司 A kind of virtual machine initial method and device based on cloud platform
CN107239322A (en) * 2017-08-02 2017-10-10 郑州云海信息技术有限公司 A kind of virtual machine starts method and apparatus
CN107391665A (en) * 2017-07-20 2017-11-24 郑州云海信息技术有限公司 The creation method and device of a kind of database instance
WO2018157787A1 (en) * 2017-03-03 2018-09-07 华为技术有限公司 Password initialization method for preset account and related device
CN109213532A (en) * 2018-09-14 2019-01-15 山东浪潮云投信息科技有限公司 A kind of virtual machine network initial method based on shell script
CN112783609A (en) * 2021-01-30 2021-05-11 浪潮云信息技术股份公司 Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008019380A2 (en) * 2006-08-07 2008-02-14 Bea Systems, Inc. System and method for providing hardware virtualization in a virtual machine environment
US20100235482A1 (en) * 2009-03-13 2010-09-16 Andreas Chalupa Virtual Appliance Automation Tool
CN102088367A (en) * 2010-12-10 2011-06-08 北京世纪互联工程技术服务有限公司 Method for quickly deploying in virtualization environment
CN102567075A (en) * 2011-12-05 2012-07-11 中标软件有限公司 Virtual machine context setting method in cloud computing environment
CN103986662A (en) * 2014-05-22 2014-08-13 浪潮电子信息产业股份有限公司 Cross-virtualization-platform virtual router achieving method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008019380A2 (en) * 2006-08-07 2008-02-14 Bea Systems, Inc. System and method for providing hardware virtualization in a virtual machine environment
US20100235482A1 (en) * 2009-03-13 2010-09-16 Andreas Chalupa Virtual Appliance Automation Tool
CN102088367A (en) * 2010-12-10 2011-06-08 北京世纪互联工程技术服务有限公司 Method for quickly deploying in virtualization environment
CN102567075A (en) * 2011-12-05 2012-07-11 中标软件有限公司 Virtual machine context setting method in cloud computing environment
CN103986662A (en) * 2014-05-22 2014-08-13 浪潮电子信息产业股份有限公司 Cross-virtualization-platform virtual router achieving method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529241A (en) * 2016-11-18 2017-03-22 郑州云海信息技术有限公司 Virtual machine user account and password resetting method and system
WO2018157787A1 (en) * 2017-03-03 2018-09-07 华为技术有限公司 Password initialization method for preset account and related device
CN107038062A (en) * 2017-04-17 2017-08-11 广东浪潮大数据研究有限公司 A kind of virtual machine initial method and device based on cloud platform
CN107391665A (en) * 2017-07-20 2017-11-24 郑州云海信息技术有限公司 The creation method and device of a kind of database instance
CN107239322A (en) * 2017-08-02 2017-10-10 郑州云海信息技术有限公司 A kind of virtual machine starts method and apparatus
CN109213532A (en) * 2018-09-14 2019-01-15 山东浪潮云投信息科技有限公司 A kind of virtual machine network initial method based on shell script
CN112783609A (en) * 2021-01-30 2021-05-11 浪潮云信息技术股份公司 Method for automatically resetting password for virtual machine on ESXI (electronic service organization) host

Similar Documents

Publication Publication Date Title
CN105589722A (en) Method for initializing user name and password of virtual machine based on virtual machine template
US11340927B2 (en) Application-based computing resource management
US10827008B2 (en) Integrated user interface for consuming services across different distributed networks
CN106462467B (en) Integrated API and UI for consuming services over different distributed networks
US10958633B2 (en) Method and system for securely transmitting volumes into cloud
US9720800B2 (en) Auto-generating representational state transfer (REST) services for quality assurance
US20090260005A1 (en) System and method for providing service
US10922445B2 (en) Computing systems and methods
US10394588B2 (en) Self-terminating or self-shelving virtual machines and workloads
US20150040125A1 (en) Allowing management of a virtual machine by multiple cloud providers
US20190258497A1 (en) Template-based software discovery and management in virtual desktop infrastructure (VDI) environments
CN111083166A (en) Method and device for setting white list in cloud database and computer storage medium
CN104636159A (en) Method and device for upgrading software in virtual machines
CN112507303A (en) Cloud desktop management method, device and system, storage medium and electronic equipment
CN104539665A (en) Remote file control system based on routers
CN108234551B (en) Data processing method and device
Tian et al. An introduction to cloud computing
CN103812865A (en) Method of realizing transparent user login under cloud resource platform
US20140279990A1 (en) Managing identifiers
CN114465765B (en) Client security management system and method of cloud desktop system
Patil et al. Cloud based “C-Programming” Android Application Framework
US11720448B1 (en) Application aware backups
KR102357031B1 (en) Cloud Computer Driving Method and Apparatus
CN111880907A (en) Method for starting virtual machine by utilizing ISO (International organization for standardization) aiming at OpenStack platform
CN114296850A (en) Method for realizing customized conference desktop special terminal based on virtual cloud

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160518

WD01 Invention patent application deemed withdrawn after publication