From 3e1f14e0762db3fd2bfe8b223ec51e1b888212a7 Mon Sep 17 00:00:00 2001 From: Travis Paul Date: Thu, 26 Mar 2026 12:02:38 -0400 Subject: [PATCH 1/3] Add high-level NoCloud info --- docs/using-nocloud-compatible-images.md | 39 +++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 40 insertions(+) create mode 100644 docs/using-nocloud-compatible-images.md diff --git a/docs/using-nocloud-compatible-images.md b/docs/using-nocloud-compatible-images.md new file mode 100644 index 0000000..cd90b17 --- /dev/null +++ b/docs/using-nocloud-compatible-images.md @@ -0,0 +1,39 @@ +# Using Cloud-init with NoCloud Compatible Images + +SmartOS release [20260306T044811Z][smartos-20260306T044811Z] +introduced support for [cloud-init's NoCloud][nocloud] +datasource for bhyve guests. + +To use this feature, a guest must be provisioned from an image tagged with +`org.smartos:cloudinit_datasource=nocloud`. + +## Behavior + +When an instance is created, SmartOS uses instance metadata to build a 16 MiB +FAT disk containing these files: + +- [user-data][user-data]: populated from + `customer_metadata['cloud-init:user-data']` +- [meta-data][meta-data]: contains the instance UUID and hostname; if no + hostname is set, SmartOS falls back to the alias, then the UUID +- [vendor-data][vendor-data]: reserved for SmartOS-supplied defaults that users + may override with `customer_metadata['cloud-init:vendor-data']` +- [network-config][network-config]: generated automatically from the instance's + `nics` and `resolvers` metadata + +On instance startup, SmartOS rebuilds this filesystem if the source metadata has +changed, for example after adding a NIC or changing the hostname. + +Instances created from NoCloud-compatible images do not include the mdata tools +by default; install them separately if needed. + +Examples of SmartOS payloads and image build scripts are available in the +[triton-nocloud-images][triton-nocloud-images] repository. + +[smartos-20260306T044811Z]: https://us-central.manta.mnx.io/Joyent_Dev/public/SmartOS/smartos.html#20260306T044811Z +[nocloud]: https://docs.cloud-init.io/en/latest/reference/datasources/nocloud.html#nocloud +[user-data]: https://docs.cloud-init.io/en/latest/reference/datasources/nocloud.html#user-data +[meta-data]: https://docs.cloud-init.io/en/latest/reference/datasources/nocloud.html#meta-data +[vendor-data]: https://docs.cloud-init.io/en/latest/reference/datasources/nocloud.html#vendor-data +[network-config]: https://docs.cloud-init.io/en/latest/reference/datasources/nocloud.html#network-config +[triton-nocloud-images]: https://github.com/TritonDataCenter/triton-nocloud-images/tree/main/examples diff --git a/mkdocs.yml b/mkdocs.yml index bd4a17d..36e2ce3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -56,6 +56,7 @@ nav: - "Instance Management": - "Managing Instances with vmadm": "managing-instances-with-vmamd.md" - "Instance Metadata": "customer_metadata.md" + - "Using Cloud-init with NoCloud Compatible Images": "using-nocloud-compatible-images.md" - "Managing Images": "managing-images.md" - "Administering SmartOS Native Instances": - "Managing Packages": "working-with-packages.md" From d26c5540c0022cc591331368d55dce1768600433 Mon Sep 17 00:00:00 2001 From: Travis Paul Date: Thu, 26 Mar 2026 14:17:52 -0400 Subject: [PATCH 2/3] Note that vendor-data will behave the same for SmartOS and Triton --- docs/using-nocloud-compatible-images.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/using-nocloud-compatible-images.md b/docs/using-nocloud-compatible-images.md index cd90b17..e1e0aa2 100644 --- a/docs/using-nocloud-compatible-images.md +++ b/docs/using-nocloud-compatible-images.md @@ -16,8 +16,8 @@ FAT disk containing these files: `customer_metadata['cloud-init:user-data']` - [meta-data][meta-data]: contains the instance UUID and hostname; if no hostname is set, SmartOS falls back to the alias, then the UUID -- [vendor-data][vendor-data]: reserved for SmartOS-supplied defaults that users - may override with `customer_metadata['cloud-init:vendor-data']` +- [vendor-data][vendor-data]: reserved for SmartOS or Triton-supplied defaults + that users may override with `customer_metadata['cloud-init:vendor-data']` - [network-config][network-config]: generated automatically from the instance's `nics` and `resolvers` metadata From ebacfc147788df4ad4a65ad27f7ec0a009921932 Mon Sep 17 00:00:00 2001 From: Travis Paul Date: Mon, 30 Mar 2026 15:39:32 -0400 Subject: [PATCH 3/3] Reserve vendor-data for SmartOS/Triton use --- docs/using-nocloud-compatible-images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using-nocloud-compatible-images.md b/docs/using-nocloud-compatible-images.md index e1e0aa2..07d783c 100644 --- a/docs/using-nocloud-compatible-images.md +++ b/docs/using-nocloud-compatible-images.md @@ -17,7 +17,7 @@ FAT disk containing these files: - [meta-data][meta-data]: contains the instance UUID and hostname; if no hostname is set, SmartOS falls back to the alias, then the UUID - [vendor-data][vendor-data]: reserved for SmartOS or Triton-supplied defaults - that users may override with `customer_metadata['cloud-init:vendor-data']` + that users may override with `customer_metadata['cloud-init:user-data']` - [network-config][network-config]: generated automatically from the instance's `nics` and `resolvers` metadata