-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add back service to mount VirtualBox host directory into the guest. #14784
Add back service to mount VirtualBox host directory into the guest. #14784
Conversation
|
Hi @eiffel-fl. 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/test-infra repository. |
33bc264
to
3301b6f
Compare
Can one of the admins verify this patch? |
I built the iso, but it still does not auto mount the
When I run
in this iso, This iso has a My guess is we are still missing the |
I did not add this binary as I do not know if it was needed, but it seems
This is intended, |
2f123ea
to
523e2e7
Compare
I updated the recipe and built the corresponding image: $ minikube start --driver=kvm --iso-path=file://$(pwd)/minikube-amd64-vbox.iso
...
$ minikube ssh
_ _
_ _ ( ) ( )
___ ___ (_) ___ (_)| |/') _ _ | |_ __
/' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)
$ $ VBoxControl version
Oracle VM VirtualBox Guest Additions Command Line Management Interface Version 5.2.42
(C) 2008-2020 Oracle Corporation
All rights reserved.
5.2.42r137960 |
I tried your image, but it would not boot for me, so I built the image again from your branch. It went further this time, but it fails with
which is a little strange, given that the manual says Also, the |
It is highly possible their
I do not understand it. |
I don't totally understand it, either, but if you run
|
I think you are right, it was a mistake to try to be smarter than the previous recipe. |
523e2e7
to
acf7c48
Compare
I removed the faulty option from the |
Looks ok /ok-to-test |
kvm2 driver with docker runtime
Times for minikube start: 58.5s 54.0s 57.9s 56.0s 55.8s Times for minikube ingress: 25.1s 26.1s 25.6s 29.6s 29.1s docker driver with docker runtime
Times for minikube start: 27.6s 28.4s 27.3s 28.6s 28.7s Times for minikube ingress: 20.9s 22.5s 22.0s 23.5s 21.9s docker driver with containerd runtime
Times for minikube start: 23.5s 23.3s 23.9s 23.4s 23.2s Times for minikube ingress: 27.5s 27.5s 27.4s 27.5s 37.5s |
These are the flake rates of all failed tests.
Too many tests failed - See test logs for more details. To see the flake rates of all tests by environment, click here. |
I don't know why, but your iso images will not boot for me, but the ones I build work.
@afbjorklund , did @eiffel-fl's image work for you? Anyway, I built it again, and it works, and I think dropping the However, I still think you should change the name of |
acf7c48
to
82665a5
Compare
I rename the service to its previous name: $ minikube ssh
_ _
_ _ ( ) ( )
___ ___ (_) ___ (_)| |/') _ _ | |_ __
/' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)
$ cat /etc/systemd/system/multi-user.target.wants/vboxservice.service
[Unit]
Description=VirtualBox Mount Service
ConditionVirtualization=oracle
[Service]
ExecStartPre=-/usr/sbin/modprobe vboxguest
ExecStartPre=-/usr/sbin/modprobe vboxsf
# Normally, VirtualBox only syncs every 20 minutes. This syncs on start, and
# forces an immediate sync if VM time is over 5 seconds off.
ExecStart=/usr/sbin/VBoxService -f --disable-automount --timesync-set-start --timesync-set-threshold 5000
[Install]
WantedBy=multi-user.target
Sadly, I do not why too... |
Fixes: 770d41f ("Use kernel 5.10 for minikube.iso.") Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
82665a5
to
aa63b4f
Compare
kvm2 driver with docker runtime
Times for minikube start: 56.6s 54.6s 55.6s 56.2s 55.5s Times for minikube ingress: 29.2s 28.7s 29.7s 26.2s 31.2s docker driver with docker runtime
Times for minikube start: 28.4s 28.6s 29.8s 28.8s 28.7s Times for minikube ingress: 22.5s 24.0s 22.0s 26.0s 23.0s docker driver with containerd runtime
Times for minikube start: 25.0s 24.3s 24.3s 25.0s 24.8s Times for minikube ingress: 27.0s 27.0s 27.0s 27.0s 27.0s |
These are the flake rates of all failed tests.
To see the flake rates of all tests by environment, click here. |
Thank you @eiffel-fl, this one (aa63b4f) seems to be working great for me, and I think it's good to go. I really appreciate the time you spent on it. Is there anyone else who has tested it, especially on a mac? @adam-olema? @nwbt? |
I broke the thing, so sort of normal I try to fix it!
If anyone wants to test, you can use this image. |
What do we need to get this reviewed and merged in? |
Let's try something: |
Pouin pouin pouin pouin 😅😅😅. |
Hi,
It seems to be fully working. |
@eiffel-fl, I was looking at the bot response at the beginning of the PR, and it says
But I think you need to be a member of the Kubernetes organization to use /lgtm to add the label, or perhaps one of the Reviewers. There is also the Testing and Merge Workflow documentation. |
This is my understanding too that only members of this organization can use /slash-command. |
I am not experienced with PRs in this project, but if I am reading it right, perhaps it won't get reviewed or merged without the lgtm and the assign to @afbjorklund ? |
FYI. What it does is provide the ability to sync VM clock with the host which is much needed for certificate validation considering systemd-timesyncd isn't enabled. Here is a better explanation. VirtualBox is largely unusable due to the previous changes. |
Thank you a lot for this links. francis@pwmachine:~/Codes/kinvolk$ date
lun. 03 oct. 2022 11:01:04 CEST
francis@pwmachine:~/Codes/kinvolk$ minikube ssh -- date
Mon Oct 3 09:01:10 UTC 2022 |
I believe the main issue is that Minikube no longer has the virtualbox-guest-utils package installed that provide the utils to manage timesync + automount. The problem that timesync solves is that if the clock in the guest VM drifts beyond a certain number of seconds, it will then synchronize the clock with the host. Alternatively, something like NTP can be used in the guest VM to not have to rely on the host to synchronize the clock. Without either solution in place, your guest VM clock may eventually end up being minutes, hours or days behind causing SSL verification to fail among other possible issues. I have verified that the
|
It makes totally sense, thank you for the precision.
Normally, the driver is OK because it is now in upstream kernel, this is why I removed everything about |
/ok-to-build-iso |
@@ -179,7 +179,7 @@ mkdir -p /var/lib/boot2docker/etc/ | |||
# VirtualBox Host Mounting | |||
# - this will bail quickly and gracefully if we're not in VBox | |||
if modprobe vboxguest &> /dev/null && modprobe vboxsf &> /dev/null; then | |||
mountOptions='defaults,iocharset=utf8' |
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.
@eiffel-fl
I am curious why we remove iocharset=utf8
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 removed this because it not recognized by the kernel:
$ minikube start --driver=kvm --iso-url=file://$(pwd)/minikube-v1.27.0-1665598505-14784-amd64.iso
😄 minikube v1.26.1 sur Ubuntu 20.04
...
$ minikube ssh
_ _
_ _ ( ) ( )
___ ___ (_) ___ (_)| |/') _ _ | |_ __
/' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)
$ modprobe vboxguest
$ sudo mkdir /bar
$ sudo mount -t vboxsf -o defaults,iocharset=utf8 /mnt /bar
mount: /bar: wrong fs type, bad option, bad superblock on /mnt, missing codepage or helper program, or other error.
$ sudo dmesg | tail
[ 1009.804852] docker0: port 1(veth2bfee67) entered blocking state
[ 1009.804854] docker0: port 1(veth2bfee67) entered disabled state
[ 1009.804912] device veth2bfee67 entered promiscuous mode
[ 1010.449087] eth0: renamed from vethcce140b
[ 1010.454695] docker0: port 1(veth2bfee67) entered blocking state
[ 1010.454697] docker0: port 1(veth2bfee67) entered forwarding state
[ 1016.802729] kauditd_printk_skb: 30 callbacks suppressed
[ 1016.802730] audit: type=1325 audit(1665651863.996:191): table=filter family=2 entries=50 op=xt_replace pid=10811 subj=kernel comm="iptables-restor"
[ 1016.804055] audit: type=1325 audit(1665651863.997:192): table=nat family=2 entries=70 op=xt_replace pid=10811 subj=kernel comm="iptables-restor"
[ 1114.343757] vboxsf: Unknown parameter 'iocharset'
Also, I suspect utf8
is the default regarding the kernel sources:
$ pwd
.../linux/fs/vboxsf
$ git grep 'utf8'
dir.c:122: end = &info->name.string.utf8[info->name.size];
dir.c:129: end = &info->name.string.utf8[info->name.size];
dir.c:150: info->name.string.utf8,
dir.c:162: return dir_emit(ctx, info->name.string.utf8, info->name.length,
dir.c:398: memcpy(ssymname->string.utf8, symname, symname_size);
shfl_hostintf.h:71: u8 utf8[2];
super.c:146: /* Load nls if not utf8 */
super.c:148: if (strcmp(nls_name, "utf8") != 0) {
super.c:182: strlcpy(folder_name->string.utf8, fc->source, size);
super.c:193: root_path.string.utf8[0] = '/';
super.c:194: root_path.string.utf8[1] = 0;
super.c:361: err = vboxsf_set_utf8();
super.c:363: vbg_err("vboxsf_setutf8 error %d\n", err);
utils.c:372: out = shfl_path->string.utf8;
utils.c:385: nb = utf32_to_utf8(uni, out, out_len);
utils.c:395: shfl_path->length = out - shfl_path->string.utf8;
utils.c:408: memmove(shfl_path->string.utf8, path, path_len);
utils.c:409: shfl_path->string.utf8[path_len] = 0;
utils.c:418: const unsigned char *utf8_name, size_t utf8_len)
utils.c:426: in = utf8_name;
utils.c:427: in_bound_len = utf8_len;
utils.c:438: nb = utf8_to_utf32(in, in_bound_len, &uni);
vboxsf_wrappers.c:363:int vboxsf_set_utf8(void)
vfsmod.h:99: const unsigned char *utf8_name, size_t utf8_len);
vfsmod.h:134:int vboxsf_set_utf8(void);
@@ -49,8 +49,6 @@ BR2_PACKAGE_ACPID=y | |||
|
|||
# Minikube | |||
|
|||
config BR2_PACKAGE_VBOX_GUEST=y |
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.
@eiffel-fl
why do we need to remove this ?
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.
It was a leftover of my previous contribution where I, too quickly and violently, removed it.
With this PR, I added back what I deleted but with another name which I think is more descriptive.
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.
@eiffel-fl thank you for your patience and I left some comments but overall the PR looks good. (I just invoked the ISO build) so we can see the test results with the new ISO
Hi @eiffel-fl, 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. |
Hi. I was finally able to use $ minikube start --driver=virtualbox --iso-url=file://$(pwd)/minikube-v1.27.0-1665598505-14784-amd64.iso
😄 minikube v1.26.1 sur Ubuntu 20.04
✨ Utilisation du pilote virtualbox basé sur la configuration de l'utilisateur
👍 Démarrage du noeud de plan de contrôle minikube dans le cluster minikube
🔥 Création de VM virtualbox (CPUs=2, Mémoire=6000MB, Disque=20000MB)...
🐳 Préparation de Kubernetes v1.24.3 sur Docker 20.10.18...
...
$ minikube ssh
_ _
_ _ ( ) ( )
___ ___ (_) ___ (_)| |/') _ _ | |_ __
/' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)
$ ls -l /hosthome/francis
...
drwxr-xr-x 1 docker docker 4096 May 14 2021 'Mod'$'\303\250''les'
drwxr-xr-x 1 docker docker 4096 May 14 2021 Musique
drwxr-xr-x 1 docker docker 4096 May 14 2021 Public
drwxrwxr-x 1 docker docker 4096 Oct 14 22:10 'T'$'\303\251''l'$'\303\251''chargements'
drwxr-xr-x 1 docker docker 4096 Sep 15 09:06 'Vid'$'\303\251''os'
...
# Use tab to complete M to Modèles
$ cd /hosthome/francis/Modèles
$ pwd
/hosthome/francis/Modèles There are problems showing some characters (e.g. é, è, and other French accented letters), nonetheless I do not think these problems are related to this PR or As a conclusion, I think the built image fixed the problem I added previously (still sorry for the disturbance). Best regards. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eiffel-fl, medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #14465 |
Hi.
In this PR, I fixed the problem described in #14465.
Sorry for the delay, I wanted to write a clean recipe but I think in a first time the goal is to solve the problem.
I will come back later with a proper way (i.e. compiling
VBoxService
from sources).You can use this image to test it:
Sadly, I was not able to test it as
minikube
does not boot usingVirtualBox
on my machine.If you see any way to improve this PR, feel free to share (cc @vroetman).
Best regards.