OmniOS on EC2 - part I
tl/dr
How to provision an OmniOS CE r151054 instance on AWS EC2. Why?
Let’s get started…
OmniOS publishes AMIs, but I don’t see one for r151054; so, I’m going to try to build my own.
The current LTS is r151054, so I grabbed the
vmdk file and followed the directions. Alas,
AWS complains that the format of this file is invalid. At Claude’s suggestion, I
converted the file to a raw image using qemu-img:
% qemu-img convert -f vmdk -O raw omnios-r151054.cloud.vmdk omnios-r151054.cloud.raw
Then, after uploading this much larger file to S3, I was able to import successfully:
{
"Description": "omnios-r151054.cloud",
"Format": "raw",
"Url": "s3://bucket/omnios-r151054.cloud.raw"
}% aws ec2 import-snapshot --disk-container file:///path/to/r151054.json
...
"Status": "active",
...
% aws ec2 describe-import-snapshot-tasks
...
"Status": "completed",
...
Now, back to the instructions. I created an ami.json from the template:
{
"Architecture": "x86_64",
"Description": "OmniOS illumos distribution",
"EnaSupport": true,
"Name": "OmniOS LTS r151054",
"RootDeviceName": "/dev/xvda",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"SnapshotId": "snap-xxxyyyzzz"
}
}
],
"VirtualizationType": "hvm",
"BootMode": "uefi"
}And used it to register an AMI:
% aws ec2 register-image --cli-input-json file:///path/to/ami.json
{
"ImageId": "ami-aaabbbccc"
}
With AMI in hand, it is time to create an instance. I’m using OpenTofu:
resource "aws_instance" "omnios" {
ami = "ami-aaabbbccc"
associate_public_ip_address = true
key_name = "key_name"
instance_type = "t3.xlarge"
subnet_id = data.aws_subnet.subnet_a.id
vpc_security_group_ids = [aws_security_group.omnios.id]
root_block_device {
volume_size = 80
encrypted = true
volume_type = "gp3"
}
}Once this applied, I checked the output with:
% aws ec2 get-console-output --instance-id i-1234567890 --latest | fx '.Output'
OmniOS r151054 Version omnios-r151054-6ad70ba62c 64-bit
Copyright (c) 2012-2017 OmniTI Computer Consulting, Inc.
Copyright (c) 2017-2025 OmniOS Community Edition (OmniOSce) Association.
WARNING: illegal PCI request: offset = 100, size = 4
WARNING: illegal PCI request: offset = 100, size = 4
NOTICE: Performing full ZFS device scan!
NOTICE: Original /devices path (/pci@0,0/pci1af4,2@4/blkdev@0,0:b) not available; ZFS is trying an alternate path (/pci@0,0/pci1d0f,8061@4/blkdev@1,0:b)
NOTICE: vdev_disk_open /dev/dsk/c1t0d0s1: update devid from '<none>' to 'id1,kdev@D1D0F-Amazon_Elastic_Block_Store______________-vol8675309-1/b'
NOTICE: vdev_disk_open /dev/dsk/c1t0d0s1: update devid from '<none>' to 'id1,kdev@D1D0F-Amazon_Elastic_Block_Store______________-vol8675309-1/b'
Loading smf(7) service descriptions: 1/1
Configuring devices.
Hostname: omnios
Applying initial boot settings...
*********************************************************
* cloud-init is configuring this system, please wait... *
*********************************************************
Alright! This is good news. Now to SSH in…
% ssh -i ~/.ssh/aws.pem.pub omnios@12.34.56.78
OmniOS r151054 omnios-r151054-6ad70ba62c May 2025
omnios@ip-12-34-56-78:~$ uptime
18:30:15 up 8 min(s), 1 user, load average: 0.00, 0.04, 0.03
Alright! We’ve deployed a modern (May ‘25) OmniOS CE instance on AWS and connected to it using SSH. We’ll continue with configuration in part II.