Oracle by Example brandingCreating Virtual Machine and Bare Metal Instances Using Oracle Cloud Infrastructure Compute

section 0Before You Begin

This tutorial shows you how to create Virtual Machine and Bare Metal instances using Oracle Cloud Infrastructure Compute Service. This tutorial takes approximately 15 minutes to complete.

Background

Oracle Cloud Infrastructure Compute Service lets you create Virtual Machine and Bare Metal instances on which you can run your mission-critical applications with high availability.

What Do You Need?

  • Access to an instance of Oracle Cloud Infrastructure Compute Service
  • A Virtual Cloud Network in the compartment in which the instance will run
  • An SSH key pair (if creating a Linux VM)

section 1Log in and Select a Compartment

After logging in to your Oracle Cloud Infrastructure tenancy, you can create and launch a Virtual Machine or Bare Metal instance by completing the following steps:

  1. Log in to Oracle Cloud Infrastructure. Enter your account credentials from your welcome email in the Cloud Tenant, User Name, and Password fields.
  2. In the Oracle Cloud Infrastructure console, click Compute.
    Oracle Cloud Infrastructure console login screen, with the Compute menu highlighted.
    Description of the illustration selectcompute.png
  3. Select Instances under the Compute section.
    Oracle Cloud Infrastructure Compute Service page with Instances selected.
    Description of the illustration selectinstances.png
  4. Select the compartment in which to create the Virtual Machine or Bare Metal instance from the Compartment section. In this tutorial, we'll use the root compartment.
    Oracle Cloud Infrastructure Compute Service page with the root compartment selected in the Compartment section.
    Description of the illustration selectcompartment.png
  5. Click Launch Instance.
    Oracle Cloud Infrastructure Compute Service page with Launch Instance selected.
    Description of the illustration launch_instance.png

section 2Launch a Virtual Machine Instance

Specify the attributes of the Virtual Machine in the Launch Instance form:

The Launch Instance Form complete with values.
Description of the illustration launch_instance_values.png
  1. In the Name field, enter a name for the instance. For example, SalesVM.
  2. Oracle Cloud Infrastructure is hosted in Regions, which are localized geographic areas. Each Region contains three Availability Domains which are isolated and fault-tolerant data centers that can be used to ensure high availability. In the Availability Domain field, select the Availability Domain in which you want to run the instance. For example, scul:PHX-AD-1.
  3. From the list of options in the Image pull-down, choose an operating system to use. This can be an Oracle-provided image, of which there are multiple Linux and Windows options, or you can choose a custom image that you created. For example, Oracle-Linux-7.4-2017.08.25-0.
  4. The shape of an instance determines the number of CPUs, the amount of memory, and how much local storage an instance will have. Shape types with names that start with VM are Virtual Machines, while shape types with names that start with BM are Bare Metal instances. Choose the appropriate shape for your Virtual Machine instance in the Shape field. For example, VM.Standard1.4.
  5. In the Virtual Cloud Network field, select the Virtual Cloud Network for the instance. For example, QA_VCN. This is a software-defined version of a traditional on-premises network in the cloud. It includes subnets, route tables, and gateways in which your instances run. You must create a Virtual Cloud Network in a compartment before you can add an instance to that compartment.
  6. In the Subnet field, select the subnet to which to add the instance. For example, the public subnet scul:PHX-AD-1.
  7. You can optionally enter a private IP address in the Private IP Address field. For example, 10.0.0.50.
  8. Select Assign IP Address to make the instance publically accessible. Otherwise, deselect this option.
  9. You can optionally enter a hostname in the Hostname field. For example, sales-server.
  10. If you set a value for Hostname, then that name sets a read-only Fully Qualified Domain Name (FQDN) in the Fully Qualified Domain Name field. For example, sales-server.sub08242009230.qavcn.oraclevcn.com.
  11. If the operating system image for your instance uses SSH keys for authentication (for example, Linux instances), then you must provide an SSH public key. To choose a public key file, ensure that Choose SSH Key Files is selected, then click Browse.

    Description of the illustration browsesshkeys.png
    Choose the public key to upload (for example, id_rsa.pub), then click Open. Note: some operating systems may use a different interface for file selection.

    Description of the illustration opensshkey.png
    Alternatively, select Paste SSH Keys and then copy and paste your SSH public key into the field. For example, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVNPh09u35ejTZun3FNEGhrjL/CovPsHAh79pN0QVprxEJaW2zjmaBZF1Q6lkuyTRvraomIlduCYxrlnwCe8oyER5dY1zuJATWm7ZiqgsvIkhj8L+ea9dBZRvFvcnFsNFnt4ALZYkW2nB2EeTdvqVMHERjFKfbRMCcO0dusmBUEsvaaqLtrvVuHBjwoXIDKkT/PFkix4DWRZRkZIjmZ/y9kwrHO4W1FYsFi4LP1xIB1c9y2H4w0SBXAMv4NCSFEIgWPQly2NywMsgEbddjW+zPz+7YjYqjWfz5Fgchu7+N1gejsIdzg1/aLvDpze6TN9xLcZx5gt04jA3TR+xfs2Ab Tim@Corsair".
    Description of the illustration pastesshkey.png
  12. After reviewing your choices, click Launch Instance.
    Description of the illustration click_launch_instance.png

    While the instance is being created, its state is displayed as "PROVISIONING".

    Description of the illustration vm_provisioning.png

    The status changes to "RUNNING" when the instance is fully operational.

    Description of the illustration vm_running.png

section 3Launch a Bare Metal Instance

To launch a Bare Metal instance, follow the steps from Launch a Virtual Machine Instance. However, in the Shape field, choose a shape type whose name starts with BM. For example, BM.Standard1.36. Choosing a shape type whose name starts with BM creates a Bare Metal instance, rather than a Virtual Machine instance (whose shape types begin with VM).


more informationWant to Learn More?