Oracle Cloud Infrastructure (OCI)§
Every major (Internet) Company has something with "Cloud" in its portfolio nowadays. Oracle is - of course - no exception.
I've never heard of their OCI until recently and only because they offer FREE STUFF!!
Their [Free Tier] includes quite a bit of resources, of the current offering, the most relevant to me are the following:
- Two AMD Compute VMs
- 1/8th OCPU, 1 OCPU is "2 vCPU", so you'll get a quarter of a Thread? Whack.
- 1GB RAM.
- 0.48Gbit/s networking... ???
- Arm-based Ampere A1 cores and 24 GB of memory usable as 1 VM or up to 4 VMs with 3,000 OCPU hours and 18,000 GB hours per month
tl;dr: that comes down to the following:
- 1 VM with 4 A1 cores and 24GB RAM.
- 2 VMs with 2 A1 cores and 12GB RAM.
- 4 VMs with 1 A1 core and 6GB RAM.
- 2x Virtual Cloud Networks
- Basically switch/router combinations.
- Site to Site VPNs with IPSec.
Not sure if that's gonna last, but it's interesting enough to not pass up.
Keep in mind that - for now - this experiment failed and it caused me suffering. Lots of it.
Attempted OpenBSD Installation on x86_64 Instances§
Right, so the lower spec x86_64 instances are still useful for a bunch of things. Small websites, maybe a mail server. Anyhow, I'm not keen on using Oracle Linux (but maybe Solaris...), so I attempted to get OpenBSD running on it instead.
Creating the Install Image§
I started with the following:
- Get the
install71.imgto the OpenBSD machine in a directory of your choice and
- Set up
install71.imgand mount its root partition.
vnconfig vnd0 install71.img mount /dev/vnd0a /mnt
- Set up the serial port in boot(8)
printf "stty com0 115200\nset tty com0\n" >> /mnt/etc/boot.conf
- Unmount and detach
umount /mnt vnconfig -u vnd0
install71.imgto qcow2 image with
qemu-img convert -O qcow2 install71.img install71.qcow2
Tada! You have an OpenBSD install image with serial connection enabled. Easy, right?
Custom Image on OCI§
And here the pain starts. But don't worry, you'll ease into it with this step.
- Create an Object Storage Bucket if you don't have one. I named mine
OS. It's under
Storage -> Buckets.
- Upload your created
install71.qcow2, I prefixed it with
- Go to
Compute -> Custom Imagesand click
Import Image. I named it
OpenBSD 7.1 (amd64). Choose the object name for the
install71.qcow2you just uploaded, select QCOW2 and Paravirtualized Mode.
- Wait a long time. In my case it took a little over 10 Minutes. Get a coffee.
You're stuck with BIOS boot, by the way. Whatever.
Virtual Cloud Network§
This is where the urge to burn it all down started to grow.
To save you some pain, I recommend first creating a VCN, because the creation of it during the instance creation just sucks. Why? You can't really choose the subnet. Or enable IPv6.
- Go to
Networking -> Virtual Cloud Networks.
- Create a VCN. Name it.
vcn-01was my choice. Creative, I know.
- Pick a rather big IPv4 subnet, like a
/16as recommended in the example text. That'll let you change the second octet as compared to the instance creation wizard.
Assign an Oracle allocated IPv6 /56 prefixand confirm.
- Click on the newly created VCN.
- Click create Subnet, give it a name.
- Enter the smaller subnet contained within the earlier one. A
Assign an Oracle allocated IPv6 /64 prefixand confirm.
- Click on
Internet Gatewaysand create one. You have to give it a name once again.
- Click on
Route Tablesand select the default.
- Add two Route rules, one IPv4 for
0.0.0.0/0and one IPv6 for
::/0, both pointing to an Internet Gateway. Select the one you just created.
Honestly, this couldn't be more clumsy. In the end you end up with 1:1 NAT for your public V4. And V6 needs more steps, later.
Create an Instance§
Time to actually create the instance you wanted in the first place.
- Go to
Compute -> Instances.
- Create a new Instance. Name? I named mine
Image and Shape. Select
Custom images. Select your custom image and confirm.
- Networking should automatically select the VCN and subnet you configured earlier. But who the fuck knows? Double check.
No SSH keysbecause it does not know how to put it there, anyway.
Advanced Optionsat the bottom, disable
Oracle Cloud Agentbecause it doesn't work.
- Confirm and wait. Doesn't take that long, but get something alcoholic, perhaps?
- Click on
Attached VNICsand select the only one.
Assign IPv6 Address. It'll show you a weird form where you can complete a half typed V6 address, I entered
:10. If you don't, you'll get something random.
- Get back to the instance and click
Launch Cloud Shellbecause Oracle:
- Didn't understand how Host Key Identification works, rotates keys "regularly" and tells users that if they get a
Host key verification failedto just remove the offending key. Don't trust me? Making a Local Connection to the Serial Console. Idiots.
Launch Cloud Shellspins up more virtual machines and costs Oracle money.
You'll be greeted with the installer. You can run through it, hostname, networking, etc..
However, you'll end up at the point where you're supposed to select the disk.
There won't be one.
I first tried the Paravirtualized Mode. Networking worked fine, but disk didn't.
vioscsi0 should have the boot disk - which boot(8) successfully boots from by the way - but the kernel does not find it.
I attempted again with Emulated Mode, which gives me IDE instead. It, too, does not get found by OpenBSD.
No boot disk. No boot disk, no installation.
There is a Patch That Fixes The Missing Disk in Paravirtualized Mode, but it hasn't been applied and is over a year old by now. Yuck. I tried applying it anyway, it dnd't work. Updating it seems like a lot of work at least for me, given that I don't know my way around the scsi subsystem of OpenBSD.
This failed. I couldn't get OpenBSD installed.
Honestly, the whole experience was very painful. The UX sucks.
I can't complain about the price of free. But I should send Oracle a bill for wasting my time.