Sometimes, when you are creating a new OCI Compute instance you want to have more control, such as setting the private IP or performing some tasks on the first run of your new instance. For these cases, you can use the advanced options when creating a Compute OCI instance.
In this article, we will create an OCI Compute instance using the advanced options. If you need help creating an instance of OCI Compute, use this blog post: Creating a VM instance in OCI.
Before you click Create to create your instance, open the advanced options.
Within the advanced options, there are 3 tabs: Management, Network and Image. In the Management section, you can choose a fault domain and define the user data.
A fault domain is a grouping of hardware and infrastructure that is distinct from other fault domains in the same availability domain. Each availability domain has three fault domains and you can you it to increase the availability of applications running on Oracle Cloud Infrastructure.
In User Data you can choose to specify a startup script that will run when your instance boots up or restarts.
#!/bin/bash sudo yum update -y
In Network section, you can define the private IP address and the hostname of the instance.
In Image section, you can choose an image build compatible with the operating system and shape you selected.
When you click Create, the new instance will be created using the defined settings instead of randomly choosing them.
In this article you learned how to use advanced options to gain more control when creating OCI Compute instances.
Have a good time!