# Export Instance

> The Export Instance function creates a downloadable image of a virtual machine, enabling it to be archived, transferred, or imported into another environment.

The Export Instance function creates a downloadable image of a virtual machine, enabling it to be archived, transferred, or imported into another environment.

:::info

USB storage devices are blocked by default. If accessing USB devices is needed, set the tuning option `cubesys.probeusb` to `true` using `CLI > tuning > configure` after logging in as admin.

:::

## How to export an Instance from CubeCOS {#how-to-export-an-instance-from-cubecos}

### Connect to admin console with SSH {#connect-to-admin-console-with-ssh}

```bash
    $ ssh admin@<your-cluster-vip>
    Warning: Permanently added '192.168.X.X' (ECDSA) to the list of known hosts.
    Password:
    Welcome to the Cube Appliance
    Enter "help" for a list of available commands
    License (type: trial) is valid for 98 days
    controller>
```

### Export Instance {#export-instance}

```bash
    controller> image
    controller:image> export_instance
```

### Select domain {#select-domain}

```bash
    1: default
    Enter index: 1
```

### Select tenant {#select-tenant}

```bash
    1: admin
    2: bigstack
    Enter index: 2
```

### Select instance {#select-instance}

```bash
    1: Webserver
    Enter index: 1
```

### Output format {#output-format}

```bash
    Is the instance installed apt - qemu-guest-agent?
    Is a requirement for this operation
    Enter 'YES' to confirm: YES
    Select output format:
    1: vmdk
    2: raw
    Enter index: 1
```

### Select output destination {#select-output-destination}

```bash
    1: usb
    2: local
    Enter index: 2
```

### Export in progress {#export-in-progress}

```bash
    [13:36:55] fetch Webserver disk information ... done
    [13:37:02] upload Webserver disk 0 (volume: 92b0808f-ffd3-4639-90eb-dfcc237e6b08) to image repository . done
    [13:37:19] download uploaded image to file /mnt/cephfs/glance/Webserver-export-ea54737a-20220127-133655-disk0.raw ...
    [=============================>] 100%
    [13:37:24] convert to /mnt/cephfs/glance/Webserver-export-ea54737a-20220127-133655-disk0.vmdk ...
        (100.00/100%)
    [13:37:24] delete uploaded image ... done
    Exporting Webserver complete. It is safe to remove the local image file.
```
