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

kernel: Switch SCSI_VIRTIO driver to built-in #3047

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

foersleo
Copy link
Contributor

Issue number:

Closes #3045

Description of changes:

Enable usage of the Bottlerocket metal variant on other virtualization stacks where the boot device is provided through the scsis virtio driver.

Testing done:

I have built both metal kernels and as expected the only config changes we see in the resulting configs is the changed CONFIG_SCSI_VIRTIO:

config-x86_64-metal-k8s-1.23-diff:	  0 removed,   0 added,   1 changed
config-x86_64-metal-k8s-1.26-diff:	  0 removed,   0 added,   1 changed
==> 3045_scsi_virtio/config-x86_64-metal-k8s-1.23-diff <==
 SCSI_VIRTIO m -> y

==> 3045_scsi_virtio/config-x86_64-metal-k8s-1.26-diff <==
 SCSI_VIRTIO m -> y

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Enable usage of the Bottlerocket metal variant on other virtualization
stacks where the boot device is provided through the scsis virtio
driver.

Signed-off-by: Leonard Foerster <foersleo@amazon.com>
Copy link
Contributor

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

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

Nice!

@markusboehme
Copy link
Member

Tested with the following ad-hoc change to tools/start-local-vm:

diff --git a/tools/start-local-vm b/tools/start-local-vm
index c1ef649f..bdd58b98 100755
--- a/tools/start-local-vm
+++ b/tools/start-local-vm
@@ -228,7 +228,10 @@ launch_vm() {
         -cpu host
         -smp "${vm_cpus}"
         -m "${vm_mem}"
-        -drive index=0,if=virtio,format=raw,file="${boot_image}"
+        # -drive index=0,if=virtio,format=raw,file="${boot_image}"
+        -device virtio-scsi-pci,id=scsi0,num_queues=8
+        -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive0
+        -drive id=drive0,file="${boot_image}",if=none
     )
 
     # Plug the virtual primary NIC in as BDF 00:10.0 so udev will give it a

✔️

@foersleo foersleo merged commit be28f42 into bottlerocket-os:develop Apr 26, 2023
37 checks passed
@foersleo foersleo deleted the 3045_scsi_virtio branch April 26, 2023 11:14
@tommie
Copy link

tommie commented May 9, 2023

I just built bb7261e, and can confirm it boots on Hetzner Cloud. Thank you.

(I'm now stuck on something in systemd, but that's obviously after root is mounted, and may be a config issue.)

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.

Add virtio_scsi disk controller for QEMU virtual machines
4 participants