Skip to content

Instantly share code, notes, and snippets.

@gowatana
Last active August 30, 2020 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gowatana/8476cd2e570f8f1bd9f3d3cd7b94dc24 to your computer and use it in GitHub Desktop.
Save gowatana/8476cd2e570f8f1bd9f3d3cd7b94dc24 to your computer and use it in GitHub Desktop.
#cloud-config
disable_root: true
ssh_pwauth: true
package_upgrade: false
users:
- name: nutanix
lock-passwd: false
passwd: $6$oDzrtJla$rMzS0vuH95Q2PjDgqVOsI30MqAYemPK5Y9uYsSpeQWd99R4hqm/JWoJqH4Y81SlbtTMkglp243leccceKNZ9h.
sudo: ALL=(ALL) NOPASSWD:ALL
packages:
- git
- unzip
- python3
- python3-pip
runcmd:
- pip3 install requests
@gowatana
Copy link
Author

gowatana commented Aug 29, 2020

利用例

  • CVM にログインして実行する。
  • イメージ サービスに CentOS-7-x86_64-GenericCloud-2003.qcow2 登録ずみ。
  • vlan-6-ipam ネットワークを、IPAM 有効で作成ずみ。
$ VMNAME=lab-vm-01
$ acli uhura.vm.create_with_customize $VMNAME num_vcpus=1 memory=1G cloudinit_userdata_path=https://gist.githubusercontent.com/gowatana/8476cd2e570f8f1bd9f3d3cd7b94dc24/raw/python3-vm.yml
$ acli vm.disk_create $VMNAME clone_from_image=CentOS-7-x86_64-GenericCloud-2003
$ acli vm.nic_create $VMNAME network=vlan-6-ipam
$ acli vm.on $VMNAME

VM が起動したら下記で SSH ログインする。IP アドレスは、AOS の IPAM による DHCP 自動設定。

  • ユーザ: nutanix
  • パスワード: nutanix/4u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment