Automatically install virtual machines with scripts

Automatically install virtual machines with scripts

Kickstart    Using kickstart , system administrators can create a file containing answers to all frequently asked questions during installation to automate the installation of red hat enterprise linux

Kickstart Maker Installation

package  system-config-kickstart

安装yum install system-config-kickstart

yum install httpd system-config-kickstart -y

 

 


Successful installation!

ssh [email protected] -X #### graphic connection

 


Execute the system-config-kickstart command

After entering the graphical interface, select the options to be executed during the automatic installation process

1. Set password, restart option


2. Select HTTP service, set IP, mirror name


3. Select Disk Allocation


Give the boot partition 200m, swap 500m, and the rest are given to the root directory


 

 

 


 

 

 The authentication options are as follows

 

 

Firewall choose not to open does not automatically start



Display selection does not start automatically








Save ks.cfg in file system /var/www/html/

 

 

Open httpd and close the firewall

systemctl start httpd

systemctl stop firewalld

 

 

Open Firefox and enter 172.25.254.163/ks.cfg   

 

 

 

 

 

 

Set the configuration file of ks.cfg to add the required installation packages

[root @ localhost ~] # cd / var / www / html /

[root@localhost html]# ls

ks.cfg  software

[root@localhost html]# vim ks.cfg

change inside

 

 38

 39

 40 %packages

 41 @bash

 42 lftp

 43 %end

 

 

 

ksvalidator ks.cfg syntax check


Silent means no errors

Edit vm-create.sh


give script execution permission

and execute


The automatic installation is successful, as shown in the figure


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326073629&siteId=291194637