Skip to main content

How to Resize Instances

Validated on 29 July 2023 - Last edited on 29 July 2023

FibaCloud Instances are Linux-based virtual machines (VMs) running on virtualized hardware. Every Instance you create is a new server that you can use independently or as part of a larger, cloud-based infrastructure.

Resizing a server changes the resources (CPU, RAM, and disk) that a server has. There are four resizing options for Instances:

  • Disk, CPU, and RAM: This option allows you to change the amount of CPU and RAM available to an Instance and permanently increase the size of an Instance disk.
  • Disk: This option increases the amount of Disks available to an Instance. When you increase the amount of disk, you can expand the existing disk or assign it as a new block storage.
  • IPv4 and IPv6: This option increases the number of IP addresses available for an Instance. IPv4 is Paid while IPv6 is free.
  • Backups and Snapshots: This option sizes your Backups and Snapshots right available for an Instance.

Increasing a Instances packades improves its performance. Increasing the size of its disk increases the amount of data you can store.

Considerations Before Resizing

  • Allow for about one minute of downtime per GB of used disk space, though the actual time necessary is typically shorter. You can check the disk storage on the filesystem with df / -h.

    Estimated downtime depends on disk usage even for resizes that do not change the amount of disk space. This is because the Instance may move to a new hypervisor, which transfers disk data over the network.

  • We strongly recommend taking a snapshot of the Instance before resizing.

    Instances can change hypervisors during resizing, and any change to a filesystem can result in data loss if something goes wrong. We strongly recommend that you back up Instances data before resizing. If you are using snapshots, you can delete the snapshot after you confirm the resizing was successful.

  • You cannot decrease the size of a Instances disk.

    Data is not always sequentially written in memory, so reducing the available space would risk data loss and filesystem corruption.

Resizing Instances with the API

You can resize Instances from the control panel or using the FibaCloud API.

How to upgrade Instances package with FibaCloud API?
Follow the steps below to upgrade your Instances package:
  1. Submit a GET request to get the upgradeable package list.
curl --request GET \
--url https://cloud.fibacloud.com/api/service/instances/{service_id}/upgrade/ \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json'

List the Package IDs in the returning request

 "package": [
{
"id": "-",
"name": "Packade 2",
"category": "Instances",
"price": {
}
},
{
"id": "-",
"name": "Packade 3",
"category": "Instances",
"price": {
}
},
{
"id": "-",
"name": "Packade 4",
"category": "Instances",
"price": {
}
}
]
  1. Send a POST request with the packade ID you want to upgrade.
curl --request POST \
--url https://cloud.fibacloud.com/api/service/instances/{service_id}/upgrade/ \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{
"package": 0,
"send": true
}'

As a result of your request, an upgrade invoice will be created and an automatic transaction will be made after collection.

Scaling the resources of your Instances with FibaCloud API
The following steps are required to scaling your instances resources:
  1. Submit a GET request to get the upgradeable resources list.
curl --request GET \
--url https://cloud.fibacloud.com/api/service/instances/{service_id}/upgrade/ \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json'

Upgradeable resources will be answered by API.

"resources": [
{
"id": -,
"name": "Additional Storage",
"type": "qty",
"items": [
{
"id": "-",
"name": "GB",
"price": -,
"setup_price": -,
"current_value": -,
"selected": true
}
],
"min": "0",
"max": "2000",
"step": 1,
"free_value": false,
"current_value": "-"
},
{
"id": -,
"name": "IPv4",
"type": "sliderinput",
"items": [
{
"id": "-",
"name": "",
"price": -,
"setup_price": 0,
"current_value": -,
"selected": true
}
],
"min": "1",
"max": "3",
"step": "1",
"free_value": "1",
"current_value": "-"
},
{
"id": -,
"name": "IPv6",
"type": "sliderinput",
"items": [
{
"id": "-",
"name": "",
"price": 0,
"setup_price": 0,
"current_value": 1,
"selected": true
}
],
"min": "0",
"max": "16",
"step": "1",
"free_value": "-",
"current_value": "-"
},
{
"id": -,
"name": "Backups",
"type": "sliderinput",
"items": [
{
"id": "-",
"name": "",
"price": -,
"setup_price": -,
"current_value": -,
"selected": true
}
],
"min": "0",
"max": "10",
"step": "1",
"free_value": "-",
"current_value": "-"
},
{
"id": -,
"name": "Snapshots",
"type": "sliderinput",
"items": [
{
"id": "-",
"name": "",
"price": -,
"setup_price": 0,
"current_value": -,
"selected": true
}
],
"min": "1",
"max": "10",
"step": "1",
"free_value": "-",
"current_value": "-"
},
{
"id": -,
"name": "IP Transit",
"type": "sliderinput",
"items": [
{
"id": "-",
"name": "TB",
"price": -,
"setup_price": 0,
"current_value": -,
"selected": true
}
],
"min": "12",
"max": "200",
"step": "1",
"free_value": "-",
"current_value": "-"
}
],
  1. Submit a POST request with the resource parameters you want to upgrade.
curl --request POST \
--url https://cloud.fibacloud.com/api/service/instances/{service_id}/upgrade/ \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{
"resource_id": qty_value
"send": true
}'

As a result of your request, an upgrade invoice will be created and an automatic transaction will be made after collection.

Resizing Instances with the Control Panel

Before resizing an Instance in the control panel, we recommend turning it off. We recommend doing this from the command line to avoid data corruption, so SSH into your Instance and issue the shutdown command:

sudo shutdown -h now

Resizing Instances with package

  1. Next, go to the FibaCloud Control Panel. On the Instances page, click on the name of the Instance you want to resize, then click the Upgrade option in the specific menu.

Resize VM Menu

  1. Once the Instances is powered down and you have chosen its new plan, click Save Changes. A progress bar displays as the resize takes place.

Resize VM

  1. When the resize event is finished, click the On/Off button to power the Instance back on.

Resize VM Start

Once the Instances is booted, you can begin verifying that your services are working as expected. If you took a snapshot of the Instances before doing the resize, you can now delete the snapshot.