Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spread: add device backend configuration support to QEMU #168

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

IsaacJT
Copy link

@IsaacJT IsaacJT commented May 2, 2023

This adds the device-backends configuration option, which allows the user to specify which backends for specific devices the system should use. This has no effect on its own, as the implementation is system backend specific; only the QEMU backend has been enabled with this functionality.

For the QEMU backend, this allows the user to specify which backend should be used for the disk and network devices. Currently, only the "network" and "disk" devices are able to be specified. If they are not specified, QEMU will use the default backends ("e1000" and "none", respectively).

This is useful for testing images with stripped-down kernels which do not provide drivers for the default network and storage backends, and only support other drivers (for example only virtio).

IsaacJT added 2 commits May 2, 2023 16:22
Adds the `device-backends` configuration option, which allows the user
to specify which backends for specific devices the system should use.
This has no effect on its own, as the implementation is system backend
specific.

Signed-off-by: Isaac True <isaac.true@canonical.com>
This allows the user to specify which backend should be used for
the disk and network devices. Currently, only the "network" and "disk"
devices are able to be specified. If they are not specified, QEMU will
use the default backends ("e1000" and "none", respectively).

An example of the usage of this could be setting the disk backend to be
"virtio", and the network backend to be "virtio-net-pci":

    backends:
      qemu:
        systems:
          - ubuntu-16.04:
              device-backends:
                disk: virtio
                network: virtio-net-pci

The configuration values are passed verbatim to the QEMU instance,
without checking if the values are supported by QEMU, allowing the
flexibility for the user to chose arbitrary backends.

In the case of the disk backend, the argument will be passed as the
value for the `if=` parameter of the `-drive` argument. For the network
device backend, the value will be passed as the value of the `driver=`
parameter of the `-device` argument.

Signed-off-by: Isaac True <isaac.true@canonical.com>
@IsaacJT
Copy link
Author

IsaacJT commented May 2, 2023

This is the more generic implementation of my previous PR #167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant