If you have explored OCI a bit, you would have already noticed that they do not provide a Debian image to create your VM (as of October 2022) and to my dismay, I noticed that the default Ubuntu image have a lot of unnecessary packages installed and the processes take up 150 - 300 MB
of RAM out of a 1GB
amd64 instance by default. This may not bother the lot of you but I feel like a minimal image should be minimal after all and this is not the case by default!
Default images provided by OCI as of October 2022
If you are okay with running debian, you can grab a minimal debian image and create a VM using the image. I noticed that it just takes ~60MB
of RAM out of the 1GB
by default and it is just a fraction of what it is on Ubuntu.
Conditions/Limitations
The maximum image size is 400 GB.
The image must be set up for BIOS boot.
Only one disk is supported, and it must be the boot drive with a valid master boot record (MBR) and boot loader. You can migrate additional data volumes after you import the image’s boot volume.
The boot process must not require additional data volumes to be present for a successful boot.
The boot loader should use LVM or a UUID to locate the boot volume.
The disk image cannot be encrypted.
The disk image must be a VMDK or QCOW2 file.
Create the image file by cloning the source volume, not by creating a snapshot.
VMDK files must be either the “single growable” (monolithicSparse) type or the “stream optimized” (streamOptimized) type, both of which consist of a single VMDK file. All other VMDK formats, such as those that use multiple files, split volumes, or contain snapshots, are not supported.
The network interface must use DHCP to discover the network settings. When you import a custom image, existing network interfaces are not recreated. Any existing network interfaces are replaced with a single NIC after the import process is complete. You can attach additional VNICs after you launch the imported instance.
The network configuration must not hardcode the MAC address for the network interface.
Instructions
Grab a
qcow2
image (latest is debian 11,bullseye
) from the repoNavigate to the object storage dashboard and upload the downloaded
qcow2
:Once the image is uploaded to the OCI Object storage bucket, navigate to the custom images dashboard and import an image, leave the options as in the screenshot (except the selected object name):
Once the custom image creation is completed, navigate to the instances dashboard and
Create instance
:Edit the
shape
and selectCustom images
as the image source:Select the image that you created and click
Select image
Customize the vm instance as required and create the instance.
Profit from the low resource usage by default and start building yor service on the minimal vm!
Thank You