Skip to content

Troubleshooting

Every provider error carries the API’s own message, its status and code, and a request id. Quote the request id when you ask for help. Where the fix is on your side, a hint usually follows the message; a few errors, such as a mistyped endpoint, come without one. Your API key is replaced by [redacted] in error text, in case a proxy in front of the API prints the request.

Error What it means What to do
401 unauthorized The key is wrong, revoked or expired Check VIRTSCALE_API_KEY, and the key’s expiry in the panel
403 permission_denied The key’s scopes do not cover the call Add the scope the error names, see Authentication. The virtscale_caller data source lists the key’s scopes and permissions
403 source_address_not_allowed The key is limited to certain networks and this address is not one Run from an allowed network. A key created with Default works only from the address it was created on: create a new key with Only these networks, or Any address, see Authentication
404 about the organization The organization id is wrong, or the key belongs to another organization Check VIRTSCALE_ORGANIZATION
400 invalid_request with org: Input should be a valid UUID The organization is not an id Use the UUID, not the name
404 not_found: Not Found, a bare message with no hint endpoint or VIRTSCALE_ENDPOINT is mistyped, so the path is not one the API has Check the endpoint, or remove it to use https://api.virtscale.nl

Only a 404 that says the resource itself is gone is read as gone. Every other 404 is an error, and the resource stays in the state.

Error What it means What to do
409 name_taken A live resource of that kind already has the name Choose another name, or import the one that exists
409 hostname_taken Another live instance of your organization has that hostname Choose another hostname
422 instance_type_unavailable The instance type does not exist, or is not offered to your organization Check the id, or give the size directly, see Your first instance
422 instance_type_unpriced The instance type exists but cannot be ordered in that region yet. No type can be ordered in production today Remove instance_type and give the size directly: vcpus, memory_mb and disk_gb, see Your first instance
422 instance_type_required The platform only creates instances from an instance type, and the configuration gave vcpus, memory_mb and disk_gb Set instance_type and remove the three sizes
422 invalid_spec The size is off the grid, or the request mixes an instance type with sizes The message says which. Use vcpus 1, 2, 4, 8, 16 or 32, memory_mb as whole GB from 1 to 128 times 1024, and disk_gb from 10 to 2000 in steps of 10, see Your first instance
422 storage_pool_unavailable, 422 network_profile_unavailable You named a storage_pool or network_profile that is not an active one in that region Remove the line, so that the platform chooses, or name one that is active in that region
422 public_ips_not_offered A virtscale_public_ip in a region that attaches its instances straight to a public network, such as fsn: it has no public IPs to allocate Remove the virtscale_public_ip, or build in a region that offers them
422 region_unavailable The region is not accepting instances, or is not open to your organization Pick a region from virtscale_regions
422 ssh_key_not_found An ssh_keys name was never imported Create the virtscale_ssh_key first
503 not_ready The feature, such as SSH keys or VPCs, is not switched on for this API yet. VPCs are not, in production today: a plan succeeds and the apply fails here Not retried. Try later, or ask support
503 not_ready on a change of vcpus or memory_mb Resizing in place is off for your organization. In production it is off for customer organizations and on for VirtScale’s internal ones Not retried. Put the old vcpus and memory_mb back, or ask support
422 workload_not_allowed workload_type = "infra" in an organization that is not an internal one of VirtScale Remove workload_type: the default is customer
422 user_data_invalid The API cannot deliver the user_data text to the instance The message says why. Give plain cloud-init text: a #cloud-config document, a script that starts with #!, or a MIME multipart document, see Your first instance
422 quota_exceeded A limit of your organization is reached The default is one public IP per region. Release one, or ask support for a higher limit
412 generation_mismatch Something else changed the resource while the provider did Apply again
409 operation_in_flight An earlier change of that resource is still being applied Wait and apply again. The provider repeats it for a while by itself
409 vm_action_not_allowed The platform does not let you make that change to the instance, a policy of its region Nothing to fix in the configuration
422 invalid_rule A firewall rule was refused The message names the field of every refused rule

Apply waits for the platform, and a wait has a ceiling:

Operation Waits up to
Create an instance, a VPC, a firewall change or an S3 bucket 20 minutes
Destroy an instance or a VPC 10 minutes
Allocate, associate, disassociate or release a public IP 10 minutes each

An instance that ends in error fails the apply at once, with the platform’s error class and detail. A firewall change that ends in error stops the wait, although the platform retries a few times and may succeed later. Run tofu plan to read the state as it is.

The provider retries like the AWS SDK’s standard mode, within what the API makes safe:

  • 429 rate_limited is retried for every request.
  • 502, 503, 504 and a lost connection are retried only for requests that are safe to send twice: reads, deletes, and creating an instance or importing an SSH key, which carry an Idempotency-Key.
  • Allocating, associating and disassociating a public IP are never retried after those errors.
  • A certificate that does not verify fails at once.
  • At most 5 attempts. The wait honours Retry-After, and is never longer than the run’s deadline.

When it gives up, the error is still the API’s own, followed by gave up after N attempts.

A create that lost its answer may have been applied. The error says so. The next apply fails with name_taken. Find the resource and import it.

Error What to do
409 vm_protected The instance has disable_api_termination = true. Set disable_api_termination = false and apply first, then destroy the instance or make the change that replaces it, see Your first instance
409 project_not_empty The project still holds an instance, a public IP or an address allocation. Delete those first
409 vpc_not_empty The VPC still has subnets. Delete them first
409 default_project The default project is never deleted. Remove it from the state with tofu state rm instead
409 bucket_not_empty Set force_destroy = true, apply, then destroy, see Object storage. A bucket the platform has not metered yet (no usage sample so far; one every 10 minutes) is not refused
409 bucket_already_exists on a new bucket A live bucket of yours has the name, or a deleted one still keeps it until its data is erased. Use another name

S3 access key: Access Key Secret Not Returned

Section titled “S3 access key: Access Key Secret Not Returned”

The API answers a repeated create with the stored result, which never holds the secret. The key exists, and the provider keeps it in the state and fails with this message. Run tofu destroy, or apply again, which replaces it. Both revoke the key. You then get a new one with its secret.

If the provider gave up before any answer, the key may exist with its secret lost. List the organization’s access keys in the panel, and revoke any you did not receive.

Run the call yourself with curl and the same key: an API reference page shows the request. If you ask for help, send the request id from the error. Never send the key.