Volumes
GET /v1/instances/{instance_id}/volumes returns volumes and meta, ordered by boot_index. Each entry has the same resource fields as the storage volume, including id, crn, performance and faults, plus device, boot_index, delete_on_termination, optional mount_path, fstype and mount. POST returns that same resource under volume.
- Console
- API
- CLI
- Go
Attach volume on the instance’s Volumes tab opens a dialog asking for the
Volume, and optionally a Device name — Leave blank to assign the
next available name — a Mount path and a Filesystem. Only volumes
the instance can actually take are offered.
available, and the
instance must be running or stopped. The disk is hot-plugged; device
picks the next free slot (vdb, vdc, …) unless you name one.
With mount_path set, the in-guest agent formats the disk — only if it is
blank — and mounts it there. fstype picks the filesystem: ext4 by default,
or xfs. Nothing else is accepted. Leave mount_path empty and you get the
block device and nothing else.
Detaching is DELETE /v1/instances/{instance_id}/volumes/{volume_id}, also
202, also requiring running or stopped. In the console it is the row
action on the instance’s Volumes tab, confirmed as Detach volume — and
the boot disk has no such control there, because detaching it is refused
anyway.
Network interfaces
GET /v1/instances/{instance_id}/interfaces returns interfaces and meta, ordered by boot_index, with the primary interface first. Each entry has the same resource fields as the network interface, including id, crn, subnet and attached_to, plus boot_index, primary and external. Read /v1/interfaces/{interface_id}/addresses for addresses and their floating IP summaries. The instance object has no primary or public IP fields.
subnet and attached_to are resource references containing id, crn and, when available, name. Read the subnet resource for its CIDRs, VPC and routing details. Launch requests still use string selectors in networks[].subnet; attachment requests use an existing interface selector. The following response excerpt omits unrelated fields:
Attaching and detaching
POST /v1/instances/{instance_id}/interfaces attaches an existing standalone
interface using the interface field. It keeps its address, MAC, and security
groups. Creating a NIC during attachment is not supported: create it through
the network interface API first. Detaching returns it to standalone state.
The instance must be running or stopped. The attachment is durable the
moment the call returns — it is part of the instance’s spec and survives
reboots — but the guest does not have the device when the call returns.
Delivery is asynchronous, and the response says what it takes:
The response wraps the same interface resource returned by the list in interface. It also includes restart_required when a restart is needed. Response excerpt:
restart_required is absent.
A running instance is given the device while it runs, where the region can
do that: the attachment reports no restart_required, and the interface
appears in the guest moments later. Poll GET /v1/instances/{instance_id}/interfaces
for the attachment, or watch the guest for a link carrying the mac above —
that MAC is the interface’s identity on the network, so it is what the device
arrives with.
Where the region cannot, the response carries restart_required: true, and a
hard reboot delivers it:
How many interfaces an instance may carry is a property of the region, and so
is whether a running guest can be given one. Where the limit is one, a second
attach is refused with 409 and a launch asking for two with 400. Treat
restart_required as the answer for the region you are in rather than
assuming either behaviour: it is absent when there is nothing to do but wait.- Console
- API
- CLI
- Go
Open the instance’s Networking tab and choose Attach NIC.
Select an existing Interface, then Attach interface. The selector’s
create action opens interface creation when you need a new standalone NIC.
Public addresses
networks[].floating_ip_assignment requests public floating IPs at launch:
Each requested family needs a directly attached address and a default route
to an internet gateway in that family. Allocations count against the matching
floating_ips_v4 or floating_ips_v6 quota. Enabling IPv6 later does not add a
floating IP automatically.
All public IPv4 addresses are floating IPs. IPv4 outbound access can also use
a NAT gateway. Native global IPv6 can reach the internet without a floating IP
when routing and security rules allow it; private ULA requires a public IPv6
floating IP for internet access. Attaching a public FIP makes outbound traffic
from its target address use that mapping. A private FIP translates traffic to
the private virtual address and its replies, without changing unrelated egress.
