Skip to content

Conversation

Apokleos
Copy link
Contributor

@Apokleos Apokleos commented Jul 1, 2025

runtime-rs: Change block device driver defualt with virtio-blk-* and update docs

When we run a kata pod with runtime-rs/qemu and with a default configuration toml,
it will fail with error "unsupported driver type virtio-scsi".
As virtio-scsi within runtime-rs is not so popular, we set default block device driver with virtio-blk-*.

And as the previous description for the block_device_driver was inaccurate or
outdated. To make it clear for users, This PR also updates the documentation to
provide a more precise explanation of its function.

Fixes #11488

Signed-off-by: alex.lyn alex.lyn@antgroup.com

# Examples include:
# - virtio-blk-pci
# - virtio-blk-ccw
# - nvidmm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment we're dropping scsi (which I think may be a mistake, as it tends to perform better than virtio-blk in cases where one can take advantage of iothreads) .... shouldn't we also remove the options that are scsi specific? (such as enable_iothreads)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope we're not dropping scis but just changing the default, we're using SCSI for NVME Fabrics since this performs better. Need to create a mental note to change this in the GPU use-case to have the SCSI per default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I was hoping to hear your voice about dropping virtio-scsi. I can say yes, in some cases, it's still useful.
With your thoughts, I agree with just changing the default from virtio-scsi to virtio-blk-*.
One more thing, currently, hotplugging virtio-scsi is not supported, shall we have to support hot-plugging virtio-scsi device in qemu-rs ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Apokleos, yep, that should be supported in qemu-rs. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure @fidencio I raise an issue to track it

@Apokleos Apokleos requested a review from lifupan July 1, 2025 12:14
@BbolroC
Copy link
Member

BbolroC commented Jul 1, 2025

With the current go-runtime, I can see the following:

For x86_64:

-device virtio-scsi-pci,id=scsi0,disable-modern=true

For s390x:

-device virtio-scsi-ccw,id=scsi0,devno=fe.0.0003

However, nothing is actually attached to it, so we can remove them from the command line.

Therefore, I think not defaulting to virtio-scsi and updating the configuration is a coherent move.

But one question remains (similar to Fabi’s):

  • Should we make the implementation consistent with the message unsupported driver type virtio-scsi? I still see several places implementing virtio-scsi, even though users can no longer select that option through the configuration file.

@Apokleos
Copy link
Contributor Author

Apokleos commented Jul 2, 2025

With the current go-runtime, I can see the following:

For x86_64:

-device virtio-scsi-pci,id=scsi0,disable-modern=true

For s390x:

-device virtio-scsi-ccw,id=scsi0,devno=fe.0.0003

However, nothing is actually attached to it, so we can remove them from the command line.

Therefore, I think not defaulting to virtio-scsi and updating the configuration is a coherent move.

But one question remains (similar to Fabi’s):

  • Should we make the implementation consistent with the message unsupported driver type virtio-scsi? I still see several places implementing virtio-scsi, even though users can no longer select that option through the configuration file.

Honestly, I am thinking

With the current go-runtime, I can see the following:

For x86_64:

-device virtio-scsi-pci,id=scsi0,disable-modern=true

For s390x:

-device virtio-scsi-ccw,id=scsi0,devno=fe.0.0003

However, nothing is actually attached to it, so we can remove them from the command line.

Therefore, I think not defaulting to virtio-scsi and updating the configuration is a coherent move.

But one question remains (similar to Fabi’s):

  • Should we make the implementation consistent with the message unsupported driver type virtio-scsi? I still see several places implementing virtio-scsi, even though users can no longer select that option through the configuration file.

As I know that, the cold plugging virtio-scsi in runtime-rs has been implemented by Pavel @pmores but now the hotp-lugging mode is still unimplemented. Honestly, I am thinking if we are planning to support it or just stop supporting it as it is.

@Apokleos
Copy link
Contributor Author

Apokleos commented Jul 2, 2025

cc @pmores FYI

@Apokleos Apokleos force-pushed the default-blk-driver branch from 545b5cc to f02b7ad Compare July 2, 2025 03:13
@BbolroC
Copy link
Member

BbolroC commented Jul 2, 2025

@Apokleos The opinions above have answered my question. Please ignore my comment. Thanks!

@Apokleos
Copy link
Contributor Author

Apokleos commented Jul 4, 2025

Hey @zvonkok @fidencio as we disscussed, I have a summary:

    1. we change the default block device driver to virtio-blk-* aligned with other vmms in runtime-rs.
    1. we should still support virtio-scsi in runtime-rs specially within qemu-rs. please see the issue

Are there any concerns about defaulting to virtio-blk-* as the block device driver ?

@fidencio
Copy link
Member

fidencio commented Jul 4, 2025

Hey @zvonkok @fidencio as we disscussed, I have a summary:

    1. we change the default block device driver to virtio-blk-* aligned with other vmms in runtime-rs.
    1. we should still support virtio-scsi in runtime-rs specially within qemu-rs. please see the issue

Are there any concerns about defaulting to virtio-blk-* as the block device driver ?

No more concerns from my side, @Apokleos!
Thanks for taking care of this one!

@Apokleos Apokleos force-pushed the default-blk-driver branch from f02b7ad to b0fd50f Compare July 8, 2025 07:49
@Apokleos
Copy link
Contributor Author

Apokleos commented Jul 8, 2025

Hi @fidencio @zvonkok @BbolroC @stevenhorsman If we agree on defaulting the block device driver to virtio-blk-* in runtime-rs, should we move it forward ? Thx a lot.

Copy link
Member

@BbolroC BbolroC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @Apokleos !

Apokleos added 2 commits July 11, 2025 17:40
When we run a kata pod with runtime-rs/qemu and with a default
configuration toml, it will fail with error "unsupported driver type
virtio-scsi".
As virtio-scsi within runtime-rs is not so popular, we set default block
device driver with `virtio-blk-*`.

Fixes kata-containers#11488

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
The previous description for the `block_device_driver` was inaccurate or
outdated. This commit updates the documentation to provide a more
precise explanation of its function.

Fixes kata-containers#11488

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
@fidencio fidencio force-pushed the default-blk-driver branch from af6311e to 9cc14e4 Compare July 11, 2025 15:41
@fidencio
Copy link
Member

I've rebased this one and will get it merged after the tests are finished (and passing).
Thanks @Apokleos!

Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @Apokleos!

@fidencio fidencio merged commit 4a79c25 into kata-containers:main Jul 11, 2025
383 of 393 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runtime-rs: Change default block device driver from virtio-scsi to virtio-blk-*
6 participants