杨梅冲
每天在想什么呢?

Amazon linux 2023

下载地址:https://cdn.amazonlinux.com/al2023/os-images/2023.5.20240819.0/vmware/

官方参考:https://docs.aws.amazon.com/linux/al2023/ug/seed-iso.html

在一台 linux上设置一个 ssh信任
ssh-keygen -t rsa
得到 id_rsa id_rsa.pub

cd /root/ && mkdir seed
# vim meta-data 
local-hostname: server_223

# vim user-data 

#cloud-config
#vim:syntax=yaml
users:
# A user by the name `ec2-user` is created in the image by default.
  - default
  - name: ec2-user
  ssh_authorized_keys:
      - ssh-rsa ssh-key.
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
chpasswd:
  list: |
    ec2-user:root
# In the above line, do not add any spaces after 'ec2-user:'.

# ssh-key内容就是 id_rsa.pub

# 生成 seed.iso,网络我自己修改
yum install mkisofs -y
mkisofs -output seed.iso -volid cidata -joliet -rock user-data meta-data

vmware esxi中导入系统模板,然后关闭系统----在编辑中添加 CD/DVD驱动器,将 seed.iso上传到数据存储浏览器上,然后重新启动

ssh通过 key登录,默认密码是 root

 

posted on 2024-09-02 19:01  杨梅冲  阅读(17)  评论(0编辑  收藏  举报