Deploy an image to an existing Compute Instance

While it's typically more common to deploy an Image to a new Compute Instance, you can deploy an image to an existing Compute Instance. Do this to maintain consistent billing or if to add the image alongside existing data.

📘

A Compute Instance can have up to 50 disks.

Method 1: Rebuild a Compute Instance

This is considered the "start over" method. You'll rebuild an existing Compute Instance by applying your image to it. This deletes all data and disks on the Compute Instance and creates new disks from the selected image.

📘

You should only use this method if you no longer need the data that's on the target Compute Instance.

  1. Access Cloud Manager and select Images from the left menu.

  2. Find the Image you want to use, click its option menu (...), and select Rebuild an Existing Linode.

  3. The Rebuild an Existing Linode from an Image panel opens. Select the Compute Instance you want to use and click Rebuild Linode.

  4. You're redirected to the Rebuild Compute Instance <Your Compute Instance name> dashboard. Set the options here as necessary:

    • From Image. Leave this set as is. ("From Image" indicates you're rebuilding from your image.)
    • Images. Your image is pre-selected here.
    • Root Password (Required). Set a password that you'll use to log in to the system as the root user. The root user is the main account and has access to the entire system, including files and commands. Make the password extremely strong to prevent attackers from gaining access to your system. By default, the root user can log in over Lish and SSH using this password. As a best practice you should not solely rely on this password as a means of access. See Set up and secure a Compute Instance for more information.
    • SSH Keys (Optional, but best practice). Secure login to your Compute Instance through SSH. These keys are created as a pair: a private key stored on your local computer, and a public key that you can upload to remote systems and services. Since your private key is kept safe and secure, and you only upload the public key, this is a much more secure method for authentication than the Root Password. See Manage SSH keys for more information.
    • Confirm. This process will overwrite existing data on the target Compute Instance. To confirm that this is OK, enter the name of thatCompute Instance.
  5. Click Rebuild Linode.

Method 2: Add a disk to a Compute Instance

If you want to keep an existing Compute Instance, you can restore your image to a separate disk on it. For example, use this method if you want multiple bootable configurations on your Compute Instance, and only need to access one at a time.

  1. Access the Cloud Manager, click the Linodes link in the sidebar, and select a Compute Instance from the list.

  2. Create a disk with the Image. Follow the instructions to create a disk using Cloud Manager. Keep the following considerations in mind:

    • Confirm there is enough unallocated storage space to accommodate the new disk for the desired Image. If you aren't sure of the size of the Image, open the Images page, find the Image within the list, and view the Size column.
    • When creating the disk, select the Create from Image option and select the Image you wish to deploy.
  3. Optionally create a swap disk. Your image may require a swap disk in order to boot. If you already have a swap disk on your Compute Instance from a previous image deployment (visible under the Disks panel), you can reuse that same disk with your new image. Otherwise, you can create a new swap disk:

    1. Navigate back to the Compute Instance's Storage tab and click the Add a Disk button.

    2. In the Add Disk form, select Create Empty Disk and choose the swap option from the Filesystem dropdown menu. Then enter a Label and Size (usually 128MB, 256MB, or 512MB). Click the Add button to create the disk.

  4. Create or edit a configuration profile. To boot using the new disk, the disk needs to be properly assigned within a new or existing configuration profile and selected as the Root Device.

    1. Navigate to the Compute Instance's Configuration tab and click the Add Configuration button. It's also possible to adjust an existing configuration profile by clicking the Edit link next to that configuration.

    2. Within the Add (or Edit) Configuration form that appears, assign the disk under Block Device Assignment and select that device as the Root Device. Here are the important fields within this form:

      FieldValue
      LabelA name for the configuration profile.
      CommentsEnter any comments that may help you remember the purpose for your new configuration profile, or any other notes you'd like to record.
      Select a KernelIn most cases, select GRUB 2.
      /dev/sdaChoose the disk for the new Image that was just deployed.
      /dev/sdbChoose the swap disk, if one is available.

      For all of Compute Instance's standard distribution images, the other fields can retain their default values. For Custom Images, you may need to update other parts of the configuration profile. Review the Managing Configuration Profiles on a Compute Instance and Install a Custom Linux Distribution on a Compute Instance guides for further guidance.

  5. Reboot the Compute Instance using the new Image. Navigate to the Configuration tab, find the new configuration profile in the list, and click the corresponding Boot link. This link may be displayed with the More Options ellipsis dropdown menu.

    Boot the configuration profile