---
title: "Create virtual machine storage from a disk image"
method: POST
path: "/vm/{rid}/storage/from-image"
tags: ["VM"]
---

# Create virtual machine storage from a disk image

`POST /vm/{rid}/storage/from-image`

Copy or convert a completed Downloader disk image into a writable managed RAW file or ZFS volume and attach it to a shut-off virtual machine. The source download remains unchanged. Omit size to use the image's virtual capacity, or specify a larger size in bytes; guest partitions and filesystems are not expanded automatically. Installer ISOs and images with external backing files are rejected. Compressed images must be extracted first. Storage topology changes are blocked while the VM is protected by replication.

## Path parameters

- `rid` integer, required

## Request body

- GithubComAlchemillahqSylveInternalInterfacesServicesLibvirtCreateStorageFromImageRequest
  - `bootOrder` integer
  - `downloadUUID` string, required
  - `emulation` 'virtio-blk' | 'virtio-9p' | 'ahci-hd' | 'ahci-cd' | 'nvme', required
  - `name` string, required
  - `pool` string, required
  - `recordSize` integer
  - `size` integer
  - `storageType` 'raw' | 'zvol' | 'image' | 'filesystem' | 'none', required
  - `volBlockSize` integer

## Response `201`

Created

- GithubComAlchemillahqSylveInternalAPIResponseGithubComAlchemillahqSylveInternalDbModelsVmStorage
  - `data` GithubComAlchemillahqSylveInternalDbModelsVmStorage
    - `bootOrder` integer
    - `dataset` GithubComAlchemillahqSylveInternalDbModelsVmVMStorageDataset
      - `guid` string
      - `id` integer
      - `name` string
      - `pool` string
    - `datasetId` integer
    - `emulation` 'virtio-blk' | 'virtio-9p' | 'ahci-hd' | 'ahci-cd' | 'nvme'
    - `enable` boolean
    - `filesystemTarget` string
    - `id` integer
    - `name` string
    - `pool` string
    - `readOnly` boolean
    - `recordSize` integer
    - `size` integer
    - `type` 'raw' | 'zvol' | 'image' | 'filesystem'
    - `uuid` string
    - `vmId` integer
    - `volBlockSize` integer
  - `error` string
  - `message` string
  - `status` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `413` — Request Entity Too Large
- `500` — Internal Server Error
- `503` — Service Unavailable

## Changes

- **2026-09-07** `883dbcb5b8be` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/alchemillahq/apis/sylve-api/changes/vm/:rid/storage/from-image/post.md)

---

[API](https://skmtc.dev/alchemillahq/apis/sylve-api.md) · [All operations](https://skmtc.dev/alchemillahq/apis/sylve-api/llms.txt) · [OpenAPI document](https://skmtc.dev/alchemillahq/apis/sylve-api/revisions/6d4b8bb77d9a?raw)
