-
Notifications
You must be signed in to change notification settings - Fork 5k
iso: Fix console for vfkit/krunkit #20832
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
base: master
Are you sure you want to change the base?
Conversation
The serial console name depends on the driver. We had setting for qemu that does not work for vfkit and krunkit, breaking boot from minikube iso. Fixed by using 2 console= options, one is known to work for qemu, and one for vfkit and krunkit. With this we can use the same iso image with qemu, vfkit, and krunkit. This will allow simplifying vfkit driver. Previously we had to extract the kernel and initrd and start it using the legacy --kernel, --kernel-cmdline and --initrd options. I tested this by building the iso with this fix and running with --iso-url. Example run with qemu: % minikube start -p qemu --driver qemu --container-runtime containerd \ --iso-url file://$PWD/minikube-arm64.iso 😄 [qemu] minikube v1.36.0 on Darwin 15.5 (arm64) ✨ Using the qemu2 driver based on user configuration 🌐 Automatically selected the socket_vmnet network 👍 Starting "qemu" primary control-plane node in "qemu" cluster 🔥 Creating qemu2 VM (CPUs=2, Memory=6000MB, Disk=20000MB) ... 📦 Preparing Kubernetes v1.33.1 on containerd 1.7.23 ... ▪ Generating certificates and keys ... ▪ Booting up control plane ... ▪ Configuring RBAC rules ... 🔗 Configuring bridge CNI (Container Networking Interface) ... 🔎 Verifying Kubernetes components... ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5 🌟 Enabled addons: default-storageclass, storage-provisioner 🏄 Done! kubectl is now configured to use "qemu" cluster and "default" namespace by default Example run with krunkit: % minikube start -p krunkit --driver krunkit --container-runtime containerd \ --iso-url file://$PWD/minikube-arm64.iso 😄 [krunkit] minikube v1.36.0 on Darwin 15.5 (arm64) ✨ Using the krunkit (experimental) driver based on user configuration 👍 Starting "krunkit" primary control-plane node in "krunkit" cluster 🔥 Creating krunkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ... 📦 Preparing Kubernetes v1.33.1 on containerd 1.7.23 ... ▪ Generating certificates and keys ... ▪ Booting up control plane ... ▪ Configuring RBAC rules ... 🔗 Configuring bridge CNI (Container Networking Interface) ... 🔎 Verifying Kubernetes components... ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5 🌟 Enabled addons: default-storageclass, storage-provisioner 🏄 Done! kubectl is now configured to use "krunkit" cluster and "default" namespace by default
Hi @nirs. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Can one of the admins verify this patch? |
@afbjorklund can you review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see that hvc0
is documented anywhere (buildroot only uses it for ppc64le) but it sounds reasonable.
It seems to only be mentioned here: https://github.com/crc-org/vfkit/blob/main/doc/usage.md
EDIT: OK, it is also upstream. "Use the first virtio console device as system console."
https://developer.apple.com/documentation/virtualization/running-linux-in-a-virtual-machine
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: afbjorklund, nirs The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
ok-to-build-image |
Hi @nirs, we have updated your PR with the reference to newly built kicbase image. Pull the changes locally if you want to test with them or update your PR further. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@afbjorklund it is also mentioned in the kernel documentation:
Not sure why it is documented only for Xen and PowerPC, maybe someone forgot to updated this. |
@cfergeau can you review? |
I meant to say "iso", now it built a useless kicbase instead (feel free to remove that commit) |
I was wondering why the bot added kicbase instead of iso :-) |
ok-to-build-iso |
This comment has been minimized.
This comment has been minimized.
hvc0 looks good to me, ttyAMA0 is apparently when you have a UART serial port, which vfkit unfortunately does not have (this would allow for early boot messages) |
@medyagh do you know why the ISO PR Build Push failed? it seems to be accessible only to Googlers, unlike the other Jenkins jobs. I built and tested this iso on arm64, and built it for x86_64, so it should be ok. |
See the logs at: somehow for this PR the commit changed, I wonder if you force-pushed and squashed commits after build command? |
@afbjorklund asked to build and image instead of an iso, so I forced push to drop the image commit added by the boot. It seems that @afbjorklund asked to build an iso after I pushed but maybe it was in parallel. Should I rebase on master and ask to build an iso again? I don't want waste hours of build time if it is going to fail again. |
ok-to-build-iso |
Hi @nirs, we have updated your PR with the reference to newly built ISO. Pull the changes locally if you want to test with them or update your PR further. |
ok-to-test |
This comment has been minimized.
This comment has been minimized.
kvm2 driver with docker runtime
Times for minikube ingress: 14.5s 14.5s 15.0s 15.0s 15.5s Times for minikube start: 52.1s 52.2s 48.2s 52.4s 52.7s docker driver with docker runtime
Times for minikube start: 25.8s 21.8s 26.0s 21.7s 21.6s Times for minikube ingress: 10.3s 13.8s 12.2s 12.8s 12.3s docker driver with containerd runtime
Times for minikube start: 20.5s 22.2s 20.5s 24.2s 21.8s Times for minikube (PR 20832) ingress: 39.3s 40.3s 38.8s 39.3s 39.3s |
iso: Fix console for vfkit/krunkit
The serial console name depends on the driver. We had setting for qemu
that does not work for vfkit and krunkit, breaking boot from minikube
iso.
Fixed by using 2 console= options, one is known to work for qemu, and
one for vfkit and krunkit. With this we can use the same iso image with
qemu, vfkit, and krunkit.
This will allow simplifying vfkit driver. Previously we had to extract
the kernel and initrd and start it using the legacy --kernel,
--kernel-cmdline and --initrd options.
I tested this by building the iso with this fix and running with
--iso-url.
Example run with qemu
Example run with krunkit