The Triton DataCenter and SmartOS cloud images repo was based on AlmaLinux cloud-images repo.
This project uses Packer templates and and Ansible for building the images.
- Images are produce using
packerand the distro's native installer automation mechanism. ansibleis used to prepare the image contents.- Swap is disabled in all kickstarts, and preseed configurations.
- cloud-init is used for provision-time guest configuration.
triton-guestsystemd service will set hostid and root password from generated metadata.
| Name | Version |
|---|---|
| AlmaLinux | 8 |
| AlmaLinux | 9 |
| AlmaLinux | 10 |
| Debian | 12 |
| Debian | 13 |
| Oracle Linux | 8 |
| Oracle Linux | 9 |
| Oracle Linux | 10 |
| Rocky Linux | 8 |
| Rocky Linux | 9 |
| Rocky Linux | 10 |
| Ubuntu | 22.04 |
| Ubuntu | 24.04 |
| Windows Server | 2025 |
Only building on SmartOS with bhyve is supported. When building on SmartOS, the build script will ensure any necessary dependencies are correctly installed. Building with Linux using the qemu plugin is theoretically possible, but the build script cannot be used. Also due to divergences in ZFS on Linux and illumos ZFS, zfs datasets from Linux cannot be imported to SmartOS.
Images produced will be usable with KVM as well as Bhyve.
The settings for the build virtual machine is currently 4 CPUs, 4G of ram, and 10G of disk. Make sure your build zone allocation has well in excess of that available during the build process.
The Windows Server 2025 image uses evaluation media that expires after 180 days. Build it directly with Packer, or use the build script to also produce the image manifest:
packer build --only=bhyve.windows-2025-x86_64 .
./build_all.sh windows-2025The build attaches no guest NIC (host_nic is empty) because it runs in a non-global zone that cannot create VNICs. The communicator = "none" build delivers everything on CD and requires a packer-plugin-bhyve build with the companion optional-NIC change.
The following details are important when maintaining this image:
- Boot-critical storage drivers must arrive in
$WinPEDriver$at the CD root becausewpeinitscans only the root of each volume. Do not prefixcd_filesentries with./, or the SDK reproduces the whole source path on the CD. A file entry is placed at the CD root under its basename; a directory entry contributes its last component and everything below it, sowindows-2025/$WinPEDriver$becomes\$WinPEDriver$. AddingDriverPathsfor the same INFs makes Setup fail with0x80070103. - The virtio drivers are pinned to virtio-win 0.1.271 (
100.100.104.27100). Do not update them without retesting on Triton: 0.1.285 binds the virtio-net device and then fails withCM_PROB_FAILED_POST_START, leaving a dead NIC. The trailing version digits identify the virtio-win release. Triton's bhyve presents legacy virtio unless the zone setsvirtio1=true, which maps to bhyve'svirtio.modern; re-evaluate newer drivers once platform images carry that setting. - The build ends with sysprep
/generalize /oobe /shutdownas a first-logon command. Setup overrides a shutdown in the specialize pass with its own restart. The/unattend:argument prevents the generalized image from running the build answer file again on a customer's first boot. - At first boot,
SetupComplete.cmdapplies the per-instance Administrator password from metadata, while theTritonNetworkingstartup task applies networking metadata. The image manifest enablesgenerate_passwordsfor theadministratoruser.
We have created a packer plugin for bhyve that works with SmartOS (and should be compatible with other illumos distributions). Please report any issues that you find.
Building images requires additional services to be installed, running, and properly configured. The build script will attempt to make the proper modifications to the build environment. Because of this, building images should be done in a zone dedicated for this purpose, and not general purpose dev environments.
You must use a joyent brand zone base-64-lts@22.4.0 with a delegated dataset. The nic will need "allow_ip_spoofing": true. If you are using a stand-alone SmartOS server, add this to the JSON when creating the zone. If you are using Triton, you will need to add it via NAPI (AdminUI can also be used). For example:
sdc-napi /nics/00:53:37:aa:bb:cc -X PUT -d '{"allow_ip_spoofing": true}'After provisioning some additional zone setup is required to grant the zone access to the bhyve devices. This must be done on the compute node and is not something you should grant to untrusted tenants.
zonecfg -z <uuid> <<EOF
set limitpriv=default,proc_clock_highres,sys_dl_config
add device
set match="/dev/viona"
end
add device
set match="/dev/vmm*"
end
commit
exit
EOFThe build script will handle configuring networking, NAT, and routing.
Note: This entire section is for reference only. Network configuration and services are handled by the build script but it is included here to help readers understand how networking is configured for the image creation process. This section may help diagnose any networking problems encountered during image generation.
isc-dhcpd listens on dhcp0 and hosts the packer http server, and then packer0 is what bhyve uses for the VM. Note: isdc-dhcpd may go into maintenance when the zone boots
if the dhcp0 interface isn't present.
dladm create-etherstub -t images0
dladm create-vnic -t -l images0 dhcp0
dladm create-vnic -t -l images0 packer0
ifconfig dhcp0 plumb up
ifconfig packer0 plumb
ifconfig dhcp0 10.0.0.1 netmask 255.255.255.0# cat > /etc/ipf/ipnat.conf <<EOF
map net0 10.0.0.10/32 -> 0/32
EOF
# routeadm -u -e ipv4-forwarding
# svcadm enable ipfilter
# ipnat -lNote: This will be handled for you by the build script. This is for reference only.
/opt/local/etc/dhcp/dhcpd.conf:
authoritative;
subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.1;
option domain-name-servers 1.1.1.1;
range 10.0.0.10 10.0.0.20;
}The available build targets can be discovered with:
./build_all.sh listTo generate images for all targets, run:
./build_all.shTo generate images for a subset of targets, pass only targets you wish to create:
./build_all.sh <target1> <target2>