Skip to content

Instantly share code, notes, and snippets.

@travispaul
Created April 2, 2026 13:32
Show Gist options
  • Select an option

  • Save travispaul/bab3305766f8028868d9d7f39d79ddad to your computer and use it in GitHub Desktop.

Select an option

Save travispaul/bab3305766f8028868d9d7f39d79ddad to your computer and use it in GitHub Desktop.
Debian NoCloud Example
#cloud-config
users:
- name: triton
ssh_authorized_keys:
- ssh-ed25519 AAAAB3NzaC1yc2EAAAADAQABAAABAQREPLACE_WITH_YOUR_SSH_PUBLIC_KEY_COMMENT_HERE user@example.com # TODO: Replace with your own SSH public key

Debian NoCloud example

Once the VM has been provisioned you may login via SSH using the user configured in cloudinit.yml

SmartOS

cloudinit=$(jq -Rs . cloudinit.yml)

cat <<EOF | vmadm create
{
  "alias": "debian",
  "brand": "bhyve",
  "ram": 2048,
  "vcpus": 2,
  "bootrom": "uefi",
  "cpu_cap": 200,
  "resolvers": [
    "1.1.1.1",
    "8.8.8.8"
  ],
  "nics": [
    {
      "nic_tag": "admin",
      "ips": [
        "192.168.3.31/21"
      ],
      "gateways": [
        "192.168.1.1"
      ],
      "model": "virtio"
    }
  ],
  "disks": [
    {
      "image_uuid": "f7858959-7ca1-4bfe-b8cf-1143f2e9fb88",
      "boot": true,
      "model": "virtio",
      "size": 10240
    }
  ],
  "flexible_disk_size": 10240,
  "customer_metadata": {
     "cloud-init:user-data": $cloudinit
  }
}
EOF

ssh triton@192.168.3.31

Triton

cloudinit=$(jq -rRs . cloudinit.yml)

triton instance create -wn debian debian-13.3-nocloud sample-2G -m "cloud-init:user-data=$cloudinit"

triton instance ssh triton@debian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment