Create a Vultr instance template from an existing instance with the API, capturing its configuration and startup script.
Creating an instance template from an existing instance captures that instance's plan, OS, and configuration, including its marketplace app, SSH keys, startup script, and user data. For a Cloud Compute instance, it also captures the ISO. This is the only way to get a template with a startup script attached, since creating a template from scratch does not accept one.
This guide explains how to create an instance template from an existing instance using the Vultr API.
This endpoint ignores any label you send. It names the template Template: INSTANCE_LABEL, using the source instance's own label.
Send a GET request to the List Instances endpoint to retrieve all instances.
Note the id of the instance you want to create a template from.
Send a POST request to the Create Instance Template From Instance endpoint. Replace {instance-id} with the instance's ID.
A successful request returns an HTTP 200 OK response with an array containing the new template's details, the same response shape as Create Instance Template. The new template is permanent, not ephemeral.
0 Comments
Be the first to comment and share your perspective with the community.