Documentation Index

Fetch the complete documentation index at: https://docs.swxtch.io/llms.txt

Use this file to discover all available pages before exploring further.

Install cloudSwXtch via OCI Marketplace

Prev Next

WHAT TO EXPECT

In this article, users will learn how to deploy a cloudSwXtch instance via the Oracle Cloud Marketplace.

Please note: At this time, our only product offering in OCI is a BYOL instance of cloudSwXtch. This requires a user to contact swXtch.io for a license.

Prerequisites

A user should have a Compartment established in their Oracle Cloud console before they start to deploy a cloudSwXtch. For more information about compartments, please see the Managing Compartments page under Oracle Cloud Infrastructure Documentation.

Step Zero: Navigate to cloudSwXtch in the Oracle Marketplace

  1. Log in to Oracle Cloud.

  2. Navigate to the Oracle Cloud Marketplace using the Navigation menu at the top left corner.

  3. Select Marketplace and All Applications.

  4. Search for cloudSwXtch and select the product, cloudSwXtch BYOL.

  5. Click on Launch Instance.

  6. Select the desired Compartment.

  7. Accept Oracle Terms of Use.

  8. Click on Launch Instance.

Step One: Create Compute Instance (Basic information)

  1. Recommended: Give the Compute Instance a unique, meaningful Name. Something like US1-cloudSwXtch-01 can help identify the instace later.

  2. Confirm the Compartment is populated with your actual choice.

  3. Optional: Edit Placement and Advanced options.

  4. Scroll down to Shape and click on Change shape.

  5. Select the Instance type and Shape series according to your needs. You can check the requirements in the cloudSwXtch System Requirements.

  6. Select the Shape needed and be sure to select a minimum of 4 OCPUs and 16GB of RAM.
    OCI

  7. Optional: Change any other configuration as needed.

  8. Click on Select shape. at the bottom right of the modal.

  9. Optional: Back on Step 1, the Advanced options are displayed, where more settings can be changed, like an Initialization script, Tags, etc.

  10. When everything is configured, click on Next at the bottom right part of the modal.

Step Two: Create Compute Instance (Security)

  1. Optional: Change configuration as needed. cloudSwXtch does not need any specific configuration

  2. When everything is configured, click on Next at the bottom right part of the modal.

Step Three: Create Compute Instance (Networking)

  1. Recommended: type a meaningful name that will be used for the Control interface (VNIC name field)

  2. Select the VCN that will be used for the VM.

  3. Select the Subnet that will be used for the Control data.

  4. Optional: adjust the IPv4/6 assignment.

  5. IMPORTANT: Expand the Advanced options and select Hardware-assisted (SR-IOV) networking.

  6. Pick the desired SSH Key option according to the desired method.

  7. When everything is configured, click on Next at the bottom right part of the modal.

Step Four: Create Compute Instance (Storage)

  1. Optional: Change configuration as needed. cloudSwXtch does not need any specific configuration

  2. When everything is configured, click on Next at the bottom right part of the modal.

Step Five: Create Compute Instance (Review)

  1. A review of the configuration will be shown. This is the last chance to edit any misconfiguration. When the configuration is correct, click on Create at the bottom right.

Step Six: Attach a Secondary VNIC

When deploying a cloudSwXtch, users will need two VNICs. Both can share a single subnet for control and data plane communications (simpler), or use different subnets (better performance). In this step, we will walk through how to attach a secondary VNIC and how to manually add its IP to the cloudSwXtch instance.

  1. In the Instance description, go to the Networking tab and scroll down to Attached VNICs. Make sure that the Instance with cloudSwXtch installed is running. The user cannot attach a secondary VNIC if the machine is off.

  2. Select Create VNIC.

  3. Recommended: Assign a user-friendly name to the secondary VNIC. Otherwise, OCI will assign a randomized ID.

  4. Check that the compartment is the desired one.

  5. Select the Virtual cloud network (VCN) and the desired Subnet (can be the same Subnet for Single-Subnet operation or a different Subnet for better performance)

  6. Optional: Change the remaining configuration.

  7. Click on Submit in the lower right corner.

  8. Log in to the Instance with cloudSwXtch installed.

  9. The following commands will retrieve the MAC address and the assigned IPv4 address with the CIDR using OCI’s API. Then it will create a netplan configuration and test if everything is ok. Paste the following set of commands.

    sudo apt-get install -y jq
    
    PRIMARY_IF=$(ip route show default | awk '/default/ {print $5}')
    PRIMARY_MAC=$(cat /sys/class/net/$PRIMARY_IF/address)
    
    VNIC_DATA=$(curl -s -H "Authorization: Bearer Oracle" \
      http://169.254.169.254/opc/v2/vnics/)
    
    SECONDARY_MAC=$(echo "$VNIC_DATA" | jq -r --arg pmac "$PRIMARY_MAC" \
      '.[] | select(.macAddr | test($pmac;"i") | not) | .macAddr')
    SECONDARY_IP=$(echo "$VNIC_DATA" | jq -r --arg pmac "$PRIMARY_MAC" \
      '.[] | select(.macAddr | test($pmac;"i") | not) | .privateIp')
    PREFIX=$(echo "$VNIC_DATA" | jq -r --arg pmac "$PRIMARY_MAC" \
      '.[] | select(.macAddr | test($pmac;"i") | not) | .subnetCidrBlock' | cut -d'/' -f2)
    
    # Wait for the secondary interface to appear in the OS
    for i in {1..10}; do
      SECONDARY_IF=$(ip -br link | grep -i "$SECONDARY_MAC" | awk '{print $1}')
      [ -n "$SECONDARY_IF" ] && break
      sleep 2
    done
    
    # --- Safety guard: confirm all four values are populated ---
    echo "IF=$SECONDARY_IF  MAC=$SECONDARY_MAC  IP=$SECONDARY_IP  PREFIX=$PREFIX"
    if [ -z "$SECONDARY_IF" ] || [ -z "$SECONDARY_MAC" ] || [ -z "$SECONDARY_IP" ] || [ -z "$PREFIX" ]; then
      echo "ABORT: one or more values are empty — do NOT apply netplan. Investigate before continuing."
    else
      echo "All values present — safe to write netplan."
    fi
  1. If the console displays "All values present — safe to write netplan." paste the following sets of commands, which will activate the secondary NIC.

    # --- Write the netplan file (root-owned, via tee) ---
    sudo tee /etc/netplan/60-secondary-vnic.yaml > /dev/null <<NETEOF
    network:
      version: 2
      ethernets:
        $SECONDARY_IF:
          match:
            macaddress: $SECONDARY_MAC
          dhcp4: false
          addresses:
            - $SECONDARY_IP/$PREFIX
          mtu: 9000
    NETEOF
    
    sudo chmod 600 /etc/netplan/60-secondary-vnic.yaml
    
    # --- Apply and verify ---
    sudo netplan apply
    ip a show $SECONDARY_IF
  2. To ensure data can flow and make those changes permanent, run the following commands:

sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -F
sudo apt-get install -y iptables-persistent
sudo netfilter-persistent save

9.  Save the file and reboot the instance:

sudo reboot

Optional Step for BYOL: Contact swXtch.io for a license

Users deploying a BYOL instance of cloudSwXtch will need to contact swXtch.io for a license file. For more information. See How to License a cloudSwXtch.

NEXT STEPS

The cloudSwXtch is ready to use. The next step is to install the xNIC on each client expected to get traffic from the cloudSwXtch. See Installing xNIC for more information on preparing clients.  Refer to Licensing cloudSwXtch to license your cloudSwXtch.