io7m | single-page | multi-page
3.13. vm-console
Previous
3. Command-Line Interface
Up
3.15. vm-delete-boot-configurations
Next
3.14

# vm-define

- 3.14. vm-define
  - 3.14.1. Name
  - 3.14.2. Description
  - 3.14.3. Example

3.14.1

## Name

1
vm-define - Define virtual machines
3.14.2

## Description

1
The vm-define command defines a new virtual machine. The command will define the configuration of the virtual machine but will not create any of the underlying resources such as ZFS filesystems and/or volumes. The command will, by default, generate a new unique machine ID unless one is manually specified with the --machine option.
2

### 3.14.2.2 Parameters

Parameter | Type | Required | Description
--- | --- | --- | ---
--comment | java.lang.String | false | A comment describing the new virtual machine
--configuration | Path | false | The path to the configuration file (environment variable: $WAXMILL_CONFIGURATION_FILE)
--cpu-count | int | false | The number of CPU cores in the virtual machine
--machine | UUID | false | The ID of the new virtual machine
--memory-gigabytes | long | false | The size in gigabytes of the virtual machine's memory (added to --memory-megabytes)
--memory-megabytes | long | false | The size in megabytes of the virtual machine's memory (added to --memory-gigabytes)
--name | String | true | The name of the new virtual machine
--verbose | Log Level | false | Set the minimum logging verbosity level.

3.14.3

## Example

1

### 3.14.3.1 Example

    $ waxmill vm-define \
      --name 'com.io7m.example4' \
      --cpu-count 4 \
      --comment 'An example machine' \
      --memory-gigabytes 1 \
      --memory-megabytes 512

    $ waxmill vm-define \
      --name 'com.io7m.example5' \
      --cpu-count 4 \
      --comment 'An example machine' \
      --memory-gigabytes 1 \
      --memory-megabytes 512 \
      --machine 7c2bcb79-f20c-47fa-812b-8994f17f97b2

    $ waxmill vm-define \
      --name 'com.io7m.example5' \
      --cpu-count 4 \
      --comment 'An example machine' \
      --memory-gigabytes 1 \
      --memory-megabytes 512 \
      --machine 7c2bcb79-f20c-47fa-812b-8994f17f97b2
    ERROR com.io7m.waxmill.cmdline.Main: com.io7m.waxmill.exceptions.WXMExceptionDuplicate: A virtual machine already exists with the given ID.
      ID:                  7c2bcb79-f20c-47fa-812b-8994f17f97b2
      Machine (A) Name:    com.io7m.example5
      Machine (A) Source:  <unspecified>
      Machine (B) Name:    com.io7m.example5
      Machine (B) Source:  file:///etc/waxmill/vm/7c2bcb79-f20c-47fa-812b-8994f17f97b2.wvmx

3.13. vm-console
Previous
3. Command-Line Interface
Up
3.15. vm-delete-boot-configurations
Next
io7m | single-page | multi-page