Detailed explanation of the practical application of centos7 esxi6.7 template

Detailed explanation of the practical application of centos7 esxi6.7 template

1. Create a centos7.6 system and optimize the system

1. Turn off NetworkManager

systemctl disable NetworkManager
systemctl stop NetworkManager

2. Turn off selinux

setenforce 0
sed -i "s#SELINUX=enforcing#SELINUX=disabled#g" /etc/selinux/config

3. Turn off firewalld

systemctl stop firewalld
systemctl disable firewalld

4. Install the software you need for daily use

yum install vim nc wget lrzsz telnet net-tools epel-release bind-utils tree cifs-utils ntpdate -y

5. Modify the network configuration (change to /etc/sysconfig/network-scripts/ifcfg-eth0) and multiple network card configuration

###Modify the network card file name and configuration cd /etc/sysconfig/network-scripts
cp ifcfg-ens192 /tmp/ifcfg-ens192_bak
sed -i "s#NAME=.*#NAME='eth0'#g" ifcfg-ens192
sed -i "s#DEVICE=.*#DEVICE='eth0'#g" ifcfg-ens192
mv ifcfg-ens192 ifcfg-eth0
###Modify grub configuration sed -i 's#GRUB_CMDLINE_LINUX=.*#GRUB_CMDLINE_LINUX=\"rhgb quiet net.ifnames=0 biosdevname=0\"#g' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg

6. Modify the maximum number of files for all users

#cat >> /etc/security/limits.conf <<eof
* soft nofile 65535
eof
#cat >> /etc/security/limits.conf <<eof
* hard nofile 65535
eof

7. Modify the maximum number of processes for ordinary users

#sed -i "/*/s#* soft nproc.*#* soft nproc 65535#g" /etc/security/limits.d/20-nproc.conf

2. Export the centos7 ova template and modify the template file

1. Export using ovftool (because the browser does not support large file export)

1) Download the ovftool tool
https://www.vmware.com/support/developer/ovf/

2) Install the ovftool tool. Double-click VMware-ovftool-4.3.0-7948156-win.x86_64.msi. Click the default next step and complete it.

3) Use the ovftool command to export the ova template

PS >cd C:\Program Files\VMware\VMware OVF Tool
PS >.\ovftool.exe -dm=thin "vi://10.10.90.239/centos-template" d:\centos-template\centos-template.ova #10.10.90.239 is the host machine IP
Fingerprint will be added to the known host file
Write 'yes' or 'no'
yes #Enter yes
Enter login information for source vi://10.10.90.239/
Username: root #UsernamePassword: ********* #PasswordOpening VI source: vi://[email protected]:443/centos-template
Opening OVA target: d:\centos-template\centos-template.ova
Writing OVA package: d:\centos-template\centos-template.ova
Transfer Completed
Completed successfully

2. Modify the file in the ova template
1) Change the suffix of centos-template.ova to centos-template.rar
2) Unzip centos-template.rar
3) Delete centos-template.mf and centos-template.nvram
4) Modify the centos-template.ovf file, delete the two lines with the nvram character, and save the file

3. Import ovf template

Open the browser-->Enter the vmware esxi6.7 host page-->Virtual machine-->Create/register virtual machine-->Deploy a virtual machine from an OVF or OVA file-->test-centos-template (Enter a name for the virtual machine.)-->Click to select a file or drag and drop (Drag and drop the two files centos-template.ovf and centos-template-disk1.vmdk to this area)-->Default next page-->Finish

NOTE: Do not refresh your browser while this virtual machine is deploying.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

<<:  WeChat applet implements calculator function

>>:  How to change MySQL character set utf8 to utf8mb4

Recommend

How to quickly insert 10 million records into MySQL

I heard that there is an interview question: How ...

Several ways to implement image adaptive container with CSS (summary)

There is often a scenario where the image needs t...

Summary of pitfalls of using nginx as a reverse proxy for grpc

background As we all know, nginx is a high-perfor...

Summary of MySql index, lock, and transaction knowledge points

This article summarizes the knowledge points of M...

How to remove the blue box that appears when the image is used as a hyperlink

I recently used Dreamweaver to make a product pres...

Apache Bench stress testing tool implementation principle and usage analysis

1: Throughput (Requests per second) A quantitativ...

Vue+js realizes video fade-in and fade-out effect

Vue+js realizes the fade in and fade out of the v...

Detailed explanation of how to use the Vue license plate search component

A simple license plate input component (vue) for ...

Problems and solutions when installing MySQL8.0.13 on Win10 system

Operating system: Window10 MySQL version: 8.0.13-...

CSS Sticky Footer Several Implementations

What is "Sticky Footer" The so-called &...

The homepage design best reflects the level of the web designer

In the many projects I have worked on, there is b...

Native js to realize a simple snake game

This article shares the specific code of js to im...

Vue custom components use event modifiers to step on the pit record

Preface Today, when I was using a self-written co...

HTML is something that web page creators must learn and master.

What are the benefits of learning HTML? 1: Easily...