io7m | single-page | multi-page
3.26. vm-set
Previous
3. Command-Line Interface
Up
4. API
Next
3.27

# vm-update-boot-configurations

- 3.27. vm-update-boot-configurations
  - 3.27.1. Name
  - 3.27.2. Description
  - 3.27.3. Examples

3.27.1

## Name

1
vm-update-boot-configurations - Add or update boot configurations for a virtual machine
3.27.2

## Description

1
The vm-update-boot-configurations adds or updates boot configurations within a given virtual machine. The boot configurations are specified using an XML format. The precise format of the boot configurations elements are given in the urn:com.io7m.waxmill.vm:1:0 schema [1].
2

### 3.27.2.2 Parameters

Parameter | Type | Required | Description
--- | --- | --- | ---
--configuration | Path | false | The path to the configuration file (environment variable: $WAXMILL_CONFIGURATION_FILE)
--file | Path | true | A file containing boot configurations
--machine | UUID | true | The ID of the virtual machine
--update | Boolean | false | Update existing boot configurations
--verbose | Log Level | false | Set the minimum logging verbosity level.

3.27.3

## Examples

1
The Waxmill package currently supports booting virtual machines using UEFI or grub-bhyve.
2
An example boot configuration that attaches an OpenBSD installer CD to device 0:4:0, and boots the installation kernel using grub-bhyve:
3

### 3.27.3.3 OpenBSD GRUB-bhyve

    <?xml version="1.0" encoding="UTF-8" ?>

    <BootConfigurations xmlns="urn:com.io7m.waxmill.vm:1:0">
      <BootConfigurationGRUBBhyve name="install">
        <BootDiskAttachments>
          <BootDiskAttachment>
            <DeviceSlot bus="0"
                        slot="4"
                        function="0"/>
            <StorageBackendFile path="/storage/images/openbsd/install67.iso"/>
          </BootDiskAttachment>
        </BootDiskAttachments>
        <GRUBBhyveKernelOpenBSD>
          <BSDBootDevice kernelPath="/6.7/amd64/bsd.rd">
            <DeviceSlot bus="0"
                        slot="4"
                        function="0"/>
          </BSDBootDevice>
        </GRUBBhyveKernelOpenBSD>
      </BootConfigurationGRUBBhyve>
    </BootConfigurations>

4
An example boot configuration that attaches an OpenBSD installer CD to device 0:4:0, and boots machine using UEFI:
5

### 3.27.3.5 OpenBSD UEFI

    <?xml version="1.0" encoding="UTF-8" ?>

    <BootConfigurations xmlns="urn:com.io7m.waxmill.vm:1:0">
      <BootConfigurationUEFI name="install"
                             firmware="/usr/local/share/uefi-firmware/BHYVE_UEFI.fd">
        <BootDiskAttachments>
          <BootDiskAttachment>
            <DeviceSlot bus="0"
                        slot="4"
                        function="0"/>
            <StorageBackendFile path="/storage/images/openbsd/install67.iso"/>
          </BootDiskAttachment>
        </BootDiskAttachments>
      </BootConfigurationUEFI>
    </BootConfigurations>

6

### 3.27.3.6 Example

    $ cat boot.xml
    <?xml version="1.0" encoding="UTF-8" ?>

    <BootConfigurations xmlns="urn:com.io7m.waxmill.vm:1:0">
      <BootConfigurationGRUBBhyve name="install">
        <GRUBBhyveKernelOpenBSD>
          <BSDBootDevice kernelPath="/bsd.rd">
            <DeviceSlot bus="0"
                        slot="4"
                        function="0"/>
          </BSDBootDevice>
        </GRUBBhyveKernelOpenBSD>
      </BootConfigurationGRUBBhyve>
    </BootConfigurations>

    $ waxmill vm-update-boot-configurations --machine 538a90e4-d50d-4511-8643-ae418279bac4 --file boot.xml
    INFO com.io7m.waxmill.cmdline.internal.WXMCommandVMUpdateBootConfigurations: Parsed 1 boot configurations
    INFO com.io7m.waxmill.cmdline.internal.WXMCommandVMUpdateBootConfigurations: Added new boot configuration: install

    $ waxmill vm-update-boot-configurations --machine 538a90e4-d50d-4511-8643-ae418279bac4 --file boot.xml
    INFO com.io7m.waxmill.cmdline.internal.WXMCommandVMUpdateBootConfigurations: Parsed 1 boot configurations
    ERROR com.io7m.waxmill.cmdline.internal.WXMCommandVMUpdateBootConfigurations: A boot configuration already exists with the given name: install

    $ waxmill vm-update-boot-configurations --machine 538a90e4-d50d-4511-8643-ae418279bac4 --file boot.xml --update
    INFO com.io7m.waxmill.cmdline.internal.WXMCommandVMUpdateBootConfigurations: Parsed 1 boot configurations
    INFO com.io7m.waxmill.cmdline.internal.WXMCommandVMUpdateBootConfigurations: Updated boot configuration: install

## Footnotes

1
Use the schema command to view the urn:com.io7m.waxmill.vm:1:0 schema.

#### Footnote References

- Footnote Reference 3.27.2.1

3.26. vm-set
Previous
3. Command-Line Interface
Up
4. API
Next
io7m | single-page | multi-page