Hi. I'm jon.404, a Unix/Linux/Database/Openstack/Kubernetes Administrator, AWS/GCP/Azure Engineer, mathematics enthusiast, and amateur philosopher. This is where I rant about that which upsets me, laugh about that which amuses me, and jabber about that which holds my interest most: *nix.
OpenBSD on AWS - Yes! It's true!
Update: OpenBSD AMIs are available in the Ireland region as of this update. Please use those instead of the below instructions!
OpenBSD-5.9-beta introduced an important piece of the puzzle for running OpenBSD on AWS. It introduced Xen Guest drivers, namely the network drivers.
This is seriously cool. I have a few OpenBSD VPSs around the world doing various things in KVM, but I've always wanted to "bring them home" to AWS.
So here it is, instructions on how to go about "migrating" an OpenBSD VM to AWS. This assumes VirtualBox, but others work, too.
1) Setup the disk for AWS (While running on VirtualBox)
3) Stop the VirtualBox VM.
4) ec2-import-volume OpenBSD-CURRENT.vhd -f VHD -s 8 --region us-east-1 -z us-east-1a -b openbsd-export -o $YOUR_ACCESS_KEY -w $YOUR_SECRET_KEY -O $YOUR_ACCESS_KEY -W $YOUR_SECRET_KEY
5) Giggle uncontrollably
6) PROFIT!
Once the volume is imported (you can check with ec2-describe-conversion-tasks), it should show up as a volume in the AWS Portal (Services -> EC2 -> Volumes).
Here's the fun part. Spin up a Linux instance. Stop it. Detach the root volume. Delete the Linux root volume (you don't need it where you are going). Attach the shiny new OpenBSD volume as "/dev/xvda" to your sacrificial Linux instance. Start the instance.
As long as you are **NOT** using enhanced networking (there appears to be an as-of-yet-unresolved issue with the OpenBSD 82599 driver attaching to Xen-emulated Intel cards?), you should see 2/2 health checks after a short while.
Sweet.
OpenBSD-5.9-beta introduced an important piece of the puzzle for running OpenBSD on AWS. It introduced Xen Guest drivers, namely the network drivers.
This is seriously cool. I have a few OpenBSD VPSs around the world doing various things in KVM, but I've always wanted to "bring them home" to AWS.
So here it is, instructions on how to go about "migrating" an OpenBSD VM to AWS. This assumes VirtualBox, but others work, too.
1) Setup the disk for AWS (While running on VirtualBox)
a) echo "dhcp" > /etc/hostname.xnf02) Setup the ec2 toolset (if required).
b) Add your keys. Please don't use ssh passwords for anything important.
3) Stop the VirtualBox VM.
4) ec2-import-volume OpenBSD-CURRENT.vhd -f VHD -s 8 --region us-east-1 -z us-east-1a -b openbsd-export -o $YOUR_ACCESS_KEY -w $YOUR_SECRET_KEY -O $YOUR_ACCESS_KEY -W $YOUR_SECRET_KEY
5) Giggle uncontrollably
6) PROFIT!
Once the volume is imported (you can check with ec2-describe-conversion-tasks), it should show up as a volume in the AWS Portal (Services -> EC2 -> Volumes).
Here's the fun part. Spin up a Linux instance. Stop it. Detach the root volume. Delete the Linux root volume (you don't need it where you are going). Attach the shiny new OpenBSD volume as "/dev/xvda" to your sacrificial Linux instance. Start the instance.
As long as you are **NOT** using enhanced networking (there appears to be an as-of-yet-unresolved issue with the OpenBSD 82599 driver attaching to Xen-emulated Intel cards?), you should see 2/2 health checks after a short while.
Sweet.
Total Comments 1
Comments
-
Awesome stuff!
Posted 01-17-2016 at 06:56 AM by Habitual