KVM One-click Shell automatically generates a Windows virtual machine with unattended operation scenario (STEP1)

Source: Internet
Author: User

KVM One-click Shell automatically generates a Windows virtual machine, unattended operation scheme is divided into four steps to complete the joint;

The first step: Start the startup script, so that the machine can be executed at the start of the script, to complete all the necessary basic operations (such as setting a password, binding Ip , add domain, activate), this step is repeated on a separate machine, repeated test and write;

The second step: the automatic answer file, so that it can not be installed automatically, no human intervention; that is, to eliminate the first time the machine starts, you need to manually select the "Installation Language", "Accept the license Agreement" and so on these steps;

The third step: complete the above steps, the rest will need Linux through virt-copy-in assigns the specified configuration parameter ( IP, new password) files are copied into the Windows Specify the location so that the script written above can read the latest required parameter file;

Fourth Step: Write Shell script that will generate a virtual machine with a key, and virt-copy-in Copy the configuration file, Unite, one-click Automation;

through the above four steps of each preparation, and finally through the script one-click Automation to complete Windows all operations of the virtual machine;



Let's start with the first step: write the script;

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8A/83/wKiom1gyszGgps8uAABwlwH0BxI465.png "style=" float: none; "title=" 1-config.png "alt=" Wkiom1gyszggps8uaabwlwh0bxi465.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8A/7F/wKioL1gyszLROnTlAACVCDF5ku4276.png "style=" float: none; "title=" 2--config-bat.png "alt=" Wkiol1gyszlrontlaacvcdf5ku4276.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8A/83/wKiom1gyszKBKDuLAACm3HNKaaE158.png "style=" float: none; "title=" 3-bat.png "alt=" Wkiom1gyszkbkdulaacm3hnkaae158.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8A/7F/wKioL1gyszOSDk5nAAB4SFyiChE297.png "style=" float: none; "title=" 4-bat.png "alt=" Wkiol1gyszosdk5naab4sfyiche297.png "/>





Through the above script, the machine will be a manual click on the script, you can complete all operations, but also distance from the target, the way is: rename the script to the Setupcomplete.cmd file, placed in the C:\Windows\Setup\Scripts directory, Then the script can be completed after the first boot of the machine, the default execution of the script, also completed the first step to achieve the basic operation of the script;


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8A/7F/wKioL1gyszOB6Q0LAAEBeL7NyiE482.png "style=" float: none; "title=" 5-setupcomplete.png "alt=" Wkiol1gyszob6q0laaebel7nyie482.png "/>







This article is from "Good Sir 2020" blog, please make sure to keep this source http://fuyuan2016.blog.51cto.com/8678344/1875144

KVM One-click Shell automatically generates a Windows virtual machine with unattended operation scenario (STEP1)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.