Exporting an OMI to a Bucket

You can export an OUTSCALE Machine Image (OMI) to an OUTSCALE Object Storage (OOS) bucket to create a backup or to enable other accounts in the same Region or in a different one to copy it.

Before exporting an OMI or a snapshot to another Region, you need to make sure that this action is authorized by all applicable third-party licenses. If the export is authorized, only an OMI export guarantees the application of third-party licenses in the target Region, whereas a snapshot export does not.

The OMI can then be imported to an account using a pre-signed URL of its manifest file. If the account is in the same Region as the OOS bucket, the full path to the OMI in the bucket can be used, if the account has the appropriate rights for the OMI. For more information, see Configuring a Pre-Signed URL and Configuring an Object ACL.

The manifest file is obsolete seven days after a completed export as it contains pre-signed URLs to the appropriate snapshots (pre-signed URL are valid for only seven days).

Exporting an Image to a Bucket Using Cockpit v2

  1. Click inside the Images dashboard to make checkboxes appear.

  2. Check the box of the image you want to export to an OOS bucket.
    The image is selected and an action menu appears.

  3. Click IconExport Export to OOS.
    The EXPORT IMAGE TO OOS BUCKET dialog box appears.

  4. Specify the information for the export:

    1. Select the format of the export disk (QCOW2 or RAW).

    2. In the OOS bucket name field, type the name of the OOS bucket where you want to export the image.

      You must have the appropriate write permissions for the bucket to which you want to export the image. For more information, see Managing Access to Your Buckets.

    3. (optional) In the OOS bucket prefix field, type a prefix for the copy of the image in the OOS bucket.
      For more information about prefixes, see About OOS > Objects.

  5. Click Export.
    The image is exported to the OOS bucket. To check the state of the image export task, see Getting Information About an OMI Export or Import Task.

Exporting an OMI to a Bucket Using OSC CLI

The CreateImageExportTask command exports an Outscale machine image (OMI) to an OUTSCALE Object Storage (OOS) bucket.
This action enables you to copy an OMI between accounts in different Regions. To copy an OMI in the same Region, you can also use the CreateImage method.
The copy of the OMI belongs to you and is independent from the source OMI.

You cannot export a shared or public OMI, as they do not belong to you. To do so, you must first copy it to your account. The copy then belongs to you and you can export it.

For more information, see About OMIs.

Request sample
$ osc-cli api CreateImageExportTask --profile "default" \
    --ImageId "ami-12345678" \
    --OsuExport '{
        "DiskImageFormat": "qcow2",
        "OsuBucket": "BUCKET",
        "OsuPrefix": "PREFIX",
      }'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • ImageId: The ID of the OMI to export.

  • OsuExport: Information about the OOS export task to create.

The CreateImageExportTask command returns the following elements:

  • ImageExportTask: Information about the OMI export task.

  • ResponseContext: Information about the context of the response.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ImageExportTask": {
    "Tags": [],
    "ImageId": "ami-12345678",
    "TaskId": "image-export-12345678",
    "Comment": "Export of image ami-12345678",
    "OsuExport": {
      "OsuPrefix": "PREFIX/ami-12345678/",
      "OsuBucket": "BUCKET",
      "DiskImageFormat": "qcow2"
    },
    "State": "pending/queued",
    "Progress": 0
  }
}

Related Pages

Corresponding API Methods