io7m | single-page | multi-page
3.10. vm-add-passthru-device
Previous
3. Command-Line Interface
Up
3.12. vm-add-virtio-network-device
Next
3.11

# vm-add-virtio-disk

- 3.11. vm-add-virtio-disk
  - 3.11.1. Name
  - 3.11.2. Description
  - 3.11.3. Example

3.11.1

## Name

1
vm-add-virtio-disk - Add a Virtio disk to a virtual machine
3.11.2

## Description

1
The vm-add-virtio-disk command adds a disk to a virtual machine. The disk is a Virtio block storage device and, as such, requires a driver in the guest operating system that is capable of supporting Virtio.
2

### 3.11.2.2 Parameters

Parameter | Type | Required | Description
--- | --- | --- | ---
--backend | Storage Backend | true | A specification of the Virtio storage device backend to add
--comment | String | false | A comment describing the new disk
--configuration | Path | false | The path to the configuration file (environment variable: $WAXMILL_CONFIGURATION_FILE)
--device-slot | Device Slot | true | The slot to which the device will be attached.
--machine | UUID | true | The ID of the virtual machine
--open-option | OpenOption | false | The options that will be used when opening the storage device.
--verbose | Log Level | false | Set the minimum logging verbosity level.

3

### 3.11.2.3 Device Slot Syntax

    <deviceSlot> = <bus> ":" <slot> ":" <function>

    Where:
      <bus>      = [0 .. 255]
      <slot>     = [0 .. 31]
      <function> = [0 .. 7]

    Examples:
      0:0:0
      255:31:7

4

### 3.11.2.4 Storage Backend Syntax

    "file" ";" <path>
    | "zfs-volume"
    | "zfs-volume" ";" <size>

    Where:
      <path> = Any UNIX-like path
      <size> = Any non-negative multiple of 128000 (bytes)

    Examples:
      file;/tmp/xyz
      zfs-volume
      zfs-volume;1280000000

5

### 3.11.2.5 Open Options

Name | Description
--- | ---
NO_CACHE | Do not use caching (O_DIRECT).
SYNCHRONOUS | Writes to the file are synchronous (O_SYNC).
READ_ONLY | The file is opened read-only.

3.11.3

## Example

1

### 3.11.3.1 Example

    $ waxmill vm-add-virtio-disk \
      --machine de17174a-1b3c-4ebc-80af-cb239aa18cbd \
      --device-slot 0:4:0 \
      --backend file;/tmp/disk.img

3.10. vm-add-passthru-device
Previous
3. Command-Line Interface
Up
3.12. vm-add-virtio-network-device
Next
io7m | single-page | multi-page