# unikraft volumes attach

Attach a volume to an instance.

```
unikraft volumes attach --to=instance --at=path <volume> [flags]
```

## Examples

Attach a volume to a stopped instance:

```bash
unikraft volume attach my-volume --to my-instance --at /data
```

Attach a volume read-only:

```bash
unikraft volume attach my-volume --to my-instance --at /data --readonly
```

## Options

```
  --at path                   Absolute mount path inside the instance.
  -f, --field FIELD           Specify which fields to include in the output.
  -o, --output OUTPUT         Output format. One of: kv, table, json, yaml, raw, quiet, template.
  --readonly                  Mount volume as read-only.
  --to instance               Name or UUID of the instance to attach to.
```

## Options inherited from parent commands

```
  --config file               Path to the configuration file.
  --log-level level           Set the logging level. (default info)
  --log-type type             Set the log type. (default text)
  --profile name              Set the current profile.
  --telemetry                 Toggle anonymous usage analytics. (default true)
  --timeout duration          Set a deadline for the command (e.g. 30s, 5m, 1h).
```

## See Also

* [`unikraft volumes`](../volumes.mdx): Manage Unikraft Cloud volumes.

