Skip to content

Attach a reserved IP to a VM

View as Markdown

Give a TIR Virtual Machine a reserved IP when users, SSH clients, DNS records, or firewall allow lists need an address that stays yours. By default a VM gets a public IP, unless you attach a reserved IP at launch. That default address is a floating IP, marked Floating; a reserved IP is marked Reserved. A VM’s addresses are under Network & Security > Network.

A floating IP can be a different address after you stop and start the VM, although a restart keeps it. A reserved IP is an address you reserve and attach to a VM.

  • A VM in your TIR project. See Create a VM.
  • Permission to update VMs in the project. See TIR Access Control.
  • A reserved IP that the VM’s project still holds in the same region, if you want to attach an existing one. To make one, see Reserve an IP.
  • Permission to create reserved IPs, if you want to convert a floating IP.

A reserved IP has a monthly fee of its own. For prices, see E2E’s pricing page.

Attach a reserved IP when you create the VM

Section titled “Attach a reserved IP when you create the VM”

On the Create VM form, pick the address under Reserve IP Address in Network & Security. To reserve a new one from the form, select Click here. The field attaches a reserved IP when you launch a single VM. When you launch several, attach an address to each VM once it runs. See Create a VM for the rest of the form.

  1. In Manage VMs, select the VM’s name, then go to Network & Security > Network.
  2. Select Add Reserved IP.
  3. In Select a reserved IP, pick an available reserved IP, then select Attach. To reserve a new one instead, select Reserve a new IP, which needs permission to create reserved IPs.

The address joins the VM’s public IPs, marked Reserved.

To keep the address a VM already has, select Convert to reserved on its floating IP. Check the monthly fee, tick “Are you sure you want to proceed?”, and select Convert. The floating IP is now a reserved IP, so it stays assigned to you and can be attached again even after the VM is stopped or deleted.

You can also keep the IP when you delete the VM. If the VM has a public IP and you have permission to create reserved IPs, the Delete VM dialog lets you reserve the VM’s address before it goes. See Delete a VM. If you leave that box clear when you delete the VM, its floating IP is released. A reserved IP attached to the VM returns to your project’s pool.

Select Detach next to the address under Public IP. Tick “Are you sure you want to proceed?” and select Detach.

Two cases need care:

  • While SSH is on, Detach on the VM’s only IP becomes available once you attach a reserved IP or a VPC.
  • When you detach the floating IP and only a VPC address remains, the VM loses its public access, and a new public IP has a monthly fee.

SSH reaches a VM through its public IP, a reserved IP, or a VPC address. The SSH command in Connection Details on the Overview tab uses the first address the VM has in this order: its public IP, its first reserved IP, its first VPC IP. While the VM still has its floating IP, the command uses that address. To sign in on the reserved IP, run ssh -i <private-key-file> root@<reserved-ip>. Replace <private-key-file> with the path of the private key file that matches a key on the VM, and <reserved-ip> with the reserved address. See Connect to a VM over SSH.

To give a CPU VM a private address as well, attach a VPC to the VM. If a reserved IP will not attach, see Troubleshooting TIR Virtual Machines.