如何通过SSH访问将Init VM映像云化

时间:2019-02-28 12:06:51

标签: cloud-init

我使用QEMU创建了基于Ubuntu 18的虚拟机映像。我使用了以下配置

#cloud-config
password: password
chpasswd: { expire: False }
users:
  - default
  - name: foobar
    groups:
    lock-passwd: false
    passwd: $6$rounds=4096$zY2AR8OrFJr6i$JX/3TWgrTpJUwnyROcboKDjPHa4KF1y9A/kWyNOE/NtztvnC5F64Wxy/yl.Q9P7O/jm0XdDpd4eD2qSMtGGLM1
    shell: /bin/bash
    sudo: "ALL=(ALL) NOPASSWD:ALL"
    ssh_authorized_keys:
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7nGEtsDEgwDNCLr4ByH8af9SCjmtF+9EyfLot5+Bx6R7BpuRPbmgQ/TABjsEy+6UPcb/lbO5gxbCIUhjStGzcrP02b4KIr4aYezfvSrqlR64bZwn293sdk9L7Qx4pw4N5dZGym+PcTxaE4jflo9o+c1UWKc4nht4MyxFDZEIuzjamTN+CdMeWlRDYMXp4qpgEfNwpn5S27MeEtQb2xFk+SLPw+eV+oG8VM7sK0f7TaPw6BrgCrwnp7ht17NpGLFIBycx8gxmJZ2DZ9xPss+49FAJlrdoYP8kqiA46D1VSPqq+FlXjDoUTDcatZIl6syC9k3lJWk+aBK769i3R4N0e8eR user@user-7010

我能够登录到实例。现在,我尝试使用ubuntu VMI。是否有任何云初始化脚本,我也不想在启动后操纵VMI。请帮忙。

0 个答案:

没有答案