安装完成并登陆后如图
-
如果需要更改主机名 :hostnamectl set-hostname 自定义主机名名字
-
安装clcmd-init(需要通公网):yum -y install cloud-init
- 修改配置文件(如果不做可能导致无法ssh):vi /etc/cloud/cloud.cfg
找到ssh_pwauth: 0 ,然后把0改为1(下图第5行),并添加6-9行内容(为了防止开机时间过长,可以不要)
datasource_list:[ Conf igDrive,Mone ]
datasource:
Conf igDirve:
dsmode:local
然后服务默认是关闭的,现在查看并开启该服务并设置开机自启
systemctl is-active cloud-init (查看状态active为运行状态)
systemctl start cloud-init (启动服务)
systemctl enable cloud-init(开机自启)
- 编辑网卡文件:vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=dhcp
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
NAME=eth0
- 安装运维工具:yum -y install qemu-guest-agent