温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

centos7 esxi6.7模板应用实例分析

发布时间:2022-05-07 16:59:34 来源:亿速云 阅读:260 作者:iii 栏目:大数据

本篇内容主要讲解“centos7 esxi6.7模板应用实例分析”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“centos7 esxi6.7模板应用实例分析”吧!

一、创建centos7.6系统并优化系统

1.关闭networkmanager

systemctl disable networkmanager
systemctl stop networkmanager

2.关闭selinux

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

3.关闭firewalld

systemctl stop firewalld
systemctl disable firewalld

4.安装日常需要用的软件

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

5.修改网络配置(改为/etc/sysconfig/network-scripts/ifcfg-eth0)及多网卡配置

###修改网卡文件名和配置
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
###修改grub配置
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.修改所有用户的最大文件数

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

7.修改普通用户的最大进程数

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

二、导出centos7 ova模板并修改模板文件

1.用ovftool工具导出(由于浏览器不支持大文件导出)

1)下载ovftool工具

2)安装ovftool工具
双击vmware-ovftool-4.3.0-7948156-win.x86_64.msi,默认下一步,完成即可

3)用ovftool命令导出ova模板

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为宿主机ip
fingerprint will be added to the known host file
write 'yes' or 'no'
yes #输入yes
enter login information for source vi://10.10.90.239/
username: root #用户名
password: ********* #密码
opening vi source: vi://root@10.10.90.239: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.修改ova模板里文件
1)将centos-template.ova后缀名改为centos-template.rar
2)解压缩centos-template.rar
3)删除centos-template.mf和centos-template.nvram
4)修改centos-template.ovf文件,将带有nvram字符的两行删除掉,保存文件

三.导入ovf模板

打开浏览器-->进入vmware esxi6.7 宿主机页面 --> 虚拟机 --> 创建/注册虚拟机 --> 从ovf或ova文件部署虚拟机 --> test-centos-template(为该虚拟机输入名称。)--> 单击以选择文件或拖放(将centos-template.ovf和centos-template-disk1.vmdk两个文件拖放到此区域) --> 默认下一页 -->完成

注意:请勿在部署此虚拟机时刷新浏览器。

到此,相信大家对“centos7 esxi6.7模板应用实例分析”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI